From 36e5e9e6e3c9a60ecfa52709bce819ae136f1163 Mon Sep 17 00:00:00 2001 From: Frederic Back Date: Sun, 24 Sep 2006 12:01:25 +0000 Subject: * Correct bug: Busy state was not reset correctly when opening parent folder git-svn-id: file:///home/lennart/svn/public/fring/trunk@22 d0d2c35f-0a1e-0410-abeb-dabff30a67ee --- src/fringlib/fringui.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fringlib/fringui.py b/src/fringlib/fringui.py index 5e13794..541f4ad 100644 --- a/src/fringlib/fringui.py +++ b/src/fringlib/fringui.py @@ -155,7 +155,7 @@ class UI( gtk.Window ): self.eventbox.connect("size-allocate",self.__on_resize) self.connect("delete_event", self.close) - self.__show_busy_cursor(1) + def open_folder(self,path): print "open",path @@ -235,6 +235,7 @@ class UI( gtk.Window ): self.walker.stop() if path is None: return self.walker.walk(path); + self.__show_busy_cursor(1) def __selectfolder(self,widget): """ Open a dialog to select a folder """ @@ -306,13 +307,14 @@ class UI( gtk.Window ): def __show_busy_cursor(self, value): if self.busy_cursor <= 0 and self.busy_cursor+value >= 0: - self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) + if self.window: self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) self.label.set_markup("Busy...") elif self.busy_cursor > 0 and self.busy_cursor+value <= 0: - self.window.set_cursor(None) + if self.window: self.window.set_cursor(None) self.label.set_text("Ready.") self.busy_cursor += value + print "busy state:",self.busy_cursor -- cgit