revert between 56095 -> 55830 in arch
[AROS.git] / workbench / prefs / pointer / main.c
blob573cdfe33bed29aac21758500e0e51665bbbe14f
1 /*
2 Copyright © 2010-2016, 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 <prefs/pointer.h>
18 #include "locale.h"
19 #include "pteditor.h"
20 #include "args.h"
21 #include "prefs.h"
23 // #define DEBUG 1
24 #include <aros/debug.h>
26 #define VERSION "$VER: Pointer 1.4 (04.06.2012) AROS Dev Team"
27 /*********************************************************************************************/
29 int main(int argc, char **argv)
31 Object *application;
32 Object *window;
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 application = (Object *)ApplicationObject,
45 MUIA_Application_Title, __(MSG_WINTITLE),
46 MUIA_Application_Version, (IPTR) VERSION,
47 MUIA_Application_Description, __(MSG_WINTITLE),
48 MUIA_Application_SingleTask, TRUE,
49 MUIA_Application_Base, (IPTR) "POINTERPREF",
50 SubWindow, (IPTR)(window = (Object *)SystemPrefsWindowObject,
51 MUIA_Window_ID, ID_NPTR,
52 WindowContents, (IPTR) PTEditorObject,
53 End,
54 End),
55 End;
57 if (application != NULL)
59 SET(window, MUIA_Window_Open, TRUE);
60 DoMethod(application, MUIM_Application_Execute);
62 MUI_DisposeObject(application);
65 FreeArguments();
68 Locale_Deinitialize();
69 return 0;