use amigaos like behaviour by default
[AROS.git] / workbench / prefs / screenmode / main.c
blob13abd1078989d89e312e0c3b553b28b5e922a738
1 /*
2 Copyright © 2003-2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define MUIMASTER_YES_INLINE_STDARG
7 #define DEBUG 0
9 #include <aros/debug.h>
10 #include <dos/dos.h>
12 #include <proto/alib.h>
13 #include <proto/muimaster.h>
14 #include <proto/intuition.h>
16 #include <zune/systemprefswindow.h>
18 #include "args.h"
19 #include "locale.h"
20 #include "prefs.h"
21 #include "smeditor.h"
23 #define VERSION "ScreenMode Preferences 1.5 (26.8.2013)"
24 #define COPYRIGHT "Copyright © 1995-2013, The AROS Development Team"
26 static const char vers[] = VERSION;
27 static const char version[] = "$VER: " VERSION "\n";
30 int main(int argc, char **argv)
32 Object *app, *win;
34 Locale_Initialize();
36 if (ReadArguments(argc, argv))
38 if (ARG(USE) || ARG(SAVE))
40 Prefs_HandleArgs((STRPTR)ARG(FROM), ARG(USE), ARG(SAVE));
42 else
44 app = (Object *) ApplicationObject,
45 MUIA_Application_Title, (IPTR) __(MSG_NAME),
46 MUIA_Application_Version, (IPTR) vers,
47 MUIA_Application_Copyright, (IPTR) COPYRIGHT,
48 MUIA_Application_Author, (IPTR) "The AROS Development Team",
49 MUIA_Application_Description, (IPTR) __(MSG_NAME),
50 MUIA_Application_SingleTask, TRUE,
51 MUIA_Application_Base, (IPTR) "SCREENMODEPREF",
52 SubWindow, (IPTR)(win = (Object *) SystemPrefsWindowObject,
53 MUIA_Window_ID, MAKE_ID('S','W','I','N'),
54 WindowContents, (IPTR) SMEditorObject,
55 End,
56 End),
57 End;
59 if (app)
61 set(win, MUIA_Window_Open, TRUE);
63 DoMethod(app, MUIM_Application_Execute);
65 MUI_DisposeObject(app);
68 FreeArguments();
71 Locale_Deinitialize();
73 return RETURN_OK;