summaryrefslogtreecommitdiffstats
path: root/src/Gui
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2010-01-20 22:03:31 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2010-01-20 22:03:31 +0100
commit9cf1f3c78700736008b1c880f25e66b55a74727e (patch)
tree81bba115a55671bd8f717e168e2c993b21dab206 /src/Gui
parent9fac90866f5936fc507463faade2bc6be56f7182 (diff)
downloadabrt-9cf1f3c78700736008b1c880f25e66b55a74727e.tar.gz
abrt-9cf1f3c78700736008b1c880f25e66b55a74727e.tar.xz
abrt-9cf1f3c78700736008b1c880f25e66b55a74727e.zip
GUI: fixed problem with setting markup for reporter status messages
- now we have fallback to a raw text, so at least we will see the message
Diffstat (limited to 'src/Gui')
-rw-r--r--src/Gui/CCMainWindow.py6
-rw-r--r--src/Gui/CC_gui_functions.py11
2 files changed, 12 insertions, 5 deletions
diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py
index e7853f52..9dffa7a7 100644
--- a/src/Gui/CCMainWindow.py
+++ b/src/Gui/CCMainWindow.py
@@ -230,22 +230,24 @@ class MainWindow():
dump = dumpsListStore.get_value(dumpsListStore.get_iter(path[0]), dumpsListStore.get_n_columns()-1)
#move this to Dump class
if dump.isReported():
+ report_label_raw = _("This crash has been reported:\n")
report_label = _("<b>This crash has been reported:</b>\n")
# plugin message follows, but at least in case of kerneloops,
# it is not informative (no URL to the report)
for message in dump.getMessage().split(';'):
- if message:
+ if message:
message_clean = message.strip()
if "http" in message_clean[0:5] or "file:///"[0:8] in message_clean:
report_message = "<a href=\"%s\">%s</a>" % (message_clean, message_clean)
else:
report_message = message_clean
report_label += "%s\n" % report_message
+ report_label_raw += "%s\n" % message_clean
log2("setting markup '%s'", report_label)
+ self.wTree.get_widget("lReported").set_text(report_label_raw)
self.wTree.get_widget("lReported").set_markup(report_label)
else:
self.wTree.get_widget("lReported").set_markup(_("<b>Not reported!</b>"))
- lPackage = self.wTree.get_widget("lPackage")
def on_bDelete_clicked(self, button, treeview):
dumpsListStore, path = self.dlist.get_selection().get_selected_rows()
diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py
index a9c47faf..e2260210 100644
--- a/src/Gui/CC_gui_functions.py
+++ b/src/Gui/CC_gui_functions.py
@@ -56,9 +56,14 @@ def gui_report_dialog ( report_status_dict, parent_dialog,
status_hbox.pack_start(plugin_label, expand=False)
status_hbox.pack_start(status_label, expand=False)
# 0 means not succesfull
- if report_status_dict[plugin][0] == '0':
- status_label.set_markup("<span foreground='red'>%s</span>" % report_status_dict[plugin][1])
- elif report_status_dict[plugin][0] == '1':
+ #if report_status_dict[plugin][0] == '0':
+ # this first one is actually a fallback to set at least
+ # a raw text in case when set_markup() fails
+ status_label.set_text(report_status_dict[plugin][1])
+ status_label.set_markup("<span foreground='red'>%s</span>" % report_status_dict[plugin][1])
+ # if the report was not succesful then this won't pass so this runs only
+ # if report succeds and gets overwriten by the status message
+ if report_status_dict[plugin][0] == '1':
if "http" in report_status_dict[plugin][1][0:4] or "file://" in report_status_dict[plugin][1][0:7]:
status_label.set_markup("<a href=\"%s\">%s</a>" % (report_status_dict[plugin][1], report_status_dict[plugin][1]))
# FIXME: make a new branch for rawhide with gtk 2.17 and remove this