gnome-specimen r90 - in trunk-from-bzr: . specimen



Author: wbolster
Date: Tue Jun 17 18:42:46 2008
New Revision: 90
URL: http://svn.gnome.org/viewvc/gnome-specimen?rev=90&view=rev

Log:
* specimen/specimenwindow.py:
  - Reset the GConf value to the default if the application
    was quit with an empty preview text (so that the next
    startup shows the default string instead of empty
    previews)


Modified:
   trunk-from-bzr/   (props changed)
   trunk-from-bzr/specimen/specimenwindow.py

Modified: trunk-from-bzr/specimen/specimenwindow.py
==============================================================================
--- trunk-from-bzr/specimen/specimenwindow.py	(original)
+++ trunk-from-bzr/specimen/specimenwindow.py	Tue Jun 17 18:42:46 2008
@@ -104,8 +104,11 @@
         'Quits the application'
 
         # Store current values in GConf
-        self.gconf_client.set_string(self.gconf_path_preview_text, self.preview_text)
         self.gconf_client.set_int(self.gconf_path_preview_size, self.preview_size)
+        if self.preview_text.strip() == '': # reset to default:
+            self.gconf_client.unset(self.gconf_path_preview_text)
+        else:
+            self.gconf_client.set_string(self.gconf_path_preview_text, self.preview_text)
 
         # Quit the application
         gtk.main_quit()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]