diff options
Diffstat (limited to 'src/fringlib/fringui.py')
-rw-r--r-- | src/fringlib/fringui.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/fringlib/fringui.py b/src/fringlib/fringui.py index 068fd97..1a5025d 100644 --- a/src/fringlib/fringui.py +++ b/src/fringlib/fringui.py @@ -119,9 +119,10 @@ class UI( gtk.Window ): b = gtk.FileChooserButton('Select a Folder') b.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) b.set_local_only(False) - b.connect("current-folder-changed", lambda w: self.__set_uri(w.get_uri())) + h = b.connect("current-folder-changed", lambda w: self.__set_uri(w.get_uri())) toolbar.pack_start( b, True ) self.filechooserbutton = b + self.filechooserbutton.handler_folderchanged = h # create canvas self.eventbox = gtk.EventBox() @@ -271,12 +272,17 @@ class UI( gtk.Window ): f = self.renderer.get_hotspot_at(event.x, event.y) if f and f.sumlist.children: - #if self.scan_active: + if self.scan_active: # if we are still walking the tree, start a new scan on the path - self.__set_uri(f.path) - #else: + self.open_folder(f.path) + + else: # if we are sure that the sumlist is complete, jump there directly - #self.__list_changed(None,f.sumlist) + self.filechooserbutton.handler_block(self.filechooserbutton.handler_folderchanged) + self.__list_changed(None,f.sumlist) + self.filechooserbutton.set_current_folder_uri(f.path) + self.uri = f.path + self.filechooserbutton.handler_unblock(self.filechooserbutton.handler_folderchanged) def __scroll_event(self, widget, event): if event.direction is gtk.gdk.SCROLL_UP: |