Fix a couple of other transient parent errors.

This commit is contained in:
Stephen Boddy 2016-12-12 20:45:50 +01:00
parent e11335e0cb
commit 2546e724c9
3 changed files with 7 additions and 0 deletions

View File

@ -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:"))

View File

@ -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()

View File

@ -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)