diff options
| author | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-02-15 18:09:55 +0100 |
|---|---|---|
| committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-02-15 18:09:55 +0100 |
| commit | d93fc21129f08a149d7a1bb042179942485fcedb (patch) | |
| tree | 72ec4eb636b15d8e2385f068881f86a6aa88db2b /src/Gui | |
| parent | deef343e0372b0a167f1d35f9ef9d18694aa9a0e (diff) | |
| parent | 3a0729e697b24d4d30e3a1a008f83ca605aaad5d (diff) | |
| download | abrt-d93fc21129f08a149d7a1bb042179942485fcedb.tar.gz abrt-d93fc21129f08a149d7a1bb042179942485fcedb.tar.xz abrt-d93fc21129f08a149d7a1bb042179942485fcedb.zip | |
Merge branch 'master' into bugzilla
Diffstat (limited to 'src/Gui')
| -rw-r--r-- | src/Gui/CCMainWindow.py | 43 | ||||
| -rw-r--r-- | src/Gui/CCReporterDialog.py | 10 | ||||
| -rw-r--r-- | src/Gui/CC_gui_functions.py | 3 | ||||
| -rw-r--r-- | src/Gui/PluginsSettingsDialog.py | 16 | ||||
| -rw-r--r-- | src/Gui/ccgui.glade | 4 | ||||
| -rw-r--r-- | src/Gui/report.glade | 4 |
6 files changed, 47 insertions, 33 deletions
diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py index 0d9b0a2..dfcfaf1 100644 --- a/src/Gui/CCMainWindow.py +++ b/src/Gui/CCMainWindow.py @@ -2,6 +2,7 @@ import sys import pwd import getopt +from glib import markup_escape_text from abrt_utils import _, init_logging, log, log1, log2 import gobject @@ -64,12 +65,18 @@ class MainWindow(): #init the dumps treeview self.dlist = self.wTree.get_widget("tvDumps") #rows of items with: - #icon, package_name, application, date, crash_rate, user, is_reported, ?object? - self.dumpsListStore = gtk.ListStore(gtk.gdk.Pixbuf, str,str,str,str,str,bool, object) - # set filter - modelfilter = self.dumpsListStore.filter_new() - modelfilter.set_visible_func(self.filter_dumps, None) - self.dlist.set_model(modelfilter) + ICON_COL = 0 + PACKAGE_COL = 1 + APPLICATION_COL = 2 + TIME_STR_COL = 3 + CRASH_RATE_COL = 4 + USER_COL = 5 + IS_REPORTED_COL = 6 + UNIX_TIME_COL = 7 + DUMP_OBJECT_COL = 8 + #icon, package_name, application, date, crash_rate, user, is_reported, time_in_sec ?object? + self.dumpsListStore = gtk.ListStore(gtk.gdk.Pixbuf, str,str,str,str,str,bool, int, object) + self.dlist.set_model(self.dumpsListStore) # add pixbuff separatelly icon_column = gtk.TreeViewColumn(_("Icon")) icon_column.cell = gtk.CellRendererPixbuf() @@ -78,13 +85,17 @@ class MainWindow(): icon_column.pack_start(icon_column.cell, False) icon_column.set_attributes(icon_column.cell, pixbuf=(n-1), cell_background_set=6) # =============================================== - columns = [None]*4 - columns[0] = gtk.TreeViewColumn(_("Package")) - columns[1] = gtk.TreeViewColumn(_("Application")) - columns[2] = gtk.TreeViewColumn(_("Date")) - columns[3] = gtk.TreeViewColumn(_("Crash count")) - column = gtk.TreeViewColumn(_("User")) - columns.append(column) + columns = [] + columns.append(gtk.TreeViewColumn(_("Package"))) + columns[-1].set_sort_column_id(PACKAGE_COL) + columns.append(gtk.TreeViewColumn(_("Application"))) + columns[-1].set_sort_column_id(APPLICATION_COL) + columns.append(gtk.TreeViewColumn(_("Date"))) + columns[-1].set_sort_column_id(UNIX_TIME_COL) + columns.append(gtk.TreeViewColumn(_("Crash count"))) + columns[-1].set_sort_column_id(CRASH_RATE_COL) + columns.append(gtk.TreeViewColumn(_("User"))) + columns[-1].set_sort_column_id(USER_COL) # create list for column in columns: n = self.dlist.append_column(column) @@ -204,7 +215,7 @@ class MainWindow(): except Exception, ex: user = "UID: %s" % entry.getUID() n = self.dumpsListStore.append([icon, entry.getPackage(), entry.getExecutable(), - entry.getTime("%c"), entry.getCount(), user, entry.isReported(), entry]) + entry.getTime("%c"), entry.getCount(), user, entry.isReported(), entry.getTime(""), entry]) # activate the first row if any.. if n: # we can use (0,) as path for the first row, but what if API changes? @@ -233,8 +244,8 @@ class MainWindow(): # it is not informative (no URL to the report) for message in dump.getMessage().split(';'): if message: - message_clean = message.strip() - if "http" in message_clean[0:5] or "file:///"[0:8] in message_clean: + message_clean = markup_escape_text(message.strip()) + if "http" in message_clean[0:5] or "file:///" in message_clean[0:8]: report_message = "<a href=\"%s\">%s</a>" % (message_clean, message_clean) else: report_message = message_clean diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py index 816164b..bc4a1e0 100644 --- a/src/Gui/CCReporterDialog.py +++ b/src/Gui/CCReporterDialog.py @@ -290,11 +290,11 @@ class ReporterDialog(): self.tevHowToReproduce.set_buffer(buff) def dehydrate(self): - # handle attachments - vbAttachments = self.builder.get_object("vbAttachments") - for attachment in vbAttachments.get_children(): - #print "%s file %s" % (["not sending","sending"][attachment.get_active()], attachment.get_label()) - del self.report[attachment.item] + ## # handle attachments + ## vbAttachments = self.builder.get_object("vbAttachments") + ## for attachment in vbAttachments.get_children(): + ## #print "%s file %s" % (["not sending","sending"][attachment.get_active()], attachment.get_label()) + ## del self.report[attachment.item] # handle comment buff = self.tvComment.get_buffer() diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py index 9378de5..acfd2a5 100644 --- a/src/Gui/CC_gui_functions.py +++ b/src/Gui/CC_gui_functions.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from glib import markup_escape_text import gtk import pango import subprocess @@ -66,7 +67,7 @@ def gui_report_dialog ( report_status_dict, parent_dialog, # 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][MESSAGE]) - status_label.set_markup("<span foreground='red'>%s</span>" % report_status_dict[plugin][MESSAGE]) + status_label.set_markup("<span foreground='red'>%s</span>" % markup_escape_text(report_status_dict[plugin][MESSAGE])) # 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][STATUS] == '1': diff --git a/src/Gui/PluginsSettingsDialog.py b/src/Gui/PluginsSettingsDialog.py index 0ba390d..787faee 100644 --- a/src/Gui/PluginsSettingsDialog.py +++ b/src/Gui/PluginsSettingsDialog.py @@ -107,7 +107,7 @@ class PluginsSettingsDialog: # cell_text, toggle_active, toggle_visible, group_name_visible, color, plugin ["<b>%s</b>" % PluginInfo.types[plugin_type], 0, 0, 1, "gray", None]) plugin_rows[plugin_type] = it - group_empty[plugin_type] = 1 + group_empty[plugin_type] = it for entry in pluginlist: if entry.Description: text = "<b>%s</b>\n%s" % (entry.getName(), entry.Description) @@ -118,13 +118,13 @@ class PluginsSettingsDialog: self.pluginsListStore.append(plugin_rows[plugin_type], # cell_text, toggle_active, toggle_visible, group_name_visible, color, plugin [text, entry.Enabled == "yes", 1, 0, "white", entry]) - group_empty[plugin_type] = 0 + if group_empty.has_key(plugin_type): + del group_empty[plugin_type] # rhbz#560971 "Don't show empty 'Not loaded plugins' section" - for plugin_type in group_empty.keys(): - if group_empty[plugin_type]: - self.pluginsListStore.append(plugin_rows[plugin_type], - # cell_text, toggle_active, toggle_visible, group_name_visible, color, plugin - ["(none)", 0, 1, 0, "white", None]) + # don't show any empty groups + for it in group_empty.values(): + self.pluginsListStore.remove(it) + self.pluginlist.expand_all() def dehydrate(self): @@ -141,7 +141,7 @@ class PluginsSettingsDialog: def on_bConfigurePlugin_clicked(self, button, pluginview): pluginsListStore, path = pluginview.get_selection().get_selected_rows() if not path: - self.builder.get_object("lDescription").set_label(_("Can't get plugin description")) + gui_info_dialog(_("Please select a plugin from the list to edit it's options."), self.window) return # this should work until we keep the row object in the last position pluginfo = pluginsListStore.get_value(pluginsListStore.get_iter(path[0]), pluginsListStore.get_n_columns()-1) diff --git a/src/Gui/ccgui.glade b/src/Gui/ccgui.glade index 237f23a..3050d65 100644 --- a/src/Gui/ccgui.glade +++ b/src/Gui/ccgui.glade @@ -208,7 +208,6 @@ Patrick Connelly <pcon@fedoraproject.org></property> <child> <widget class="GtkToolbar" id="toolbar1"> <property name="visible">True</property> - <property name="toolbar_style">both</property> <child> <widget class="GtkToolButton" id="bDelete"> <property name="visible">True</property> @@ -225,7 +224,6 @@ Patrick Connelly <pcon@fedoraproject.org></property> <child> <widget class="GtkToolButton" id="bReport"> <property name="visible">True</property> - <property name="sensitive">False</property> <property name="tooltip" translatable="yes">Report</property> <property name="label" translatable="yes">Report</property> <property name="stock_id">gtk-go-up</property> @@ -267,6 +265,8 @@ Patrick Connelly <pcon@fedoraproject.org></property> <widget class="GtkTreeView" id="tvDumps"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="reorderable">True</property> + <property name="search_column">1</property> </widget> </child> </widget> diff --git a/src/Gui/report.glade b/src/Gui/report.glade index e7f37ec..7b3aac4 100644 --- a/src/Gui/report.glade +++ b/src/Gui/report.glade @@ -297,12 +297,12 @@ <property name="can_focus">True</property> <property name="hscrollbar_policy">automatic</property> <property name="vscrollbar_policy">automatic</property> - <property name="shadow_type">in</property> <child> <object class="GtkTextView" id="tvBacktrace"> <property name="height_request">200</property> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="accepts_tab">False</property> </object> </child> </object> @@ -378,6 +378,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="wrap_mode">word-char</property> + <property name="accepts_tab">False</property> </object> </child> </object> @@ -415,6 +416,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="wrap_mode">word-char</property> + <property name="accepts_tab">False</property> </object> </child> </object> |
