- Don't set DHCP in interface file if interface is PPP. Otherwise dhclient
[AROS.git] / workbench / prefs / network / main.c
blobbd6da6099669a15aa578fc67b95294aef63cff68
1 /*
2 Copyright © 2009-2012, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define MUIMASTER_YES_INLINE_STDARG
8 #include <proto/alib.h>
9 #include <proto/intuition.h>
10 #include <proto/muimaster.h>
12 #include <libraries/mui.h>
13 #include <zune/systemprefswindow.h>
15 #include "locale.h"
16 #include "args.h"
17 #include "netpeditor.h"
18 #include "prefsdata.h"
20 #define VERSION "$VER: Network 1.14 (3.3.2012) AROS Dev Team"
22 int main(int argc, char **argv)
24 Object *application, *window;
26 Locale_Initialize();
28 ReadArguments(argc, argv);
30 InitNetworkPrefs(
31 (ARG(FROM) != (IPTR)NULL ? (STRPTR)ARG(FROM) : (STRPTR)PREFS_PATH_ENV),
32 (ARG(USE) ? TRUE : FALSE),
33 (ARG(SAVE) ? TRUE : FALSE));
35 /* Show application unless SAVE or USE parameters were used */
36 if (!((BOOL)ARG(SAVE)) && !((BOOL)ARG(USE)))
38 application = (Object *)ApplicationObject,
39 MUIA_Application_Title, __(MSG_NAME),
40 MUIA_Application_Version, (IPTR)VERSION,
41 MUIA_Application_Description, __(MSG_DESCRIPTION),
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;