revert between 56095 -> 55830 in arch
[AROS.git] / workbench / prefs / boot / main.c
blob51ff759cf9653aab13274217062daf7fb70404ef
1 /*
2 Copyright © 2009-2016, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define MUIMASTER_YES_INLINE_STDARG
8 #include <libraries/mui.h>
9 #include <zune/systemprefswindow.h>
11 #include <proto/intuition.h>
12 #include <proto/muimaster.h>
13 #include <clib/alib_protos.h>
15 #include "locale.h"
16 #include "args.h"
17 #include "booteditor.h"
19 #define VERSION "$VER: Boot 1.3 (8.3.2015)"
21 int main(int argc, char **argv)
23 Object *application, *window;
25 Locale_Initialize();
27 ReadArguments(argc, argv);
29 /* Show application unless SAVE parameter was used */
30 if (!((BOOL)ARG(SAVE)))
32 application = (Object *)ApplicationObject,
33 MUIA_Application_Title, __(MSG_NAME),
34 MUIA_Application_Version, (IPTR)VERSION,
35 MUIA_Application_Description, __(MSG_DESCRIPTION),
36 MUIA_Application_SingleTask, TRUE,
37 MUIA_Application_Base, (IPTR)"BOOTPREF",
38 SubWindow, (IPTR)(window = (Object *)SystemPrefsWindowObject,
39 MUIA_Window_ID, MAKE_ID('B', 'O', 'O', 'T'),
40 WindowContents, (IPTR)BootEditorObject,
41 End,
42 End),
43 End;
45 if (application != NULL)
47 SET(window, MUIA_Window_Open, TRUE);
48 DoMethod(application, MUIM_Application_Execute);
49 SET(window, MUIA_Window_Open, FALSE);
51 MUI_DisposeObject(application);
55 FreeArguments();
57 Locale_Deinitialize();
59 return 0;