gnome-specimen r90 - in branches/import-from-bzr: . specimen



Author: wbolster
Date: Tue Jun 17 18:53:24 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:
   branches/import-from-bzr/   (props changed)
   branches/import-from-bzr/specimen/specimenwindow.py

Modified: branches/import-from-bzr/specimen/specimenwindow.py
==============================================================================
--- branches/import-from-bzr/specimen/specimenwindow.py	(original)
+++ branches/import-from-bzr/specimen/specimenwindow.py	Tue Jun 17 18:53:24 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]