Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/mainembedded.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 336e350..50db377 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp @@ -76,28 +76,44 @@ int main( int argc, char **argv ) KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); // init language KPimGlobalPrefs::instance()->setGlobalConfig(); QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont ); KAddressBookMain m ; //US MainWindow m; #ifndef DESKTOP_VERSION QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); #endif #ifndef DESKTOP_VERSION a.showMainWidget( &m ); #else a.setMainWidget( &m ); - m.resize (640, 480 ); m.show(); #endif a.exec(); - - dumpMissing(); - - KPimGlobalPrefs::instance()->writeConfig(); +#ifdef DESKTOP_VERSION + KConfig *config = KABPrefs::instance()->getConfig(); + config->setGroup("WidgetLayout"); + QStringList list ;//= config->readListEntry("MainLayout"); + int x,y,w,h; + QWidget* wid; + wid = &m; + x = wid->geometry().x(); + y = wid->geometry().y(); + w = wid->width(); + h = wid->height(); + list.clear(); + list << QString::number( x ); + list << QString::number( y ); + list << QString::number( w ); + list << QString::number( h ); + config->writeEntry("MainLayout",list ); +#endif + dumpMissing(); + + KPimGlobalPrefs::instance()->writeConfig(); } qDebug("KA: Bye! "); } |