diff options
| author | jvoisin | 2013-06-30 21:15:48 +0200 |
|---|---|---|
| committer | jvoisin | 2013-06-30 21:15:48 +0200 |
| commit | 6d30074dbcaca6c425d02c4b043b5b56dd3cd259 (patch) | |
| tree | 0ff032636204f4bee6e4b7840c5001910c96844e /mat-gui | |
| parent | 5867a556de06385c97a4fc9d64a4f4bd0bbef997 (diff) | |
Fix popus closing
Diffstat (limited to 'mat-gui')
| -rwxr-xr-x | mat-gui | 13 |
1 files changed, 11 insertions, 2 deletions
| @@ -102,6 +102,13 @@ class GUI(object): | |||
| 102 | targets.add_uri_targets(80) | 102 | targets.add_uri_targets(80) |
| 103 | self.treeview.drag_dest_set_target_list(targets) | 103 | self.treeview.drag_dest_set_target_list(targets) |
| 104 | 104 | ||
| 105 | def cb_hide_widget(self, widget, _): | ||
| 106 | ''' This function is a little hack to hide instead | ||
| 107 | of close re-usable popups, like supported-fileformats, | ||
| 108 | popup-metadata, ...''' | ||
| 109 | widget.hide() | ||
| 110 | return False | ||
| 111 | |||
| 105 | def cb_update_supported_popup(self, window): | 112 | def cb_update_supported_popup(self, window): |
| 106 | ''' | 113 | ''' |
| 107 | Fill GtkEntries of the supported_format_popups | 114 | Fill GtkEntries of the supported_format_popups |
| @@ -206,6 +213,7 @@ class GUI(object): | |||
| 206 | ''' Preferences popup ''' | 213 | ''' Preferences popup ''' |
| 207 | dialog = Gtk.Dialog(_('Preferences'), self.window, 0, | 214 | dialog = Gtk.Dialog(_('Preferences'), self.window, 0, |
| 208 | (Gtk.STOCK_OK, 0)) | 215 | (Gtk.STOCK_OK, 0)) |
| 216 | dialog.connect('delete-event', self.cb_hide_widget) | ||
| 209 | dialog.set_resizable(False) | 217 | dialog.set_resizable(False) |
| 210 | dialog.set_deletable(False) | 218 | dialog.set_deletable(False) |
| 211 | hbox = Gtk.HBox() | 219 | hbox = Gtk.HBox() |
| @@ -322,6 +330,7 @@ non-anonymised) file to output archive')) | |||
| 322 | ''' | 330 | ''' |
| 323 | dialog = Gtk.Dialog(title=_('Not-supported'), parent=self.window, | 331 | dialog = Gtk.Dialog(title=_('Not-supported'), parent=self.window, |
| 324 | flags=0, buttons=(Gtk.STOCK_OK, 0)) | 332 | flags=0, buttons=(Gtk.STOCK_OK, 0)) |
| 333 | dialog.set_modal(True) | ||
| 325 | dialog.set_size_request(220, 180) | 334 | dialog.set_size_request(220, 180) |
| 326 | vbox = Gtk.VBox(spacing=5) | 335 | vbox = Gtk.VBox(spacing=5) |
| 327 | sc = Gtk.ScrolledWindow() | 336 | sc = Gtk.ScrolledWindow() |
| @@ -350,8 +359,8 @@ non-anonymised) file to output archive')) | |||
| 350 | treeview.append_column(column) | 359 | treeview.append_column(column) |
| 351 | 360 | ||
| 352 | dialog.show_all() | 361 | dialog.show_all() |
| 353 | if not dialog.run(): # Ok button | 362 | dialog.run() |
| 354 | dialog.destroy() | 363 | dialog.destroy() |
| 355 | 364 | ||
| 356 | def __mat_check(self, iterator): | 365 | def __mat_check(self, iterator): |
| 357 | ''' Check elements in iterator are clean ''' | 366 | ''' Check elements in iterator are clean ''' |
