grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / prefs / icontrol / main.c
blobbb1c5cc5540f253c29b399eefa1956204935f67d
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 /*********************************************************************************************/
8 #define MUIMASTER_YES_INLINE_STDARG
10 #include <proto/alib.h>
11 #include <proto/intuition.h>
12 #include <proto/muimaster.h>
14 #include <zune/systemprefswindow.h>
16 #include "locale.h"
17 #include "icontroleditor.h"
18 #include "args.h"
19 #include "prefs.h"
21 /* #define DEBUG 1 */
22 #include <aros/debug.h>
24 #define VERSION "$VER: IControl 1.4 (7.1.2014) AROS Dev Team"
26 /*********************************************************************************************/
28 int main(int argc, char **argv)
30 Object *application;
31 Object *window;
33 Locale_Initialize();
35 /* init */
36 if (ReadArguments(argc, argv))
38 if (ARG(USE) || ARG(SAVE))
40 Prefs_HandleArgs((STRPTR)ARG(FROM), ARG(USE), ARG(SAVE));
42 else
44 application = (Object *)ApplicationObject,
45 MUIA_Application_Title, __(MSG_WINTITLE),
46 MUIA_Application_Version, (IPTR) VERSION,
47 MUIA_Application_Description, __(MSG_WINTITLE),
48 MUIA_Application_Base, (IPTR) "ICONTROLPREF",
49 SubWindow, (IPTR)(window = (Object *)SystemPrefsWindowObject,
50 MUIA_Window_ID, ID_ICTL,
51 WindowContents, (IPTR) IControlEditorObject,
52 End,
53 End),
54 End;
56 if (application != NULL)
58 SET(window, MUIA_Window_Open, TRUE);
59 DoMethod(application, MUIM_Application_Execute);
61 MUI_DisposeObject(application);
64 FreeArguments();
67 Locale_Deinitialize();
68 return 0;