grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / prefs / boingiconbar / main.c
blob47dbec0ff4edbadf8e04143e2b872212c4dcc9f8
1 /*
2 Copyright © 2012, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 /*********************************************************************************************/
11 #define MUIMASTER_YES_INLINE_STDARG
13 #include <proto/alib.h>
14 #include <proto/icon.h>
15 #include <proto/intuition.h>
16 #include <proto/muimaster.h>
18 #include <workbench/startup.h>
19 #include <zune/systemprefswindow.h>
21 #include "locale.h"
22 #include "bibeditor.h"
23 #include "args.h"
24 #include "prefs.h"
26 // #define DEBUG 1
27 #include <aros/debug.h>
29 #define VERSION "$VER: BIB 2.0 (14.05.2012) AROS Dev Team"
30 /*********************************************************************************************/
32 int main(int argc, char **argv)
34 Object *application;
35 Object *window;
36 struct DiskObject *disko;
37 static struct WBStartup *argmsg;
38 static struct WBArg *wb_arg;
39 static STRPTR cxname;
41 D(bug("[bib prefs] InitLocale\n"));
42 Locale_Initialize();
44 D(bug("[bib prefs] started\n"));
46 if (argc)
48 cxname = argv[0];
49 } else {
50 argmsg = (struct WBStartup *)argv;
51 wb_arg = argmsg->sm_ArgList;
52 cxname = wb_arg->wa_Name;
54 disko = GetDiskObject(cxname);
56 /* init */
57 if (ReadArguments(argc, argv))
59 D(bug("[bib prefs] initialized\n"));
60 if (ARG(USE) || ARG(SAVE))
62 Prefs_HandleArgs((STRPTR)ARG(FROM), ARG(USE), ARG(SAVE));
64 else
66 application = (Object *)ApplicationObject,
67 MUIA_Application_Title, __(MSG_TITLE),
68 MUIA_Application_Version, (IPTR) VERSION,
69 MUIA_Application_Description, __(MSG_TITLE),
70 MUIA_Application_Base, (IPTR) "BIBPREF",
71 MUIA_Application_DiskObject, (IPTR)disko,
72 SubWindow, (IPTR)(window = (Object *)SystemPrefsWindowObject,
73 MUIA_Window_ID, MAKE_ID('B','I','P','8'),
74 WindowContents, (IPTR) BibEditorObject,
75 End,
76 End),
77 End;
79 if (application != NULL)
81 SET(window, MUIA_Window_Open, TRUE);
82 DoMethod(application, MUIM_Application_Execute);
84 MUI_DisposeObject(application);
87 FreeArguments();
90 if (disko != NULL)
91 FreeDiskObject(disko);
92 Locale_Deinitialize();
93 return 0;
96 /*********************************************************************************************/