Bug 84528 - session management doesnt work when mainwin is minimized
Summary: session management doesnt work when mainwin is minimized
Status: RESOLVED INTENTIONAL
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: cvs
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 85471 88319 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-07-05 21:23 UTC by Frank Osterfeld
Modified: 2005-01-30 23:40 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Osterfeld 2004-07-05 21:23:13 UTC
There are two bugs which are IMHO related to each other: 
 
- If the mainwin is minimized and the user exits KDE, changes to the currently 
loaded opml file are discarded silently. 
 
- if the mainwin is minimized, the session is not stored properly 
The only thing in session config is: 
 
---------------------------- 
[Number] 
NumberOfWindows=0 
---------------------------- 
 
instead of for example 
 
---------------------------- 
[1] 
URL=file:/home/testuser/test.opml 
 
[Number] 
NumberOfWindows=1 
 
[WindowProperties1] 
ClassName=aKregator 
Height 600=601 
ObjectName=aKregator 
Width 800=801 
 
[aKregator Toolbar style] 
Index=0 
---------------------------- 
 
That means, the closed/minimized window is completely ignored by session 
management. I believe that's because akregator's close methods like queryClose 
are called and the behaviour is caused by some not yet reimplemented  
close-related method.
Comment 1 Wilbert Berendsen 2004-07-11 08:00:54 UTC
same here. BTW: May be it would be intuitive for new users to just use some default file on first save (e.g. ~/.kde/share/apps/akregator/std.opml)
Comment 2 Lubos Lunak 2004-07-15 17:00:39 UTC
It's possible this has been fixed by a recent kdelibs fix, akregator devels please re-test.
Comment 3 Stanislav Karchebny 2004-07-17 14:32:31 UTC
Session seems to be not restored at all if I log out with akregator running minimized in tray.
Comment 4 Stanislav Karchebny 2004-07-17 14:33:29 UTC
Oh, aKregator is restored, but tray icon is never shown!
Comment 5 Frank Osterfeld 2004-07-17 16:46:56 UTC
Here, tray icon is shown, but changes are discarded on logout and last opened file is not reloaded on restart.
(akregator built against kde 3.2.2, running with both 3.2.2 and cvs)
Comment 6 Frank Osterfeld 2004-08-26 18:13:57 UTC
The bug is fixed in KDE 3.3, but not in KDE 3.2.

The stale instances bug is still there in 3.2 and now much more annoying: 
Since akregator is a KUniqueApp now, the stale restored akregator instance runs unseen in the background, if the user tries to start a new akregator instance that won't work, because there is already an instance running. 
Comment 7 Thomas Rasmussen 2004-08-31 13:42:55 UTC
Here, if maximized window at logout feed list is restored at login but unread articles are marked as read. If minimized tray icon is only shown at every second login (akregator process running every time) and no feedlist is loaded.
Comment 8 Frank Osterfeld 2004-08-31 15:53:33 UTC
*** Bug 85471 has been marked as a duplicate of this bug. ***
Comment 9 Frank Osterfeld 2004-08-31 16:11:24 UTC
At the moment, unread articles are marked as read when the corresponding option is set, no matter if you exit akregator normally or by session logout.

(I thought about disabling this for session logout, but kapp->sessionSaving() didn't work. Help appreciated.)
Comment 10 Teemu Rytilahti 2004-10-25 23:13:01 UTC
CVS commit by rytilahti: 

Load and save feedlist when handling sessions.
Fixes #84528 (#85471) hopefully.
CCBUG:84528


  M +7 -4      akregator_view.cpp   1.138.2.32
  M +8 -2      akregator_view.h   1.61.2.15


--- kdenonbeta/akregator/src/akregator_view.cpp  #1.138.2.31:1.138.2.32
@@ -1439,9 +1439,10 @@ void aKregatorView::stopLoading()
 }
 
-void aKregatorView::readProperties(KConfig* config)
+void aKregatorView::readProperties(KConfig* config) // this is called when session is being restored
 {
+    // load the standard feedlist, fixes #84528, at least partially -tpr 20041025
+    m_part->openStandardFeedList();
     slotDeleteExpiredArticles();
     // read filter settings 
-    
     m_searchLine->setText(config->readEntry("searchLine"));
     m_searchCombo->setCurrentItem(config->readEntry("searchCombo").toInt()); 
@@ -1478,9 +1479,11 @@ void aKregatorView::readProperties(KConf
             } 
         } // if viewMode != combinedView
-} // if selectedFeed is set
+    } // if selectedFeed is set
 }
-
+// this is called when using session management and session is going to close
 void aKregatorView::saveProperties(KConfig* config)
 {   
+    // save the feedlist, fixes #84528, at least partially -tpr 20041025
+    m_part->saveFeedList();
     // save filter settings
     config->writeEntry("searchLine", m_searchLine->text());

--- kdenonbeta/akregator/src/akregator_view.h  #1.61.2.14:1.61.2.15
@@ -95,5 +95,11 @@ namespace Akregator
             void addFeedToGroup(const QString& url, const QString& group);
 
+            /**
+             * Disables fetch actions and informs the frame to enable stop button
+             */
                 void startOperation();
+            /**
+             * Enables fetch actions and nforms the frame to disable stop button
+             */
             void endOperation();
             void operationError(const QString &msg);


Comment 11 George Staikos 2004-12-01 22:43:31 UTC
so, is this fixed?  Let's close it if it is.
Comment 12 Frank Osterfeld 2004-12-01 23:10:53 UTC
This bug is caused by a bug in ? < kdelibs < 3.3 and not fixed yet. 
It's really annoying still, since after restart the stale akregator is not properly restored and being a kuniqueapplication starting new instances doesn't work.
It's not critical anymore, since feed lists changes are saved now automatically.
Comment 13 George Staikos 2004-12-02 06:29:47 UTC
*** Bug 88319 has been marked as a duplicate of this bug. ***
Comment 14 George Staikos 2004-12-03 09:52:20 UTC
please retest with older kdelibs.  I'd like to know what does/doesn't work.
Comment 15 Adrien Beau 2004-12-24 10:41:05 UTC
This bug is still present in 1.0_beta8 under KDE 3.2.3. If I leave KDE when aKregator is running minimized in the system tray, then it seems it is properly restored when KDE is restarted (it is there in the ps output, sitting idly as it should), but the system tray icon is not displayed.

Workaround: kill aKregator, start a new instance. This is annoying, but if this is only occuring in KDE 3.2.x, it may not be worth fixing.
Comment 16 Frank Osterfeld 2005-01-30 23:40:52 UTC
I close this since this is a KDE 3.2 bug, and akregator requires >= KDE 3.3 now.