Version: unknown (using KDE 3.4.1, Debian Package 4:3.4.1-1 (3.1)) Compiler: gcc version 3.3.6 (Debian 1:3.3.6-5) OS: Linux (i686) release 2.6.8-2-386 if akregator was minimised to the tray, it should stay in the tray between sessions, currently it does not.
SVN commit 431547 by lanius: fix restoring of akregator BUG: 82868 BUG: 108422 M +17 -19 main.cpp --- trunk/KDE/kdepim/akregator/src/main.cpp #431546:431547 @@ -36,7 +36,7 @@ class AkregatorApp : public KUniqueApplication { public: - AkregatorApp() : mMainWindow( 0 ) {} + AkregatorApp() : mMainWindow( ) {} ~AkregatorApp() {} int newInstance(); @@ -47,16 +47,10 @@ int AkregatorApp::newInstance() { - DCOPRef akr("akregator", "AkregatorIface"); + if (!isRestored()) + { + DCOPRef akr("akregator", "AkregatorIface"); - if ( isRestored() ) { - if ( KMainWindow::canBeRestored( 1 ) ) { - mMainWindow = new Akregator::MainWindow(); - setMainWidget( mMainWindow ); - mMainWindow->show(); - mMainWindow->restore( 1 ); - } - } else { if ( !mMainWindow ) { mMainWindow = new Akregator::MainWindow(); setMainWidget( mMainWindow ); @@ -80,7 +74,6 @@ args->clear(); } - return KUniqueApplication::newInstance(); } @@ -91,17 +84,22 @@ KCmdLineArgs::addCmdLineOptions( Akregator::akregator_options ); KUniqueApplication::addCmdLineOptions(); + AkregatorApp app; + // start knotifyclient if not already started. makes it work for people who doesn't use full kde, according to kmail devels KNotifyClient::startDaemon(); - if(!AkregatorApp::start()) - return 0; + // see if we are starting with session management + if (app.isRestored()) + { +#undef RESTORE +#define RESTORE(type) { int n = 1;\ + while (KMainWindow::canBeRestored(n)){\ + (new type)->restore(n, false);\ + n++;}} - AkregatorApp app; + RESTORE(Akregator::MainWindow); + } - bool ret = app.exec(); - while ( KMainWindow::memberList->first() ) - delete KMainWindow::memberList->first(); - - return ret; + return app.exec(); }