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 @@ -84,20 +84,36 @@ int main( int argc, char **argv ) #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! "); } |