From 6eb4056d7b90fe3a69cee1e332e2a2957b76c9c5 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Fri, 4 Dec 2009 16:30:49 +0100 Subject: GUI: gui fixes from rrakus@redhat.com --- src/Gui/CCMainWindow.py | 42 +-- src/Gui/CCReporterDialog.py | 21 +- src/Gui/PluginsSettingsDialog.py | 1 + src/Gui/SettingsDialog.py | 2 + src/Gui/ccgui.glade | 130 +++----- src/Gui/dialogs.glade | 9 +- src/Gui/report.glade | 262 ++++++++++------- src/Gui/settings.glade | 618 +++++++++++++++++++++------------------ src/Gui/settings_wizard.glade | 34 ++- 9 files changed, 594 insertions(+), 525 deletions(-) (limited to 'src/Gui') diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py index 8e48050..7de389b 100644 --- a/src/Gui/CCMainWindow.py +++ b/src/Gui/CCMainWindow.py @@ -60,18 +60,11 @@ class MainWindow(): self.pBarWindow.set_transient_for(self.window) self.pBar = self.wTree.get_widget("pBar") - # set colours for description heading - self.wTree.get_widget("evDescription").modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("black")) - #init the dumps treeview self.dlist = self.wTree.get_widget("tvDumps") #rows of items with: - #icon, package_name, application, date, crash_rate, user (only if root), is_reported, ?object? - if os.getuid() == 0: - # root - self.dumpsListStore = gtk.ListStore(gtk.gdk.Pixbuf, str,str,str,str,str,bool, object) - else: - self.dumpsListStore = gtk.ListStore(gtk.gdk.Pixbuf, str,str,str,str,bool, object) + #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 self.modelfilter = self.dumpsListStore.filter_new() self.modelfilter.set_visible_func(self.filter_dumps, None) @@ -82,16 +75,15 @@ class MainWindow(): icon_column.cell.set_property('cell-background', "#C9C9C9") n = self.dlist.append_column(icon_column) icon_column.pack_start(icon_column.cell, False) - icon_column.set_attributes(icon_column.cell, pixbuf=(n-1), cell_background_set=5+(os.getuid() == 0)) + 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")) - if os.getuid() == 0: - column = gtk.TreeViewColumn(_("User")) - columns.append(column) + column = gtk.TreeViewColumn(_("User")) + columns.append(column) # create list for column in columns: n = self.dlist.append_column(column) @@ -100,7 +92,7 @@ class MainWindow(): #column.set_attributes(column.cell, ) # FIXME: use some relative indexing column.cell.set_property('cell-background', "#C9C9C9") - column.set_attributes(column.cell, text=(n-1), cell_background_set=5+(os.getuid() == 0)) + column.set_attributes(column.cell, text=(n-1), cell_background_set=6) column.set_resizable(True) #connect signals self.dlist.connect("cursor-changed", self.on_tvDumps_cursor_changed) @@ -204,18 +196,14 @@ class MainWindow(): icon = get_icon_for_package(self.theme, entry.getPackageName()) except: icon = None - if os.getuid() == 0: - user = "N/A" - if entry.getUID() != "-1": - try: - user = pwd.getpwuid(int(entry.getUID()))[0] - except Exception, e: - user = "UID: %s" % entry.getUID() - n = self.dumpsListStore.append([icon, entry.getPackage(), entry.getExecutable(), - entry.getTime("%c"), entry.getCount(), user, entry.isReported(), entry]) - else: - n = self.dumpsListStore.append([icon, entry.getPackage(), entry.getExecutable(), - entry.getTime("%c"), entry.getCount(), entry.isReported(), entry]) + user = "N/A" + if entry.getUID() != "-1": + try: + user = pwd.getpwuid(int(entry.getUID()))[0] + except Exception, e: + user = "UID: %s" % entry.getUID() + n = self.dumpsListStore.append([icon, entry.getPackage(), entry.getExecutable(), + entry.getTime("%c"), entry.getCount(), user, entry.isReported(), entry]) # activate the first row if any.. if n: # we can use (0,) as path for the first row, but what if API changes? @@ -230,7 +218,6 @@ class MainWindow(): if not path: self.wTree.get_widget("bDelete").set_sensitive(False) self.wTree.get_widget("bReport").set_sensitive(False) - self.wTree.get_widget("lDescription").set_label("") return self.wTree.get_widget("bDelete").set_sensitive(True) self.wTree.get_widget("bReport").set_sensitive(True) @@ -248,7 +235,6 @@ class MainWindow(): else: self.wTree.get_widget("lReported").set_markup(_("Not reported!")) lPackage = self.wTree.get_widget("lPackage") - self.wTree.get_widget("lDescription").set_label(dump.getDescription()) def on_bDelete_clicked(self, button, treeview): dumpsListStore, path = self.dlist.get_selection().get_selected_rows() diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py index 7cdf3cf..d943c0d 100644 --- a/src/Gui/CCReporterDialog.py +++ b/src/Gui/CCReporterDialog.py @@ -130,7 +130,7 @@ class ReporterDialog(): im = gtk.Image() im.set_from_stock(gtk.STOCK_APPLY, gtk.ICON_SIZE_MENU) box.remove(image) - box.pack_start(im) + box.pack_start(im, expand = False, fill = False) im.show() image.destroy() button.set_sensitive(False) @@ -155,12 +155,13 @@ class ReporterDialog(): vbWrongSettings = builder.get_object("vbWrongSettings") for plugin in wrong_conf_plugs: hbox = gtk.HBox() + hbox.set_spacing(6) image = gtk.Image() image.set_from_stock(gtk.STOCK_CANCEL, gtk.ICON_SIZE_MENU) button = gtk.Button(plugin.getName()) button.connect("clicked", self.on_config_plugin_clicked, plugin, image) hbox.pack_start(button) - hbox.pack_start(image) + hbox.pack_start(image, expand = False, fill = False) vbWrongSettings.pack_start(hbox) vbWrongSettings.show_all() dialog.set_transient_for(self.window) @@ -216,26 +217,32 @@ class ReporterDialog(): except: package = None ebErrors = self.wTree.get_widget("ebErrors") + fReproducer = self.wTree.get_widget("fReproducer") + fComments = self.wTree.get_widget("fComments") lErrors = self.wTree.get_widget("lErrors") bSend = self.wTree.get_widget("bSend") # not usable report if int(self.report[item][CD_CONTENT]) < 3: ebErrors.show() - ebErrors.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("red")) + fReproducer.hide() + fComments.hide() if package: lErrors.set_markup( - "%s" % _("Reporting disabled because the backtrace is unusable.\nPlease try to install debuginfo manually using command: debuginfo-install %s \nthen use Refresh button to regenerate the backtrace." % package[0:package.rfind('-',0,package.rfind('-'))])) + _("Reporting disabled because the backtrace is unusable.\nPlease try to install debuginfo manually using command: debuginfo-install %s \nthen use Refresh button to regenerate the backtrace." % package[0:package.rfind('-',0,package.rfind('-'))])) else: - lErrors.set_markup("%s" % _("The backtrace is unusable, you can't report this!")) + lErrors.set_markup(_("The backtrace is unusable, you can't report this!")) bSend.set_sensitive(False) # probably usable 3 elif int(self.report[item][CD_CONTENT]) < 4: ebErrors.show() - ebErrors.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("yellow")) - lErrors.set_markup("%s" % _("The backtrace is incomplete, please make sure you provide good steps to reproduce.")) + fReproducer.hide() + fComments.hide() + lErrors.set_markup(_("The backtrace is incomplete, please make sure you provide good steps to reproduce.")) bSend.set_sensitive(True) else: ebErrors.hide() + fReproducer.show() + fComments.show() bSend.set_sensitive(True) if self.report[item][CD_TYPE] != CD_SYS: diff --git a/src/Gui/PluginsSettingsDialog.py b/src/Gui/PluginsSettingsDialog.py index 39fc7a6..8453385 100644 --- a/src/Gui/PluginsSettingsDialog.py +++ b/src/Gui/PluginsSettingsDialog.py @@ -104,6 +104,7 @@ class PluginsSettingsDialog: n = self.pluginsListStore.append(plugin_rows[entry.getType()],["%s\n%s" % (entry.getName(), entry.Description), entry.Enabled == "yes", 1, 0, "white", entry]) self.pluginlist.expand_all() + def dehydrate(self): # we have nothing to save, plugin's does the work pass diff --git a/src/Gui/SettingsDialog.py b/src/Gui/SettingsDialog.py index cf42393..c2b292f 100644 --- a/src/Gui/SettingsDialog.py +++ b/src/Gui/SettingsDialog.py @@ -157,6 +157,7 @@ class SettingsDialog: def add_CronJob(self, job=None): hbox = gtk.HBox() + hbox.set_spacing(6) time = gtk.Entry() remove_image = gtk.Image() remove_image.set_from_stock("gtk-remove",gtk.ICON_SIZE_MENU) @@ -193,6 +194,7 @@ class SettingsDialog: def add_AnalyzerAction(self, action=None): #print "add_AnalyzerAction" hbox = gtk.HBox() + hbox.set_spacing(6) action_list = gtk.Entry() edit_actions = gtk.Button() edit_actions.set_tooltip_text("Edit actions") diff --git a/src/Gui/ccgui.glade b/src/Gui/ccgui.glade index e9fd96f..04bc26b 100644 --- a/src/Gui/ccgui.glade +++ b/src/Gui/ccgui.glade @@ -3,17 +3,22 @@ + 270 + 12 Please wait.. + False True center-on-parent 270 + main_window3 True + 12 - + True - Working... + 0 False @@ -23,43 +28,13 @@ True + 0 False 1 - - - True - - - True - - - False - False - 0 - - - - - True - 0 - - 8 - - - 1 - - - - - False - False - 2 - - @@ -127,6 +102,7 @@ Zdenek Prikryl <zprikryl@redhat.com> True True True + True @@ -153,6 +129,7 @@ Zdenek Prikryl <zprikryl@redhat.com> True True True + True @@ -173,6 +150,7 @@ Zdenek Prikryl <zprikryl@redhat.com> True True True + True @@ -188,6 +166,7 @@ Zdenek Prikryl <zprikryl@redhat.com> True + both True @@ -207,7 +186,7 @@ Zdenek Prikryl <zprikryl@redhat.com> False Report Report - gtk-save + gtk-go-up False @@ -230,58 +209,48 @@ Zdenek Prikryl <zprikryl@redhat.com> - + True True - automatic - automatic + 12 + vertical - + True True + automatic + automatic + in + + + True + True + + + + False + False + - - - 2 - - - - - True - - - True - 0.05000000074505806 - <span color="white">Description</span> - True - - - - - False - 3 - - - - - True - vertical - + True True automatic automatic + in - + True queue + none - + True - 0.10000000149011612 - 0.20000000298023224 + 0 + 0 + Not Reported True @@ -289,33 +258,22 @@ Zdenek Prikryl <zprikryl@redhat.com> - 0 - - - - - True - <b>Not reported!</b> - True - fill - - - 1 + False + True - 4 + 2 True - 2 False - 5 + 3 @@ -329,6 +287,7 @@ Zdenek Prikryl <zprikryl@redhat.com> True True True + True @@ -336,10 +295,11 @@ Zdenek Prikryl <zprikryl@redhat.com> Report True False + True True - gtk-save + gtk-go-up 1 diff --git a/src/Gui/dialogs.glade b/src/Gui/dialogs.glade index 9d24864..b5e5273 100644 --- a/src/Gui/dialogs.glade +++ b/src/Gui/dialogs.glade @@ -3,8 +3,9 @@ - 5 + 6 Report done + False True center-on-parent True @@ -14,13 +15,17 @@ True vertical - 2 + 12 True + 6 + 12 True + 0 + 0 gtk-dialog-info 6 diff --git a/src/Gui/report.glade b/src/Gui/report.glade index 29c5c28..08777fb 100644 --- a/src/Gui/report.glade +++ b/src/Gui/report.glade @@ -3,161 +3,209 @@ - 5 + 6 Report + True center-on-parent 400 400 - dialog + normal False True vertical - 2 + 12 - + True vertical + 12 - - True - Report - - - False - 0 - - - - + True - True - automatic - automatic + vertical + 12 - + True - True + 0 + none + + + True + 12 + + + True + True + automatic + automatic + in + + + True + True + + + + + + + + + True + <b>Following items will be send</b> + True + + + label_item + + + + 0 + - - - 1 - - - - - True - + True - - True + 0 + none + + + True + 12 + + + True + True + automatic + automatic + + + True + queue + + + True + True + word-char + + + + + + + + + + + True + <b>How to reproduce (in a few simple steps)</b> + True + + + label_item + + + + False + False + 1 + - - - False - False - 2 - - - - - 0 - - - - - True - vertical - - - True - + True - 0 - 2 - How to reproduce (in a few simple steps) + 0 + none + + + True + 12 + + + True + True + automatic + automatic + + + True + queue + + + True + True + word-char + + + + + + + + + + + True + <b>Comment</b> + True + + + label_item + + + + False + False + 2 + - False 0 - - True - True - automatic - automatic - - - True - True - word-char - - - - - False - 1 - - - - - False - 2 - - - - - True - vertical - - + True + 12 - + True - 0 - 2 - Comment + gtk-dialog-warning + 6 + + False + False + 0 + - - - False - 0 - - - - - True - True - automatic - automatic - + True - True - word-char + + True + + 1 + False + False 1 - False - 3 + 0 @@ -212,7 +260,7 @@ False end - 0 + 1 diff --git a/src/Gui/settings.glade b/src/Gui/settings.glade index 094286b..655c15b 100644 --- a/src/Gui/settings.glade +++ b/src/Gui/settings.glade @@ -5,175 +5,216 @@ Settings True + center-on-parent 450 400 - + True + 12 vertical + 12 - - - - + True - True - never - automatic + vertical + 6 - + True True - - - - - 1 - - - - - True - True - - - True - vertical + immediate + never + automatic + in - + True - 0.05000000074505806 - Nothing selected - - - 0 - - - - - True - Nothing selected + True - - 1 - + + + 0 + + + + + True + True - + True - 3 - 3 - True - - - True - 2.2351741291171123e-10 - 5 - Web Site: - - - 2 - 3 - - + 12 - + True - 2.2351741291171123e-10 - 5 - Author: - - - 1 - 2 - GTK_FILL - - - - - True - 0 - 5 - Version: - - - GTK_FILL - - - - - True - 2.2351741291171123e-10 - Nothing selected - - - 1 - 3 - GTK_FILL - - - - - - True - 2.2351741291171123e-10 - Nothing selected - - - 1 - 3 - 1 - 2 - - - - - True - 0 - Nothing selected + + + True + 5 + 2 + 12 + 6 + + + True + 0 + Web Site: + + + 4 + 5 + GTK_FILL + + + + + True + 2.2351741291171123e-10 + Author: + + + 2 + 3 + GTK_FILL + + + + + True + 0 + Version: + + + 3 + 4 + GTK_FILL + + + + + True + 2.2351741291171123e-10 + True + + + 1 + 2 + 3 + 4 + GTK_FILL + + + + + True + 2.2351741291171123e-10 + True + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + True + 0 + True + + + 1 + 2 + 4 + 5 + GTK_FILL + + + + + True + 0 + Description: + + + 1 + 2 + GTK_FILL + + + + + True + 0 + Name: + + + + + True + 0 + True + + + 1 + 2 + 1 + 2 + + + + + True + 0 + True + + + 1 + 2 + + + + + False + False + 0 + + + + + - - 1 - 3 - 2 - 3 - - - 2 - + + + + True + <b>Plugin details</b> + True + - - - - True - Plugin Details - + + False + False + 1 + - False - False - 2 + 0 - + True - 11 - - - True - - - - - - 0 - - + 12 + end C_onfigure plugin @@ -183,7 +224,9 @@ True - 1 + False + False + 0 @@ -195,23 +238,16 @@ True - 2 + False + False + 1 False - 3 - - - - - True - 2 - - - False - 4 + False + 1 @@ -220,21 +256,28 @@ Global Settings True + center-on-parent 450 400 True + 12 vertical + 6 True True + False True + 6 5 2 + 12 + 6 Check package GPG signature @@ -258,6 +301,7 @@ 1 2 + GTK_FILL GTK_FILL @@ -283,6 +327,7 @@ 2 3 + GTK_FILL GTK_FILL @@ -296,6 +341,7 @@ 3 4 + GTK_FILL GTK_FILL @@ -309,6 +355,7 @@ 4 5 + GTK_FILL GTK_FILL @@ -331,6 +378,7 @@ True + 6 True @@ -346,7 +394,6 @@ True True True - Edit blacklisted packages imEdit @@ -367,6 +414,7 @@ True + 6 True @@ -414,7 +462,9 @@ True + 6 vertical + 6 True @@ -425,6 +475,7 @@ True queue + none True @@ -480,31 +531,10 @@ - + True - True - - - True - - - - - - 0 - - - - - True - - - - - - 1 - - + 12 + end gtk-add @@ -514,12 +544,15 @@ True - 2 + False + False + 0 False + False 1 @@ -541,84 +574,90 @@ True + 6 vertical + 6 - + True + True + automatic + automatic - - True - <b>Analyzer plugin</b> - True - - - 0 - - - - - True - <b>Associated action</b> - True - - - 1 - - - - + True + queue + none - + + True + vertical + + + True + + + True + <b>Analyzer plugin</b> + True + + + 0 + + + + + True + <b>Associated action</b> + True + + + 1 + + + + + True + + + + + + 2 + + + + + False + 0 + + + + + True + vertical + + + + + + 1 + + + - - 2 - - False 0 - + True - vertical - - - - - - 1 - - - - - True - - - True - - - - - - 0 - - - - - True - - - - - - 1 - - + 12 + end gtk-add @@ -628,13 +667,16 @@ True - 2 + False + False + 0 False - 2 + False + 1 @@ -658,55 +700,36 @@ - + True - True + 12 + end - + + gtk-cancel True - - - + True + True + True + False + False 0 - + + gtk-ok True - 14 - True - - - gtk-cancel - True - True - True - True - - - False - 0 - - - - - gtk-ok - True - False - True - True - This function is not implemented yet! - True - - - False - 1 - - + False + True + True + True + False + False 1 @@ -724,21 +747,13 @@ 1000000 1 - - True - gtk-edit - 1 - - - True - gtk-edit - 1 - GPG Keys True + center-on-parent 400 400 + wGlobalSettings True @@ -753,9 +768,11 @@ - + True - True + 12 + 12 + end gtk-add @@ -765,6 +782,8 @@ True + False + False 0 @@ -777,6 +796,8 @@ True + False + False 1 @@ -789,6 +810,8 @@ True + False + False 2 @@ -801,16 +824,29 @@ True + False + False 3 False + False 1 + + True + gtk-edit + 1 + + + True + gtk-edit + 1 + diff --git a/src/Gui/settings_wizard.glade b/src/Gui/settings_wizard.glade index feab435..e0d54a1 100644 --- a/src/Gui/settings_wizard.glade +++ b/src/Gui/settings_wizard.glade @@ -5,24 +5,47 @@ 5 Wrong Settings Detected + False + center-on-parent normal False True vertical - 2 + 6 True vertical + 6 - + True - <b>WARNING:</b> Wrong settings detected for some of the enabled reporter plugins, please use the buttons below to open respective configuration and fix it before you proceed, otherwise the reporting process can fail. + 12 + + + True + gtk-dialog-warning + 6 + + + 0 + + + + + True + Wrong settings detected for some of the enabled reporter plugins, please use the buttons below to open respective configuration and fix it before you proceed, otherwise the reporting process can fail. - True - True + True + fill + True + + + 1 + + 0 @@ -32,6 +55,7 @@ True vertical + 6 -- cgit