[Pkg-bazaar-commits] ./bzr-gtk/unstable r101: Show/hide hidden files should work now.

Szilveszter Farkas (Phanatic) Szilveszter.Farkas at gmail.com
Fri Apr 10 07:49:32 UTC 2009


------------------------------------------------------------
revno: 101
committer: Szilveszter Farkas (Phanatic) <Szilveszter.Farkas at gmail.com>
branch nick: bzr-gtk
timestamp: Fri 2006-10-20 13:39:14 +0200
message:
  Show/hide hidden files should work now.
modified:
  olive/__init__.py
-------------- next part --------------
=== modified file 'olive/__init__.py'
--- a/olive/__init__.py	2006-10-15 17:47:36 +0000
+++ b/olive/__init__.py	2006-10-20 11:39:14 +0000
@@ -318,13 +318,13 @@
                     existing_bzrdir.create_workingtree()
         except errors.AlreadyBranchError, errmsg:
             error_dialog(_('Directory is already a branch'),
-                                     _('The current directory (%s) is already a branch.\nYou can start using it, or initialize another directory.') % errmsg)
+                         _('The current directory (%s) is already a branch.\nYou can start using it, or initialize another directory.') % errmsg)
         except errors.BranchExistsWithoutWorkingTree, errmsg:
             error_dialog(_('Branch without a working tree'),
-                                     _('The current directory (%s)\nis a branch without a working tree.') % errmsg)
+                         _('The current directory (%s)\nis a branch without a working tree.') % errmsg)
         else:
             info_dialog(_('Initialize successful'),
-                                    _('Directory successfully initialized.'))
+                        _('Directory successfully initialized.'))
             self.refresh_right()
         
     def on_menuitem_file_make_directory_activate(self, widget):
@@ -382,6 +382,7 @@
     def on_menuitem_view_show_hidden_files_activate(self, widget):
         """ View/Show hidden files menu handler. """
         self.pref.set_preference('dotted_files', widget.get_active())
+        self.refresh_right()
 
     def on_treeview_left_button_press_event(self, widget, event):
         """ Occurs when somebody right-clicks in the bookmark list. """
@@ -432,6 +433,7 @@
                 m_remove.set_sensitive(False)
                 m_commit.set_sensitive(False)
                 m_diff.set_sensitive(False)
+
             menu.right_context_menu().popup(None, None, None, 0,
                                             event.time)
         
@@ -465,7 +467,7 @@
         self.pref.set_preference('window_x', x)
         self.pref.set_preference('window_y', y)
         self.pref.set_preference('paned_position',
-                                      self.hpaned_main.get_position())
+                                 self.hpaned_main.get_position())
         
         self.pref.write()
         self.window_main.destroy()
@@ -884,6 +886,11 @@
 
     def set_preference(self, option, value):
         """ Set the value of the given option. """
+        if value == True:
+            value = 'yes'
+        elif value == False:
+            value = 'no'
+        
         if self.config.has_section('preferences'):
             self.config.set('preferences', option, value)
         else:
@@ -897,8 +904,7 @@
         """
         if self.config.has_option('preferences', option):
             if kind == 'bool':
-                #return self.config.getboolean('preferences', option)
-                return True
+                return self.config.getboolean('preferences', option)
             elif kind == 'int':
                 return self.config.getint('preferences', option)
             elif kind == 'float':



More information about the Pkg-bazaar-commits mailing list