Hint added.
[AROS.git] / workbench / prefs / network / main.c
blobc68e9433d392e80733297e81b453535022bd802a
1 /*
2 Copyright © 2009-2014, 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_Base, (IPTR)"NETPREF",
42 SubWindow, (IPTR)(window = (Object *)SystemPrefsWindowObject,
43 MUIA_Window_ID, MAKE_ID('N', 'E', 'T', 'P'),
44 WindowContents, (IPTR)NetPEditorObject,
45 End,
46 End),
47 End;
49 if (application != NULL)
51 SET(window, MUIA_Window_Open, TRUE);
52 DoMethod(application, MUIM_Application_Execute);
53 SET(window, MUIA_Window_Open, FALSE);
55 MUI_DisposeObject(application);
59 FreeArguments();
61 Locale_Deinitialize();
63 return 0;