revert between 56095 -> 55830 in arch
[AROS.git] / workbench / prefs / network / main.c
bloba1ce435aaf3eb753d75295f2d56ce14f4b331047
1 /*
2 Copyright © 2009-2016, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define MUIMASTER_YES_INLINE_STDARG
8 #include <proto/intuition.h>
9 #include <proto/muimaster.h>
10 #include <clib/alib_protos.h>
11 #include <libraries/mui.h>
12 #include <zune/systemprefswindow.h>
14 #include "locale.h"
15 #include "args.h"
16 #include "netpeditor.h"
17 #include "prefsdata.h"
19 #define VERSION "$VER: Network 1.22 (19.5.2014) AROS Dev Team"
21 int main(int argc, char **argv)
23 Object *application, *window;
25 Locale_Initialize();
27 ReadArguments(argc, argv);
29 InitNetworkPrefs(
30 (ARG(FROM) != (IPTR)NULL ? (STRPTR)ARG(FROM) : (STRPTR)PREFS_PATH_ENV),
31 (ARG(USE) ? TRUE : FALSE),
32 (ARG(SAVE) ? TRUE : FALSE));
34 /* Show application unless SAVE or USE parameters were used */
35 if (!((BOOL)ARG(SAVE)) && !((BOOL)ARG(USE)))
37 application = (Object *)ApplicationObject,
38 MUIA_Application_Title, __(MSG_NAME),
39 MUIA_Application_Version, (IPTR)VERSION,
40 MUIA_Application_Description, __(MSG_DESCRIPTION),
41 MUIA_Application_SingleTask, TRUE,
42 MUIA_Application_Base, (IPTR)"NETPREF",
43 SubWindow, (IPTR)(window = (Object *)SystemPrefsWindowObject,
44 MUIA_Window_ID, MAKE_ID('N', 'E', 'T', 'P'),
45 WindowContents, (IPTR)NetPEditorObject,
46 End,
47 End),
48 End;
50 if (application != NULL)
52 SET(window, MUIA_Window_Open, TRUE);
53 DoMethod(application, MUIM_Application_Execute);
54 SET(window, MUIA_Window_Open, FALSE);
56 MUI_DisposeObject(application);
60 FreeArguments();
62 Locale_Deinitialize();
64 return 0;