Run all pending GTK events in the file traversal loops in the image
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 1 Aug 2004 18:05:10 +0000 (18:05 +0000)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 1 Aug 2004 18:05:10 +0000 (18:05 +0000)
registration and handling dialogs. On Windows, the file counters
didn't get updated properly otherwise.

src/gkofoto/handleimagesdialog.py
src/gkofoto/registerimagesdialog.py

index 3a72b5b..5fb5fe3 100644 (file)
@@ -73,7 +73,8 @@ class HandleImagesDialog(gtk.FileSelection):
                     unknownFilesCount.set_text(str(unknownFiles))
             investigatedFiles += 1
             investigatedFilesCount.set_text(str(investigatedFiles))
-            gtk.main_iteration()
+            while gtk.events_pending():
+                gtk.main_iteration()
 
         okButton.set_sensitive(True)
         handleImagesProgressDialog.run()
index 4c161cb..a86599c 100644 (file)
@@ -51,7 +51,8 @@ class RegisterImagesDialog(gtk.FileSelection):
                 nonImagesCount.set_text(str(nonImages))
             filesInvestigated += 1
             filesInvestigatedCount.set_text(str(filesInvestigated))
-            gtk.main_iteration()
+            while gtk.events_pending():
+                gtk.main_iteration()
         if self.__albumToAddTo:
             children = list(self.__albumToAddTo.getChildren())
             self.__albumToAddTo.setChildren(children + images)