From 907d4c16bd6326f5682b8cbb583a3607afee798d Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Tue, 3 Nov 2009 15:49:54 +0100 Subject: GUI: small fix to make only valid urls clickable --- src/Gui/CCMainWindow.py | 2 +- src/Gui/CC_gui_functions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Gui') diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py index 926ba9ef..d3a3abd0 100644 --- a/src/Gui/CCMainWindow.py +++ b/src/Gui/CCMainWindow.py @@ -236,7 +236,7 @@ class MainWindow(): report_label = _("This crash has been reported, you can find the report(s) at:\n") for message in dump.getMessage().split('\n'): if message: - if "http" in message or "file:///" in message: + if "http" in message[0:5] or "file:///"[0:8] in message: message = "%s" % (message, message) report_label += "%s\n" % message self.wTree.get_widget("lReported").set_markup(report_label) diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py index c1cc7239..a2ad70f6 100644 --- a/src/Gui/CC_gui_functions.py +++ b/src/Gui/CC_gui_functions.py @@ -54,7 +54,7 @@ def gui_report_dialog ( report_status_dict, parent_dialog, if report_status_dict[plugin][0] == '0': status_label.set_markup("%s" % report_status_dict[plugin][1]) elif 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:4]: + if "http" in report_status_dict[plugin][1][0:4] or "file://" in report_status_dict[plugin][1][0:7]: status_label.set_markup("%s" % (report_status_dict[plugin][1], report_status_dict[plugin][1])) # FIXME: make a new branch for rawhide with gtk 2.17 and remove this if gtk.gtk_version[1] < 17: -- cgit