Remove waits for pending events from image opening functions
It seems to not be required and causes issues when opening files from the
command line.
Thomas Ross
3 years ago
5946 | 5946 | if os.path.isdir(item): |
5947 | 5947 | self.searching_for_images = True |
5948 | 5948 | self.update_statusbar() |
5949 | if not self.closing_app: | |
5950 | while Gtk.events_pending(): | |
5951 | Gtk.main_iteration() | |
5952 | 5949 | first_image = "" |
5953 | 5950 | first_image_found = False |
5954 | 5951 | first_image_loaded = False |
6078 | 6075 | second_image = self.image_list[itemnum] |
6079 | 6076 | self.set_go_navigation_sensitivities(True) |
6080 | 6077 | go_buttons_enabled = True |
6081 | while Gtk.events_pending(): | |
6082 | Gtk.main_iteration() | |
6083 | 6078 | if not first_image_found: |
6084 | 6079 | first_image_found = True |
6085 | 6080 | first_image = self.image_list[itemnum] |
6110 | 6105 | ) |
6111 | 6106 | self.image_loaded = True |
6112 | 6107 | first_image_loaded_successfully = True |
6113 | if not self.closing_app: | |
6114 | while Gtk.events_pending(): | |
6115 | Gtk.main_iteration() | |
6116 | 6108 | except: |
6117 | 6109 | print(traceback.format_exc(), file=sys.stderr) |
6118 | 6110 | if first_image_came_from_dir: |
6146 | 6138 | self.do_image_list_stuff(first_image, second_image) |
6147 | 6139 | self.add_folderlist_images(folderlist, go_buttons_enabled) |
6148 | 6140 | self.update_title() |
6149 | if not self.closing_app: | |
6150 | while Gtk.events_pending(): | |
6151 | Gtk.main_iteration() | |
6152 | 6141 | if not first_image_loaded_successfully: |
6153 | 6142 | self.image_load_failed(False, init_image) |
6154 | 6143 | self.searching_for_images = False |
6195 | 6184 | return False |
6196 | 6185 | for item2 in os.listdir(item): |
6197 | 6186 | if not self.closing_app and not self.stop_now: |
6198 | while Gtk.events_pending(): | |
6199 | Gtk.main_iteration() | |
6200 | 6187 | item2 = item + os.sep + item2 |
6201 | 6188 | item_fullpath2 = os.path.abspath(item2) |
6202 | 6189 | if ( |