/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/__init__.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-09-29 22:22:20 UTC
  • mto: (0.14.3 main)
  • mto: This revision was merged to the branch mainline in revision 84.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060929222220-1cebaa642fdda8f1
Some further cleanups. More to come.

Show diffs side-by-side

added added

removed removed

Lines of Context:
366
366
        self.refresh_left()
367
367
        # Refresh the right pane
368
368
        self.refresh_right()
369
 
 
370
369
   
371
370
    def on_menuitem_view_show_hidden_files_activate(self, widget):
372
371
        """ View/Show hidden files menu handler. """
379
378
            if self.get_selected_left() == None:
380
379
                return
381
380
 
382
 
            self.menu.left_context_menu().popup(None, None, None, 0,
383
 
                                                event.time)
 
381
            # Create a menu
 
382
            from menu import OliveMenu
 
383
            menu = OliveMenu(self.get_path(), self.get_selected_left())
 
384
            
 
385
            menu.left_context_menu().popup(None, None, None, 0,
 
386
                                           event.time)
 
387
            
 
388
            # Bookmarks might have changed
 
389
            self.pref.read()
384
390
        
385
391
    def on_treeview_left_row_activated(self, treeview, path, view_column):
386
392
        """ Occurs when somebody double-clicks or enters an item in the
785
791
        self.config = ConfigParser.RawConfigParser()
786
792
        
787
793
        # Load the configuration
788
 
        if sys.platform == 'win32':
789
 
            # Windows - no dotted files
790
 
            self.config.read([os.path.expanduser('~/olive.conf')])
791
 
        else:
792
 
            self.config.read([os.path.expanduser('~/.olive.conf')])
793
 
 
794
 
 
 
794
        self.read()
795
795
        
796
796
    def _get_default(self, option):
797
797
        """ Get the default option for a preference. """
807
807
        # First write out the changes
808
808
        self.write()
809
809
        # Then load the configuration again
 
810
        self.read()
 
811
 
 
812
    def read(self):
 
813
        """ Just read the configuration. """
810
814
        if sys.platform == 'win32':
811
815
            # Windows - no dotted files
812
816
            self.config.read([os.path.expanduser('~/olive.conf')])
813
817
        else:
814
818
            self.config.read([os.path.expanduser('~/.olive.conf')])
815
 
 
 
819
    
816
820
    def write(self):
817
821
        """ Write the configuration to the appropriate files. """
818
822
        if sys.platform == 'win32':