diff options
| author | jvoisin | 2013-06-30 21:38:09 +0200 |
|---|---|---|
| committer | jvoisin | 2013-06-30 21:38:09 +0200 |
| commit | 90d279d2f2f97fb1b8ebbe4b6dc30f09e9e78c5e (patch) | |
| tree | 48347b0048129ccf0ec4291d41ab951befd07f02 /mat-gui | |
| parent | 6d30074dbcaca6c425d02c4b043b5b56dd3cd259 (diff) | |
More close/hide-related improvements
Diffstat (limited to 'mat-gui')
| -rwxr-xr-x | mat-gui | 16 |
1 files changed, 7 insertions, 9 deletions
| @@ -171,8 +171,8 @@ class GUI(object): | |||
| 171 | popup_metadata = self.builder.get_object('MetadataPopup') | 171 | popup_metadata = self.builder.get_object('MetadataPopup') |
| 172 | popup_metadata.set_title(_("%s's metadata") % self.liststore[row][0].file.basename) | 172 | popup_metadata.set_title(_("%s's metadata") % self.liststore[row][0].file.basename) |
| 173 | popup_metadata.show_all() | 173 | popup_metadata.show_all() |
| 174 | if not popup_metadata.run(): # Close | 174 | popup_metadata.run() |
| 175 | popup_metadata.hide() | 175 | popup_metadata.hide() |
| 176 | 176 | ||
| 177 | def cb_about_popup(self, button): | 177 | def cb_about_popup(self, button): |
| 178 | ''' About popup ''' | 178 | ''' About popup ''' |
| @@ -194,8 +194,8 @@ class GUI(object): | |||
| 194 | ''' Show the "supported formats" popup''' | 194 | ''' Show the "supported formats" popup''' |
| 195 | dialog = self.builder.get_object('SupportedWindow') | 195 | dialog = self.builder.get_object('SupportedWindow') |
| 196 | dialog.show_all() | 196 | dialog.show_all() |
| 197 | if not dialog.run(): | 197 | dialog.run() |
| 198 | dialog.hide() | 198 | dialog.hide() |
| 199 | 199 | ||
| 200 | def cb_clear_list(self, _): | 200 | def cb_clear_list(self, _): |
| 201 | ''' Clear the file list ''' | 201 | ''' Clear the file list ''' |
| @@ -215,7 +215,6 @@ class GUI(object): | |||
| 215 | (Gtk.STOCK_OK, 0)) | 215 | (Gtk.STOCK_OK, 0)) |
| 216 | dialog.connect('delete-event', self.cb_hide_widget) | 216 | dialog.connect('delete-event', self.cb_hide_widget) |
| 217 | dialog.set_resizable(False) | 217 | dialog.set_resizable(False) |
| 218 | dialog.set_deletable(False) | ||
| 219 | hbox = Gtk.HBox() | 218 | hbox = Gtk.HBox() |
| 220 | dialog.get_content_area().pack_start(hbox, False, False, 0) | 219 | dialog.get_content_area().pack_start(hbox, False, False, 0) |
| 221 | 220 | ||
| @@ -246,7 +245,7 @@ non-anonymised) file to output archive')) | |||
| 246 | file[0].file.add2archive = self.add2archive | 245 | file[0].file.add2archive = self.add2archive |
| 247 | if file[0].file.mime.startswith('pdf'): | 246 | if file[0].file.mime.startswith('pdf'): |
| 248 | file[0].file.pdf_quality = self.pdf_quality | 247 | file[0].file.pdf_quality = self.pdf_quality |
| 249 | dialog.destroy() | 248 | dialog.hide() |
| 250 | 249 | ||
| 251 | def cb_drag_data_received(self, widget, context, | 250 | def cb_drag_data_received(self, widget, context, |
| 252 | x, y, selection, target_type, timestamp): | 251 | x, y, selection, target_type, timestamp): |
| @@ -291,7 +290,7 @@ non-anonymised) file to output archive')) | |||
| 291 | ''' | 290 | ''' |
| 292 | iterator = self.treeview.get_selection().get_selected_rows()[1] | 291 | iterator = self.treeview.get_selection().get_selected_rows()[1] |
| 293 | if not iterator: # if nothing is selected : select everything | 292 | if not iterator: # if nothing is selected : select everything |
| 294 | iterator = xrange(len(self.liststore)) | 293 | iterator = range(len(self.liststore)) |
| 295 | task = func(iterator) # launch func() in an asynchrone way | 294 | task = func(iterator) # launch func() in an asynchrone way |
| 296 | GObject.idle_add(task.next) | 295 | GObject.idle_add(task.next) |
| 297 | 296 | ||
| @@ -329,8 +328,7 @@ non-anonymised) file to output archive')) | |||
| 329 | that he want to process | 328 | that he want to process |
| 330 | ''' | 329 | ''' |
| 331 | dialog = Gtk.Dialog(title=_('Not-supported'), parent=self.window, | 330 | dialog = Gtk.Dialog(title=_('Not-supported'), parent=self.window, |
| 332 | flags=0, buttons=(Gtk.STOCK_OK, 0)) | 331 | flags=Gtk.DialogFlags.MODAL, buttons=(Gtk.STOCK_OK, 0)) |
| 333 | dialog.set_modal(True) | ||
| 334 | dialog.set_size_request(220, 180) | 332 | dialog.set_size_request(220, 180) |
| 335 | vbox = Gtk.VBox(spacing=5) | 333 | vbox = Gtk.VBox(spacing=5) |
| 336 | sc = Gtk.ScrolledWindow() | 334 | sc = Gtk.ScrolledWindow() |
