diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-03-04 14:32:12 +0100 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-03-04 14:32:12 +0100 |
commit | 6b56dbe3c52d8be0f84995b4a584d50a13251890 (patch) | |
tree | 8d504303952116d0473116ef6fb10e8be4aed7b9 /src/Gui | |
parent | a865dbccb2bdbbe8fbd114d757b613c777d22dad (diff) | |
download | abrt-6b56dbe3c52d8be0f84995b4a584d50a13251890.tar.gz abrt-6b56dbe3c52d8be0f84995b4a584d50a13251890.tar.xz abrt-6b56dbe3c52d8be0f84995b4a584d50a13251890.zip |
GUI: removed dead code
Diffstat (limited to 'src/Gui')
-rw-r--r-- | src/Gui/CC_gui_functions.py | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py index 6632ec27..f8f1c9ed 100644 --- a/src/Gui/CC_gui_functions.py +++ b/src/Gui/CC_gui_functions.py @@ -4,14 +4,7 @@ import gtk import pango import subprocess import sys -# url markup is supported from gtk 2.17 so we need to use libsexy -# FIXME: make a new branch for rawhide with gtk 2.17 and remove this -if gtk.gtk_version[1] < 17: - from sexy import UrlLabel as Label - on_url_clicked_signal = "url-activated" -else: - from gtk import Label - on_url_clicked_signal = "activate-link" + try: # we don't want to add dependency to rpm, but if we have it, we can use it import rpm @@ -27,7 +20,7 @@ def tag_urls_in_text(text): lines_dict = {} for index in xrange(len(lines)): lines_dict[index] = lines[index] - + for mark in url_marks: for ix,line in lines_dict.items(): last_mark = line.find(mark) @@ -48,14 +41,6 @@ def tag_urls_in_text(text): def on_label_resize(label, allocation): label.set_size_request(allocation.width,-1) -def on_url_clicked(label, url): - import gnomevfs - file_mimetype = gnomevfs.get_mime_type(url) - default_app = gnomevfs.mime_get_default_application(file_mimetype) - if default_app: - log2("default application:%s", default_app[2]) - subprocess.Popen([default_app[2], url]) - def gui_report_dialog ( report_status_dict, parent_dialog, message_type=gtk.MESSAGE_INFO, widget=None, page=0, broken_widget=None ): @@ -97,7 +82,7 @@ def gui_report_dialog ( report_status_dict, parent_dialog, # if report succeds and gets overwriten by the status message if report_status_dict[plugin][STATUS] == '1': status_label.set_markup(tag_urls_in_text(report_status_dict[plugin][MESSAGE])) - + if len(report_status_dict[plugin][1]) > MAX_WIDTH: status_label.set_tooltip_text(report_status_dict[plugin][1]) status_vbox.pack_start(plugin_status_vbox, fill=True, expand=False) |