summaryrefslogtreecommitdiffstats
path: root/src/Gui
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2010-06-16 11:05:37 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2010-06-16 11:05:37 +0200
commita972a2aba8dc240eec4eccbff1e660a6dabfa86f (patch)
treeecdabe612ce44fe4589d295290aaa14b1a0631a0 /src/Gui
parent91e85cf829250429a2437076e9e165b4a953e5ac (diff)
downloadabrt-a972a2aba8dc240eec4eccbff1e660a6dabfa86f.tar.gz
abrt-a972a2aba8dc240eec4eccbff1e660a6dabfa86f.tar.xz
abrt-a972a2aba8dc240eec4eccbff1e660a6dabfa86f.zip
GUI: fixed exception when there is no configure dialog for plugin rhbz#603745
- gui now complains about the missing dialog and won't throw and exception
Diffstat (limited to 'src/Gui')
-rw-r--r--src/Gui/CC_gui_functions.py5
-rw-r--r--src/Gui/CReporterAssistant.py7
-rw-r--r--src/Gui/PluginSettingsUI.py5
3 files changed, 13 insertions, 4 deletions
diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py
index 2365720a..e0d68db3 100644
--- a/src/Gui/CC_gui_functions.py
+++ b/src/Gui/CC_gui_functions.py
@@ -144,9 +144,8 @@ def gui_error_message ( message, parent_dialog=None,
dialog = gtk.MessageDialog( parent_dialog,
gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT,
- message_type, gtk.BUTTONS_OK,
- message )
-
+ message_type, gtk.BUTTONS_OK, message )
+ dialog.set_markup(message)
if parent_dialog:
dialog.set_position (gtk.WIN_POS_CENTER_ON_PARENT)
dialog.set_transient_for(parent_dialog)
diff --git a/src/Gui/CReporterAssistant.py b/src/Gui/CReporterAssistant.py
index ae392a46..10d68662 100644
--- a/src/Gui/CReporterAssistant.py
+++ b/src/Gui/CReporterAssistant.py
@@ -181,7 +181,12 @@ class ReporterAssistant():
self.pBarWindow.hide()
def on_config_plugin_clicked(self, button, parent, plugin, image):
- ui = PluginSettingsUI(plugin, parent=parent)
+ try:
+ ui = PluginSettingsUI(plugin, parent=parent)
+ except Exception, ex:
+ gui_error_message(str(ex))
+ return
+
ui.hydrate()
response = ui.run()
if response == gtk.RESPONSE_APPLY:
diff --git a/src/Gui/PluginSettingsUI.py b/src/Gui/PluginSettingsUI.py
index 8c24fde3..aa8f5310 100644
--- a/src/Gui/PluginSettingsUI.py
+++ b/src/Gui/PluginSettingsUI.py
@@ -21,6 +21,11 @@ class PluginSettingsUI():
else:
# we shouldn't get here, but just to be safe
log1("No UI for plugin %s" % pluginfo)
+ raise Exception(_("No UI for the plugin <b>%s</b>, this is probably a bug.\n"
+ "Please report it at "
+ "<a href=\"https://fedorahosted.org/abrt/newticket\">"
+ "https://fedorahosted.org/abrt/newticket</a>") % pluginfo)
+ return
if parent:
self.dialog.set_position(gtk.WIN_POS_CENTER_ON_PARENT)