Fix dialogs for crash when canceling via 'x' (#620)
* Fix import dialog for crash when canceling via 'x' Fixes #10607 * Fix 'Make Backup' dialog for crash on 'x' close Issue #10607 * Fix Family Lines/Family Colors/add dialog crash on close with 'x' Issue #10607
This commit is contained in:
parent
9acf512663
commit
8735f8a014
@ -485,9 +485,10 @@ class GrampsImportFileDialog(ManagedWindow):
|
|||||||
# the import_dialog.run() makes it modal, so any change to that
|
# the import_dialog.run() makes it modal, so any change to that
|
||||||
# line would require the ManagedWindow.__init__ to be changed also
|
# line would require the ManagedWindow.__init__ to be changed also
|
||||||
response = import_dialog.run()
|
response = import_dialog.run()
|
||||||
if response in (Gtk.ResponseType.CANCEL,
|
if response == Gtk.ResponseType.CANCEL:
|
||||||
Gtk.ResponseType.DELETE_EVENT):
|
|
||||||
break
|
break
|
||||||
|
elif response == Gtk.ResponseType.DELETE_EVENT:
|
||||||
|
return
|
||||||
elif response == Gtk.ResponseType.OK:
|
elif response == Gtk.ResponseType.OK:
|
||||||
filename = import_dialog.get_filename()
|
filename = import_dialog.get_filename()
|
||||||
if self.check_errors(filename):
|
if self.check_errors(filename):
|
||||||
|
@ -156,7 +156,9 @@ class LastNameDialog(ManagedWindow):
|
|||||||
tree_iter = self.__model.get_iter(path)
|
tree_iter = self.__model.get_iter(path)
|
||||||
surname = self.__model.get_value(tree_iter, 0)
|
surname = self.__model.get_value(tree_iter, 0)
|
||||||
surname_set.add(surname)
|
surname_set.add(surname)
|
||||||
self.close() # ManagedWindow: set the parent dialog to be modal again
|
if response != Gtk.ResponseType.DELETE_EVENT:
|
||||||
|
# ManagedWindow: set the parent dialog to be modal again
|
||||||
|
self.close()
|
||||||
return surname_set
|
return surname_set
|
||||||
|
|
||||||
def build_menu_names(self, obj):
|
def build_menu_names(self, obj):
|
||||||
|
@ -1986,6 +1986,7 @@ class QuickBackup(ManagedWindow): # TODO move this class into its own module
|
|||||||
config.set('paths.quick-backup-directory', path_entry.get_text())
|
config.set('paths.quick-backup-directory', path_entry.get_text())
|
||||||
else:
|
else:
|
||||||
self.uistate.push_message(self.dbstate, _("Backup aborted"))
|
self.uistate.push_message(self.dbstate, _("Backup aborted"))
|
||||||
|
if dbackup != Gtk.ResponseType.DELETE_EVENT:
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
def select_backup_path(self, widget, path_entry):
|
def select_backup_path(self, widget, path_entry):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user