~ubuntu-branches/ubuntu/maverick/awn-extras-applets/maverick

« back to all changes in this revision

Viewing changes to applets/maintained/file-browser-launcher/file-browser-launcher.py

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2010-04-11 22:38:55 UTC
  • mto: (2.2.5 sid)
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: james.westby@ubuntu.com-20100411223855-bb0ovgd1kerhtyv8
Tags: upstream-0.4.0
ImportĀ upstreamĀ versionĀ 0.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
      self.__bookmarks_monitor = gio.File(bookmarks_file).monitor_file()
159
159
 
160
160
      def bookmarks_changed_cb(monitor, file, other_file, event):
161
 
        if event == gio.FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
 
161
        if event in (gio.FILE_MONITOR_EVENT_CHANGES_DONE_HINT, gio.FILE_MONITOR_EVENT_CREATED,
 
162
          gio.FILE_MONITOR_EVENT_DELETED):
162
163
          #Refresh menu to re-initialize the widget
163
164
          self.do_gio_places()
164
165
 
477
478
  def do_bookmarks(self):
478
479
    if self.show_bookmarks == 2:
479
480
      #Get list of bookmarks
480
 
      self.bmarks2 = open(os.path.expanduser('~/.gtk-bookmarks'))
481
 
      self.bmarks = self.bmarks2.readlines()
482
 
      self.bmarks2.close()
 
481
      try:
 
482
        self.bmarks2 = open(os.path.expanduser('~/.gtk-bookmarks'))
 
483
        self.bmarks = self.bmarks2.readlines()
 
484
        self.bmarks2.close()
 
485
      except:
 
486
        self.bmarks = []
483
487
 
484
488
      if gio:
485
489
        self.paths = []
897
901
    def invalidate_docklet(widget, applet):
898
902
      applet.docklet_visible = False
899
903
      applet.docklet = None
900
 
      applet.docklet_play_pause = None
901
904
    docklet.connect("destroy", invalidate_docklet, self)
902
905
 
903
906
    docklet_position = docklet.get_pos_type()