revert between 56095 -> 55830 in arch
[AROS.git] / workbench / prefs / font / main.c
blob7a6ff158ed2d42e52336857c5936832c1a6109de
1 /*
2 Copyright © 2003-2017, 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 "fpeditor.h"
18 #include "prefs.h"
20 #define VERSION "$VER: Fonts 1.1 ("ADATE") ©AROS Dev Team"
22 int main(int argc, char **argv)
24 Object *application, *window;
26 Locale_Initialize();
28 if (ReadArguments(argc, argv))
30 if (ARG(USE) || ARG(SAVE))
32 Prefs_HandleArgs((STRPTR)ARG(FROM), ARG(USE), ARG(SAVE));
34 else
36 application = (Object *)ApplicationObject,
37 MUIA_Application_Title, __(MSG_NAME),
38 MUIA_Application_Version, (IPTR) VERSION,
39 MUIA_Application_Description, __(MSG_NAME),
40 MUIA_Application_SingleTask, TRUE,
41 MUIA_Application_Base, (IPTR) "FONTPREF",
42 SubWindow, (IPTR) (window = (Object *)SystemPrefsWindowObject,
43 MUIA_Window_ID, MAKE_ID('F','W','I','N'),
44 WindowContents, (IPTR) FPEditorObject,
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);
58 FreeArguments();
61 Locale_Deinitialize();
63 return 0;