Autoadjust doesn't enforce the window's width and height to be larger than
[AROS.git] / workbench / prefs / serial / main.c
blobbab328804b52a7e5b918ee0ee988138e1eee1f1a
1 /*
2 Copyright © 1995-2011, 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/intuition.h>
15 #include <proto/muimaster.h>
17 #include <zune/systemprefswindow.h>
19 #include "locale.h"
20 #include "sereditor.h"
21 #include "args.h"
22 #include "prefs.h"
24 /* #define DEBUG 1 */
25 #include <aros/debug.h>
27 #define VERSION "$VER: Serial 2.1 (05.01.2010) AROS Dev Team"
28 /*********************************************************************************************/
30 int main(int argc, char **argv)
32 Object *application;
33 Object *window;
35 D(bug("[serial prefs] InitLocale\n"));
36 Locale_Initialize();
38 D(bug("[serial prefs] started\n"));
40 /* init */
41 if (ReadArguments(argc, argv))
43 D(bug("[serial prefs] initialized\n"));
44 if (ARG(USE) || ARG(SAVE))
46 Prefs_HandleArgs((STRPTR)ARG(FROM), ARG(USE), ARG(SAVE));
48 else
50 application = (Object *)ApplicationObject,
51 MUIA_Application_Title, __(MSG_WINTITLE),
52 MUIA_Application_Version, (IPTR) VERSION,
53 MUIA_Application_Description, __(MSG_WINTITLE),
54 MUIA_Application_Base, (IPTR) "SERIALPREF",
55 SubWindow, (IPTR)(window = (Object *)SystemPrefsWindowObject,
56 MUIA_Window_ID, ID_SERL,
57 WindowContents, (IPTR) SerEditorObject,
58 End,
59 End),
60 End;
62 if (application != NULL)
64 SET(window, MUIA_Window_Open, TRUE);
65 DoMethod(application, MUIM_Application_Execute);
67 MUI_DisposeObject(application);
70 FreeArguments();
73 Locale_Deinitialize();
74 return 0;
77 /*********************************************************************************************/