summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Unidiff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 50db377..93ba53c 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -48,72 +48,73 @@ int main( int argc, char **argv )
48#endif 48#endif
49 49
50 bool exitHelp = false; 50 bool exitHelp = false;
51 if ( argc > 1 ) { 51 if ( argc > 1 ) {
52 QString command = argv[1]; 52 QString command = argv[1];
53 if ( command == "-help" ){ 53 if ( command == "-help" ){
54 printf("KA/E command line commands:\n"); 54 printf("KA/E command line commands:\n");
55 printf(" no command: Start KA/E in usual way\n"); 55 printf(" no command: Start KA/E in usual way\n");
56 printf(" -help: This output\n"); 56 printf(" -help: This output\n");
57 printf(" KA/E is exiting now. Bye!\n"); 57 printf(" KA/E is exiting now. Bye!\n");
58 exitHelp = true; 58 exitHelp = true;
59 } 59 }
60 } 60 }
61 if ( ! exitHelp ) { 61 if ( ! exitHelp ) {
62 62
63 KGlobal::setAppName( "kaddressbook" ); 63 KGlobal::setAppName( "kaddressbook" );
64#ifndef DESKTOP_VERSION 64#ifndef DESKTOP_VERSION
65 if ( QApplication::desktop()->width() > 320 ) 65 if ( QApplication::desktop()->width() > 320 )
66 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/"); 66 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/");
67 else 67 else
68 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); 68 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
69#else 69#else
70 QString fileName ; 70 QString fileName ;
71 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; 71 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/";
72 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 72 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
73 QApplication::addLibraryPath ( qApp->applicationDirPath () ); 73 QApplication::addLibraryPath ( qApp->applicationDirPath () );
74 74
75#endif 75#endif
76 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); 76 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
77 // init language 77 // init language
78 KPimGlobalPrefs::instance()->setGlobalConfig(); 78 KPimGlobalPrefs::instance()->setGlobalConfig();
79 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont ); 79 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
80 KAddressBookMain m ; 80 KAddressBookMain m ;
81//US MainWindow m; 81//US MainWindow m;
82#ifndef DESKTOP_VERSION 82#ifndef DESKTOP_VERSION
83 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 83 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
84#endif 84#endif
85 85
86 86
87#ifndef DESKTOP_VERSION 87#ifndef DESKTOP_VERSION
88 a.showMainWidget( &m ); 88 a.showMainWidget( &m );
89 89
90#else 90#else
91 a.setMainWidget( &m ); 91 a.setMainWidget( &m );
92 m.show(); 92 m.show();
93#endif 93#endif
94 a.exec(); 94 a.exec();
95#ifdef DESKTOP_VERSION 95#ifdef DESKTOP_VERSION
96 KConfig *config = KABPrefs::instance()->getConfig(); 96 KConfig *config = KABPrefs::instance()->getConfig();
97 config->setGroup("WidgetLayout"); 97 config->setGroup("WidgetLayout");
98 QStringList list ;//= config->readListEntry("MainLayout"); 98 QStringList list ;//= config->readListEntry("MainLayout");
99 int x,y,w,h; 99 int x,y,w,h;
100 QWidget* wid; 100 QWidget* wid;
101 wid = &m; 101 wid = &m;
102 x = wid->geometry().x(); 102 x = wid->geometry().x();
103 y = wid->geometry().y(); 103 y = wid->geometry().y();
104 w = wid->width(); 104 w = wid->width();
105 h = wid->height(); 105 h = wid->height();
106 list.clear(); 106 list.clear();
107 list << QString::number( x ); 107 list << QString::number( x );
108 list << QString::number( y ); 108 list << QString::number( y );
109 list << QString::number( w ); 109 list << QString::number( w );
110 list << QString::number( h ); 110 list << QString::number( h );
111 config->writeEntry("MainLayout",list ); 111 config->writeEntry("MainLayout",list );
112 config->sync();
112#endif 113#endif
113 dumpMissing(); 114 dumpMissing();
114 115
115 KPimGlobalPrefs::instance()->writeConfig(); 116 KPimGlobalPrefs::instance()->writeConfig();
116 } 117 }
117 qDebug("KA: Bye! "); 118 qDebug("KA: Bye! ");
118} 119}
119 120