Forwardport fix for bug 139701: Away msg polling too frequently.
[kdenetwork.git] / wifi / main.cpp
blob6e52122000fe106f8b39e741f340bdca7d0979ef
1 /***************************************************************************
2 main.cpp - description
3 -------------------
4 begin : Sam Apr 7 11:44:20 CEST 2001
5 copyright : (C) 2001 by Stefan Winter
6 email : mail@stefan-winter.de
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #include <kcmdlineargs.h>
19 #include <kaboutdata.h>
20 #include <klocale.h>
21 #include <kapplication.h>
23 #include "kwifimanager.h"
24 #ifndef VERSION
25 #define VERSION "4_0_0"
26 #endif
28 static const char description[] = I18N_NOOP ( "KWiFiManager - Wireless LAN Manager for KDE" );
31 static KCmdLineOptions options[] = {
32 KCmdLineLastOption
35 int
36 main ( int argc, char *argv[] )
38 KAboutData aboutData ( "kwifimanager", I18N_NOOP ( "KWiFiManager" ), VERSION,
39 description, KAboutData::License_GPL, "(c) 2001-05, Stefan Winter" );
40 aboutData.addAuthor ( "Stefan Winter", I18N_NOOP ( "Original Author and Maintainer" ), "swinter@kde.org" );
41 aboutData.addCredit ( "Helge Deller", I18N_NOOP ( "Lots of Fixes and Optimizations, added Session Management" ),
42 "deller@kde.org" );
44 KCmdLineArgs::init ( argc, argv, &aboutData );
45 KCmdLineArgs::addCmdLineOptions ( options ); // Add our own options.
46 KCmdLineArgs *args = KCmdLineArgs::parsedArgs ( );
47 args->clear ( );
49 KApplication app;
51 if ( app.isSessionRestored ( ) )
53 RESTORE ( KWiFiManagerApp ( 0, "mainWindow" ) );
54 KWiFiManagerApp *kwifimanager = new KWiFiManagerApp ();
55 if ( kwifimanager && kwifimanager->startDocked ( ) )
56 kwifimanager->hide ( );
58 else
60 KWiFiManagerApp *kwifimanager = new KWiFiManagerApp ( 0, "mainWindow" );
61 kwifimanager->show ( );
64 return app.exec ( );