diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-01-30 16:47:11 +0100 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-01-30 16:47:11 +0100 |
commit | 4704b9a8a3ce000767f2b1e96da2aca3b96ea9cf (patch) | |
tree | cd752db49d899fe00caffaa2eac1bbdc7b7556c4 /src/Gui/CC_gui_functions.py | |
parent | 1672bd412fa0f859687b578a81e1fcb3c2079c80 (diff) | |
download | abrt-4704b9a8a3ce000767f2b1e96da2aca3b96ea9cf.tar.gz abrt-4704b9a8a3ce000767f2b1e96da2aca3b96ea9cf.tar.xz abrt-4704b9a8a3ce000767f2b1e96da2aca3b96ea9cf.zip |
GUI: made report message labels wrap
Diffstat (limited to 'src/Gui/CC_gui_functions.py')
-rw-r--r-- | src/Gui/CC_gui_functions.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py index d92e26f3..26707538 100644 --- a/src/Gui/CC_gui_functions.py +++ b/src/Gui/CC_gui_functions.py @@ -19,6 +19,9 @@ except: from abrt_utils import _, log, log1, log2 +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) @@ -35,8 +38,8 @@ def gui_report_dialog ( report_status_dict, parent_dialog, builderfile = "%s%sdialogs.glade" % (sys.path[0],"/") builder.add_from_file(builderfile) dialog = builder.get_object("ReportDialog") - dialog.set_default_size(400, 50) - dialog.set_resizable(False) + dialog.set_geometry_hints(dialog, min_width=450, min_height=150) + dialog.set_resizable(True) main_hbox = builder.get_object("main_hbox") STATUS = 0 @@ -50,6 +53,7 @@ def gui_report_dialog ( report_status_dict, parent_dialog, plugin_label.set_justify(gtk.JUSTIFY_RIGHT) plugin_label.set_alignment(0, 0) status_label = gtk.Label() + status_label.connect("size-allocate",on_label_resize) status_label.set_max_width_chars(MAX_WIDTH) status_label.set_size_request(400,-1) status_label.set_selectable(True) @@ -75,7 +79,6 @@ def gui_report_dialog ( report_status_dict, parent_dialog, else: status_label.set_text("%s" % report_status_dict[plugin][1]) if len(report_status_dict[plugin][1]) > MAX_WIDTH: - print "setting tooltip for %s" % report_status_dict[plugin][1] status_label.set_tooltip_text(report_status_dict[plugin][1]) status_vbox.pack_start(plugin_status_vbox, fill=True, expand=False) main_hbox.pack_start(status_vbox) |