From 2546e724c9f27d3ed14572fad960ee27cc556d39 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Mon, 12 Dec 2016 20:45:50 +0100 Subject: [PATCH] Fix a couple of other transient parent errors. --- terminatorlib/plugins/custom_commands.py | 4 ++++ terminatorlib/plugins/logger.py | 2 ++ terminatorlib/plugins/terminalshot.py | 1 + 3 files changed, 7 insertions(+) diff --git a/terminatorlib/plugins/custom_commands.py b/terminatorlib/plugins/custom_commands.py index 6ded9bcc..bee390f7 100755 --- a/terminatorlib/plugins/custom_commands.py +++ b/terminatorlib/plugins/custom_commands.py @@ -125,6 +125,7 @@ class CustomCommandsMenu(plugin.MenuItem): _("_OK"), Gtk.ResponseType.ACCEPT ) ) + dbox.set_transient_for(widget.get_toplevel()) icon_theme = Gtk.IconTheme.get_default() if icon_theme.lookup_icon('terminator-custom-commands', 48, 0): @@ -214,11 +215,13 @@ class CustomCommandsMenu(plugin.MenuItem): hbox.pack_start(button_box, False, True, 0) + self.dbox = dbox dbox.show_all() res = dbox.run() if res == Gtk.ResponseType.ACCEPT: self.update_cmd_list(store) self._save_config() + del(self.dbox) dbox.destroy() return @@ -271,6 +274,7 @@ class CustomCommandsMenu(plugin.MenuItem): _("_OK"), Gtk.ResponseType.ACCEPT ) ) + dialog.set_transient_for(self.dbox) table = Gtk.Table(3, 2) label = Gtk.Label(label=_("Enabled:")) diff --git a/terminatorlib/plugins/logger.py b/terminatorlib/plugins/logger.py index 25cb3c50..86ad2863 100644 --- a/terminatorlib/plugins/logger.py +++ b/terminatorlib/plugins/logger.py @@ -66,6 +66,7 @@ class Logger(plugin.MenuItem): savedialog = Gtk.FileChooserDialog(title=_("Save Log File As"), action=self.dialog_action, buttons=self.dialog_buttons) + savedialog.set_transient_for(_widget.get_toplevel()) savedialog.set_do_overwrite_confirmation(True) savedialog.set_local_only(True) savedialog.show_all() @@ -90,6 +91,7 @@ class Logger(plugin.MenuItem): e = sys.exc_info()[1] error = Gtk.MessageDialog(None, Gtk.DialogFlags.MODAL, Gtk.MessageType.ERROR, Gtk.ButtonsType.OK, e.strerror) + error.set_transient_for(savedialog) error.run() error.destroy() savedialog.destroy() diff --git a/terminatorlib/plugins/terminalshot.py b/terminatorlib/plugins/terminalshot.py index 8974ef86..a0e880df 100755 --- a/terminatorlib/plugins/terminalshot.py +++ b/terminatorlib/plugins/terminalshot.py @@ -37,6 +37,7 @@ class TerminalShot(plugin.MenuItem): savedialog = Gtk.FileChooserDialog(title=_("Save image"), action=self.dialog_action, buttons=self.dialog_buttons) + savedialog.set_transient_for(_widget.get_toplevel()) savedialog.set_do_overwrite_confirmation(True) savedialog.set_local_only(True)