OSDN Git Service

Hide progress bar on idle.
authorAiwota Programmer <aiwotaprog@tetteke.tk>
Fri, 22 Sep 2006 00:58:44 +0000 (09:58 +0900)
committerAiwota Programmer <aiwotaprog@tetteke.tk>
Fri, 22 Sep 2006 00:58:44 +0000 (09:58 +0900)
src/FukuiNoNamari/board_window.py

index 6383d18..77f3f73 100644 (file)
@@ -207,14 +207,22 @@ class WinWrap(winwrapbase.WinWrapBase, board_data.BoardData):
             new_list = conv_dictdict_to_listdict(datalist)
             gobject.idle_add(self.update_datastore, new_list)
 
+        def on_end():
+            def reset_progress():
+                self.progress.set_fraction(0.0)
+                self.progress.hide()
+            gobject.idle_add(reset_progress)
+
         sbj_path = misc.get_board_subjecttxt_path(self.bbs_type)
         sbj_exists = os.path.exists(sbj_path)
 
+        self.progress.show()
+
         if update or not sbj_exists:
-            t = ThreadInvoker(lambda *args: -1, get_remote)
+            t = ThreadInvoker(on_end, get_remote)
             t.start()
         else:
-            t = ThreadInvoker(lambda *args: -1, load_local)
+            t = ThreadInvoker(on_end, load_local)
             t.start()
 
     def save(self):