diff options
Diffstat (limited to 'pyanaconda/ui/gui/__init__.py')
-rw-r--r-- | pyanaconda/ui/gui/__init__.py | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py index 638772bdb..fa80e6de7 100644 --- a/pyanaconda/ui/gui/__init__.py +++ b/pyanaconda/ui/gui/__init__.py @@ -24,7 +24,7 @@ import meh.ui.gui from gi.repository import Gdk from pyanaconda.ui import UserInterface, common -from pyanaconda.ui.gui.utils import enlightbox, gdk_threaded +from pyanaconda.ui.gui.utils import enlightbox, gtk_thread_wait import gettext _ = lambda x: gettext.ldgettext("anaconda", x) @@ -117,37 +117,36 @@ class GraphicalUserInterface(UserInterface): ### ### MESSAGE HANDLING METHODS ### + @gtk_thread_wait def showError(self, message): from gi.repository import AnacondaWidgets, Gtk - - with gdk_threaded(): - dlg = Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL, - message_type=Gtk.MessageType.ERROR, - buttons=Gtk.ButtonsType.NONE, - message_format=message) - dlg.add_button(_("_Exit Installer"), 0) - - with enlightbox(self._actions[0].window, dlg): - dlg.run() - dlg.destroy() - + dlg = Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL, + message_type=Gtk.MessageType.ERROR, + buttons=Gtk.ButtonsType.NONE, + message_format=message) + dlg.add_button(_("_Exit Installer"), 0) + + with enlightbox(self._actions[0].window, dlg): + dlg.run() + dlg.destroy() + + @gtk_thread_wait def showYesNoQuestion(self, message): from gi.repository import AnacondaWidgets, Gtk + dlg = Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL, + message_type=Gtk.MessageType.QUESTION, + buttons=Gtk.ButtonsType.NONE, + message_format=message) + dlg.add_buttons(_("_No"), 0, _("_Yes"), 1) + dlg.set_default_response(1) - with gdk_threaded(): - dlg = Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL, - message_type=Gtk.MessageType.QUESTION, - buttons=Gtk.ButtonsType.NONE, - message_format=message) - dlg.add_buttons(_("_No"), 0, _("_Yes"), 1) - dlg.set_default_response(1) - - with enlightbox(self._actions[0].window, dlg): - rc = dlg.run() - dlg.destroy() + with enlightbox(self._actions[0].window, dlg): + rc = dlg.run() + dlg.destroy() return bool(rc) + def mainExceptionWindow(self, text, exn_file, *args, **kwargs): from gi.repository import Gtk, AnacondaWidgets |