revert between 56095 -> 55830 in arch
[AROS.git] / workbench / prefs / boingiconbar / main.c
blobe9baab33320653043896b71fe1f181478c4e7bbd
1 /*
2 Copyright © 2012-2016, 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_SingleTask, TRUE,
71 MUIA_Application_Base, (IPTR) "BIBPREF",
72 MUIA_Application_DiskObject, (IPTR)disko,
73 SubWindow, (IPTR)(window = (Object *)SystemPrefsWindowObject,
74 MUIA_Window_ID, MAKE_ID('B','I','P','8'),
75 WindowContents, (IPTR) BibEditorObject,
76 End,
77 End),
78 End;
80 if (application != NULL)
82 SET(window, MUIA_Window_Open, TRUE);
83 DoMethod(application, MUIM_Application_Execute);
85 MUI_DisposeObject(application);
88 FreeArguments();
91 if (disko != NULL)
92 FreeDiskObject(disko);
93 Locale_Deinitialize();
94 return 0;
97 /*********************************************************************************************/