Bug 172281 - Changing "event source" in System Notifications causes "unsaved changes"
Summary: Changing "event source" in System Notifications causes "unsaved changes"
Status: RESOLVED WORKSFORME
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: 4.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-06 15:11 UTC by Alan Jenkins
Modified: 2008-12-28 23:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed fix (442 bytes, patch)
2008-10-07 20:15 UTC, Alan Jenkins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Jenkins 2008-10-06 15:11:32 UTC
Version:            (using KDE 4.1.2)
OS:                Linux
Installed from:    Ubuntu Packages

"Event source" isn't an option.  It doesn't change a setting which needs to be saved.  It just lets you look at the notification settings for different applications e.g. Konsole and Kopete.

But if I change "event source", then try to close the window, I get a dialogue complaining that there are unsaved changes.

*Part 2*  If I change the event source, then try to switch to viewing the "System Bell" settings, the same thing happens.  Now if I click "cancel" on the dialogue, it leaves the notifications settings showing, as expected.  But in the tab on the left, the System Bell icon appears to be selected, not the  Notifications icon.
Comment 1 Alan Jenkins 2008-10-07 20:15:53 UTC
Created attachment 27741 [details]
Proposed fix

When "Event Source" is changed, the module saves the changes and emits changed(true), which means "I now have unsaved changes".  What it should do is emit changed(false), which means "I have just saved all changes".

diff --git a/kcontrol/knotify/knotify.cpp b/kcontrol/knotify/knotify.cpp
index 1f6fa52..80fd62d 100644
--- a/kcontrol/knotify/knotify.cpp
+++ b/kcontrol/knotify/knotify.cpp
@@ -132,7 +132,7 @@ void KCMKNotify::slotAppActivated( int index )
         text=m_appNames[index];
     m_notifyWidget->save();
     m_notifyWidget->setApplication( text );
-    emit changed(true);
+    emit changed(false);
 }
 
 void KCMKNotify::slotPlayerSettings()
Comment 2 Dario Andres 2008-12-28 23:46:16 UTC
Hi. The code changed in KDE4.2
The "changed" signal isn't even emmited from KCMKNotify::slotAppActivated (confirmed here using :: kdebase svn rev. 902368)
(I don't know if the patch was applied or another code refactor take care of the problem)