Hint added.
[AROS.git] / workbench / prefs / wanderer / main.c
blobe9882cde9bb652b35a9926b1b4dbb5d85dff6a11
1 /*
2 Copyright © 2004-2012, The AROS Development Team. All rights reserved.
3 This file is part of the Wanderer Preferences program, which is distributed
4 under the terms of version 2 of the GNU General Public License.
6 $Id$
7 */
9 #define DEBUG 0
10 #include <aros/debug.h>
12 #define MUIMASTER_YES_INLINE_STDARG
14 #include <proto/alib.h>
15 #include <proto/dos.h>
16 #include <proto/intuition.h>
17 #include <proto/muimaster.h>
19 #include <libraries/mui.h>
20 #include <dos/dos.h>
22 #include <zune/systemprefswindow.h>
23 #include "locale.h"
24 #include "wpeditor.h"
26 #define VERSIONSTR "$VER: Wanderer Prefs 1.4 (14.01.2012) ©1995-2012 The AROS Development Team"
28 int main(void)
30 Object *application, *window, *wpeditor;
31 BPTR OldDir = BNULL, NewDir;
33 int rc = RETURN_OK;
34 D(bug("[WPEditor.exe] Starting...\n"));
35 Locale_Initialize();
36 NewDir = Lock("RAM:", SHARED_LOCK);
37 if (NewDir)
39 OldDir = CurrentDir(NewDir);
41 application = ApplicationObject,
42 MUIA_Application_Title, (IPTR) "Wanderer Prefs",
43 MUIA_Application_Version, (IPTR) VERSIONSTR,
44 MUIA_Application_Description, __(MSG_DESCRIPTION),
45 MUIA_Application_Copyright, (IPTR)"Copyright © 1995-2012, The AROS Development Team",
46 MUIA_Application_Author, (IPTR)"The AROS Development Team",
47 MUIA_Application_Base, (IPTR)"WANDERERPREFS",
48 MUIA_Application_SingleTask, TRUE,
49 SubWindow, (IPTR)(
50 window = (Object *)SystemPrefsWindowObject,
51 MUIA_Window_ID, MAKE_ID('W','W','I','N'),
52 MUIA_Window_Title, __(MSG_NAME),
53 WindowContents, (IPTR)(wpeditor = (Object *)WPEditorObject, End),
54 End),
55 End;
57 if (application)
59 Object * advancedviewwindow = (Object *)XGET(wpeditor, MUIA_WPEditor_AdvancedViewWindow);
60 if (advancedviewwindow)
62 DoMethod(application, OM_ADDMEMBER, advancedviewwindow);
64 SET(window, MUIA_Window_Open, TRUE);
65 DoMethod(application, MUIM_Application_Execute);
66 SET(window, MUIA_Window_Open, FALSE);
67 MUI_DisposeObject(application);
70 else
72 rc = RETURN_FAIL;
73 D(bug("[WPEditor.exe] Can't create application!\n"));
75 if (NewDir)
77 CurrentDir(OldDir);
78 UnLock(NewDir);
80 Locale_Deinitialize();
81 D(bug("[WPEditor.exe] Quitting...\n"));
82 return rc;