diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-03-02 15:30:17 +0100 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-03-02 15:30:17 +0100 |
commit | b413cf38cdcbae6aede174aa54103181395f7bbc (patch) | |
tree | eee47ca1edd79fbc3e47c993bbd584906727eb51 | |
parent | f98ee8ad41a9f9ebc8f2318a4bbf9ecfc01bc1ab (diff) | |
download | abrt-b413cf38cdcbae6aede174aa54103181395f7bbc.tar.gz abrt-b413cf38cdcbae6aede174aa54103181395f7bbc.tar.xz abrt-b413cf38cdcbae6aede174aa54103181395f7bbc.zip |
New gui
DBusBackend improvements
-rw-r--r-- | src/Gui/CCDBusBackend.py | 22 | ||||
-rw-r--r-- | src/Gui/CCDump.py | 6 | ||||
-rw-r--r-- | src/Gui/CCDumpList.py | 2 | ||||
-rw-r--r-- | src/Gui/CCMainWindow.py | 163 | ||||
-rw-r--r-- | src/Gui/CCReporterDialog.py | 2 | ||||
-rw-r--r-- | src/Gui/CC_gui_functions.py | 59 | ||||
-rw-r--r-- | src/Gui/Makefile.am | 2 | ||||
-rw-r--r-- | src/Gui/ccgui.glade | 774 | ||||
-rw-r--r-- | src/Gui/report.glade | 86 |
9 files changed, 334 insertions, 782 deletions
diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py index f1d6ed1e..0408df95 100644 --- a/src/Gui/CCDBusBackend.py +++ b/src/Gui/CCDBusBackend.py @@ -14,6 +14,8 @@ class DBusManager(gobject.GObject): gobject.GObject.__init__(self) # signal emited when new crash is detected gobject.signal_new ("crash", self ,gobject.SIGNAL_RUN_FIRST,gobject.TYPE_NONE,()) + # signal emited when new analyze is complete + gobject.signal_new ("analyze-complete", self ,gobject.SIGNAL_RUN_FIRST,gobject.TYPE_NONE,(gobject.TYPE_PYOBJECT,)) # binds the dbus to glib mainloop DBusGMainLoop(set_as_default=True) self.proxy = None @@ -21,7 +23,10 @@ class DBusManager(gobject.GObject): if self.proxy: self.cc = dbus.Interface(self.proxy, dbus_interface=CC_IFACE) #intr = dbus.Interface(proxy, dbus_interface='org.freedesktop.DBus.Introspectable') + # new crash notify self.proxy.connect_to_signal("Crash",self.crash_cb,dbus_interface=CC_IFACE) + # BT extracting complete + self.proxy.connect_to_signal("AnalyzeComplete",self.analyze_complete_cb,dbus_interface=CC_IFACE) else: raise Exception("Proxy object doesn't exist!") @@ -37,6 +42,13 @@ class DBusManager(gobject.GObject): #print "crash" self.emit("crash") + def analyze_complete_cb(self,*args): + for arg in args: + print "Analyze complete for: %s" % arg + # emit signal to let clients know that analyze has been completed + # maybe rewrite this with async method call? + self.emit("analyze-complete", arg) + def connect_to_daemon(self): bus = dbus.SystemBus() if not bus: @@ -47,11 +59,17 @@ class DBusManager(gobject.GObject): raise Exception(e.message + "\nPlease check if crash-catcher daemon is running.") def getReport(self, UUID): - return self.cc.CreateReport(UUID) + try: + return self.cc.CreateReport(UUID) + except dbus.exceptions.DBusException, e: + raise Exception(e.message) def Report(self,report): return self.cc.Report(report) - + + def DeleteDebugDump(self,UUID): + return self.cc.DeleteDebugDump(UUID) + def getDumps(self): row_dict = None rows = [] diff --git a/src/Gui/CCDump.py b/src/Gui/CCDump.py index 5e2e6517..38fc369d 100644 --- a/src/Gui/CCDump.py +++ b/src/Gui/CCDump.py @@ -34,3 +34,9 @@ class Dump(): except Exception, e: print e return int(self.Time) + + def getPackageName(self): + return self.Package[:self.Package.find("-")] + + def getDescription(self): + return self.Description diff --git a/src/Gui/CCDumpList.py b/src/Gui/CCDumpList.py index 5aaae923..ecc43fe8 100644 --- a/src/Gui/CCDumpList.py +++ b/src/Gui/CCDumpList.py @@ -5,6 +5,7 @@ class DumpList(list): """Class to store list of debug dumps""" def __init__(self,dbus_manager=None): self.dm = dbus_manager + self.ddict = {} def load(self): if self.dm: @@ -18,6 +19,7 @@ class DumpList(list): #print "DumpList adding %s:%s" % (column,row[column]) entry.__dict__[column] = row[column] self.append(entry) + self.ddict[entry.UUID] = entry except Exception, e: print e return diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py index 0c589f60..4c35afa1 100644 --- a/src/Gui/CCMainWindow.py +++ b/src/Gui/CCMainWindow.py @@ -9,11 +9,14 @@ from CC_gui_functions import * from CCDumpList import getDumpList, DumpList from CCReporterDialog import ReporterDialog from CCReport import Report +try: + import rpm +except: + rpm = None -def cb(self, *args): - pass class MainWindow(): def __init__(self): + self.theme = theme = gtk.icon_theme_get_default() try: self.ccdaemon = CCDBusBackend.DBusManager() except Exception, e: @@ -27,96 +30,119 @@ class MainWindow(): self.wTree = gtk.glade.XML(self.gladefile) #Get the Main Window, and connect the "destroy" event - self.window = self.wTree.get_widget("main_window") - # self.window.set_default_size(640, 480) + self.window = self.wTree.get_widget("main_window2") + self.window.set_default_size(700, 480) if (self.window): - self.window.connect("destroy", gtk.main_quit) + self.window.connect("delete_event", self.delete_event_cb) + self.window.connect("destroy", self.destroy) self.appBar = self.wTree.get_widget("appBar") + # set colours for descritpion 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") - columns = [None]*2 - columns[0] = gtk.TreeViewColumn('Date') - columns[1] = gtk.TreeViewColumn('Package') - # create list - self.dumpsListStore = gtk.ListStore(str, str, object) + self.dumpsListStore = gtk.ListStore(gtk.gdk.Pixbuf, str,str,str,str, object) # set filter self.modelfilter = self.dumpsListStore.filter_new() self.modelfilter.set_visible_func(self.filter_dumps, None) self.dlist.set_model(self.modelfilter) + # add pixbuff separatelly + icon_column = gtk.TreeViewColumn('Icon') + icon_column.cell = gtk.CellRendererPixbuf() + 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)) + # =============================================== + columns = [None]*4 + columns[0] = gtk.TreeViewColumn('Package') + columns[1] = gtk.TreeViewColumn('Application') + columns[2] = gtk.TreeViewColumn('Date') + columns[3] = gtk.TreeViewColumn('Crash Rate') + # create list for column in columns: n = self.dlist.append_column(column) column.cell = gtk.CellRendererText() column.pack_start(column.cell, False) column.set_attributes(column.cell, text=(n-1)) column.set_resizable(True) - #connect signals self.dlist.connect("cursor-changed", self.on_tvDumps_cursor_changed) - self.wTree.get_widget("bDelete").connect("clicked", self.on_bDelete_clicked) - self.wTree.get_widget("bNext").connect("clicked", self.on_bNext_clicked) + self.wTree.get_widget("bDelete").connect("clicked", self.on_bDelete_clicked, self.dlist) + self.wTree.get_widget("bReport").connect("clicked", self.on_bReport_clicked) self.wTree.get_widget("bQuit").connect("clicked", self.on_bQuit_clicked) self.ccdaemon.connect("crash", self.on_data_changed_cb, None) + self.ccdaemon.connect("analyze-complete", self.on_analyze_complete_cb) # load data - self.load() - - def load(self): - self.appBar.push(0,"Loading dumps...") - self.loadDumpList() - self.appBar.pop(0) - - def loadDumpList(self): - #dumplist = getDumpList(dbmanager=self.ccdaemon) - pass - - def on_data_changed_cb(self, *args): - ret = gui_info_dialog("Another crash detected, do you want to refresh the data?",self.window) - if ret == gtk.RESPONSE_YES: - self.hydrate() - else: - pass - #print "got another crash, refresh gui?" - - - def filter_dumps(self, model, miter, data): - # this could be use for filtering the dumps - return True - - def show(self): - self.window.show() - + #self.load() def hydrate(self): self.dumpsListStore.clear() + self.rows = self.ccdaemon.getDumps() dumplist = getDumpList(self.ccdaemon, refresh=True) - #self.rows = self.ccdaemon.getDumps() - #row_c = 0 for entry in dumplist: - self.dumpsListStore.append([entry.getTime("%m.%d."),entry.getPackage(),entry]) - #row_c += 1 - + icon = get_icon_for_package(self.theme,entry.getPackageName()) + self.dumpsListStore.append([icon, entry.getPackage(),entry.getExecutable(), entry.getTime("%Y.%m.%d %H:%M:%S"),entry.getCount(), entry]) + + def filter_dumps(self, model, miter, data): + # for later.. + return True + def on_tvDumps_cursor_changed(self,treeview): dumpsListStore, path = self.dlist.get_selection().get_selected_rows() if not path: + self.wTree.get_widget("lDescription").set_label("") return - # this should work until we keep the row object in the last position dump = dumpsListStore.get_value(dumpsListStore.get_iter(path[0]), len(self.dlist.get_columns())) - lDate = self.wTree.get_widget("lDate") #move this to Dump class - lDate.set_label(dump.getTime("%Y.%m.%d %H:%M:%S")) lPackage = self.wTree.get_widget("lPackage") - lPackage.set_label(dump.getPackage()) - self.wTree.get_widget("lExecutable").set_label(dump.getExecutable()) - self.wTree.get_widget("lCRate").set_label(dump.getCount()) + self.wTree.get_widget("lDescription").set_label(dump.getDescription()) #print self.rows[row] + def on_bDelete_clicked(self, button, treeview): + dumpsListStore, path = self.dlist.get_selection().get_selected_rows() + if not path: + return + # this should work until we keep the row object in the last position + dump = dumpsListStore.get_value(dumpsListStore.get_iter(path[0]), len(self.dlist.get_columns())) + try: + if self.ccdaemon.DeleteDebugDump(dump.UUID): + self.hydrate() + treeview.emit("cursor-changed") + else: + print "Couldn't delete" + except Exception, e: + print e + + def destroy(self, widget, data=None): + print "destroy signal occurred" + gtk.main_quit() + + def on_data_changed_cb(self, *args): + ret = gui_question_dialog("Another crash detected, do you want to refresh the data?",self.window) + if ret == gtk.RESPONSE_YES: + self.hydrate() + else: + pass + #print "got another crash, refresh gui?" + + def on_analyze_complete_cb(self, daemon, UUID): + dumplist = getDumpList(self.ccdaemon) + entry = dumplist.ddict[UUID] + print "GUI: Analyze for package %s crash with UUID %s is complete" % (entry.Package, UUID) + print "We should refresh the UI ..." - def on_bDelete_clicked(self, button): - print "Delete" - - def on_bNext_clicked(self, button): + #ret = gui_question_dialog("GUI: Analyze for package %s crash with UUID %s is complete" % (entry.Package, UUID),self.window) + #if ret == gtk.RESPONSE_YES: + # self.hydrate() + #else: + # pass + #print "got another crash, refresh gui?" + + + def on_bReport_clicked(self, button): # FIXME don't duplicate the code, move to function dumpsListStore, path = self.dlist.get_selection().get_selected_rows() if not path: @@ -125,10 +151,10 @@ class MainWindow(): # show the report window with selected dump try: report = self.ccdaemon.getReport(dump.getUUID()) - except Exception,e: + except Exception, e: # FIXME #3 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply # do this async and wait for yum to end with debuginfoinstal - gui_error_message("Operation taking too long - \nPlease try again after debuginfo is installed") + gui_error_message("Error getting the report: %s" % e.message) return if not report: @@ -136,14 +162,25 @@ class MainWindow(): return report_dialog = ReporterDialog(report) result = report_dialog.run() - if result == gtk.RESPONSE_CANCEL: - pass - else: + if result == gtk.RESPONSE_APPLY: self.ccdaemon.Report(result) - - def on_bQuit_clicked(self, button): - gtk.main_quit() + + + def delete_event_cb(self, widget, event, data=None): + # Change FALSE to TRUE and the main window will not be destroyed + # with a "delete_event". + return self.on_bQuit_clicked(widget) + def on_bQuit_clicked(self, widget): + ret = gui_question_dialog("Do you really want to quit?",self.window) + if ret == gtk.RESPONSE_YES: + gtk.main_quit() + return True + + def show(self): + self.window.show() + + if __name__ == "__main__": cc = MainWindow() cc.hydrate() diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py index 4119d111..91f6961e 100644 --- a/src/Gui/CCReporterDialog.py +++ b/src/Gui/CCReporterDialog.py @@ -13,7 +13,7 @@ class ReporterDialog(): self.report = report #Set the Glade file # FIXME add to path - self.gladefile = "/usr/share/crash-catcher/ccgui.glade" + self.gladefile = "/usr/share/crash-catcher/report.glade" self.wTree = gtk.glade.XML(self.gladefile) #Get the Main Window, and connect the "destroy" event self.window = self.wTree.get_widget("reporter_dialog") diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py index 5ac8e8c7..703ec25e 100644 --- a/src/Gui/CC_gui_functions.py +++ b/src/Gui/CC_gui_functions.py @@ -1,4 +1,9 @@ import gtk +try: + # we don't want to add dependency to rpm, but if we have it, we can use it + import rpm +except: + rpm = None def gui_error_message ( message, parent_dialog=None, message_type=gtk.MESSAGE_ERROR, @@ -19,8 +24,8 @@ def gui_error_message ( message, parent_dialog=None, dialog.destroy() return ret -def gui_info_dialog ( message, parent_dialog=None, - message_type=gtk.MESSAGE_INFO, +def gui_question_dialog ( message, parent_dialog=None, + message_type=gtk.MESSAGE_QUESTION, widget=None, page=0, broken_widget=None ): dialog = gtk.MessageDialog( parent_dialog, @@ -37,3 +42,53 @@ def gui_info_dialog ( message, parent_dialog=None, ret = dialog.run () dialog.destroy() return ret + +def get_icon_for_package(theme,package): + #print package + try: + return theme.load_icon(package, 22, gtk.ICON_LOOKUP_USE_BUILTIN) + except: + # try to find icon filename by manually + if not rpm: + return None + ts = rpm.TransactionSet() + mi = ts.dbMatch( 'name', package ) + possible_icons = [] + icon_filename = "" + filenames = "" + for h in mi: + filenames = h['filenames'] + for filename in filenames: + # add check only for last 4 chars + if filename.rfind(".png") != -1: + possible_icons.append(filename) + if filename.rfind(".desktop") != -1: + #print filename + desktop_file = open(filename, 'r') + lines = desktop_file.readlines() + for line in lines: + if line.find("Icon=") != -1: + #print line[5:-1] + icon_filename = line[5:-1] + break + desktop_file.close() + # .dektop file found + for filename in h['filenames']: + if filename.rfind("%s.png" % icon_filename) != -1: + #print filename + icon_filename = filename + break + #we didn't find the .desktop file + else: + for filename in possible_icons: + if filename.rfind("%s.png" % package): + # return the first possible filename + icon_filename = filename + break + if icon_filename: + break + if icon_filename: + #print "icon created form %s" % icon_filename + return gtk.gdk.pixbuf_new_from_file_at_size(icon_filename,22,22) + else: + return None diff --git a/src/Gui/Makefile.am b/src/Gui/Makefile.am index a4d20b70..eea12e0c 100644 --- a/src/Gui/Makefile.am +++ b/src/Gui/Makefile.am @@ -2,7 +2,7 @@ bin_SCRIPTS = cc-gui -PYTHON_FILES = CCDBusBackend.py CCDumpList.py CCDump.py CC_gui_functions.py ccgui.glade CCReporterDialog.py CCReport.py CCMainWindow.py +PYTHON_FILES = CCDBusBackend.py CCDumpList.py CCDump.py CC_gui_functions.py ccgui.glade report.glade CCReporterDialog.py CCReport.py CCMainWindow.py GLADE_FILES = ccgui.glade diff --git a/src/Gui/ccgui.glade b/src/Gui/ccgui.glade index 8fbd9469..dbac11da 100644 --- a/src/Gui/ccgui.glade +++ b/src/Gui/ccgui.glade @@ -1,713 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> -<!--Generated with glade3 3.4.5 on Thu Feb 26 21:58:05 2009 --> +<!--Generated with glade3 3.4.5 on Sat Feb 28 15:37:08 2009 --> <glade-interface> - <widget class="GtkWindow" id="main_window"> - <property name="default_width">640</property> - <property name="default_height">480</property> - <child> - <widget class="GtkVBox" id="vbox1"> - <property name="visible">True</property> - <child> - <widget class="GtkMenuBar" id="menubar1"> - <property name="visible">True</property> - <child> - <widget class="GtkMenuItem" id="menuitem1"> - <property name="visible">True</property> - <property name="label" translatable="yes">_File</property> - <property name="use_underline">True</property> - <child> - <widget class="GtkMenu" id="menu1"> - <property name="visible">True</property> - <child> - <widget class="GtkImageMenuItem" id="imagemenuitem1"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-new</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="imagemenuitem2"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-open</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="imagemenuitem3"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-save</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="imagemenuitem4"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-save-as</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkSeparatorMenuItem" id="separatormenuitem1"> - <property name="visible">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="imagemenuitem5"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-quit</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - </widget> - </child> - </widget> - </child> - <child> - <widget class="GtkMenuItem" id="menuitem2"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Edit</property> - <property name="use_underline">True</property> - <child> - <widget class="GtkMenu" id="menu2"> - <property name="visible">True</property> - <child> - <widget class="GtkImageMenuItem" id="imagemenuitem6"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-cut</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="imagemenuitem7"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-copy</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="imagemenuitem8"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-paste</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="imagemenuitem9"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-delete</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - </widget> - </child> - </widget> - </child> - <child> - <widget class="GtkMenuItem" id="menuitem3"> - <property name="visible">True</property> - <property name="label" translatable="yes">_View</property> - <property name="use_underline">True</property> - </widget> - </child> - <child> - <widget class="GtkMenuItem" id="menuitem4"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Help</property> - <property name="use_underline">True</property> - <child> - <widget class="GtkMenu" id="menu3"> - <property name="visible">True</property> - <child> - <widget class="GtkImageMenuItem" id="imagemenuitem10"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-about</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="expand">False</property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="hbox1"> - <property name="visible">True</property> - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <child> - <widget class="GtkTreeView" id="tvDumps"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <signal name="cursor_changed" handler="on_tvDumps_cursor_changed"/> - </widget> - </child> - </widget> - </child> - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <child> - <widget class="GtkVBox" id="vbox2"> - <property name="visible">True</property> - <child> - <widget class="GtkVBox" id="vbox3"> - <property name="visible">True</property> - <child> - <widget class="GtkHBox" id="hbox2"> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <child> - <widget class="GtkLabel" id="Date"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Date:</b></property> - <property name="use_markup">True</property> - </widget> - </child> - <child> - <widget class="GtkLabel" id="lDate"> - <property name="visible">True</property> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - </child> - <child> - <widget class="GtkHBox" id="hbox3"> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <child> - <widget class="GtkLabel" id="Package"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Package:</b></property> - <property name="use_markup">True</property> - </widget> - </child> - <child> - <widget class="GtkLabel" id="lPackage"> - <property name="visible">True</property> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="lPackageInfo"> - <property name="visible">True</property> - <property name="label" translatable="yes">Package-info-placeholder</property> - </widget> - <packing> - <property name="position">2</property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="hbox4"> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <child> - <widget class="GtkLabel" id="Executable"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Executable:</b></property> - <property name="use_markup">True</property> - </widget> - </child> - <child> - <widget class="GtkLabel" id="lExecutable"> - <property name="visible">True</property> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="position">3</property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="hbox5"> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <child> - <widget class="GtkLabel" id="CRate"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Crash rate:</b></property> - <property name="use_markup">True</property> - </widget> - </child> - <child> - <widget class="GtkLabel" id="lCRate"> - <property name="visible">True</property> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="position">4</property> - </packing> - </child> - </widget> - </child> - <child> - <widget class="GtkHButtonBox" id="hbuttonbox1"> - <property name="visible">True</property> - <child> - <widget class="GtkButton" id="bDelete"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="label" translatable="yes">gtk-delete</property> - <property name="use_stock">True</property> - <property name="response_id">0</property> - </widget> - </child> - <child> - <widget class="GtkButton" id="bNext"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="label" translatable="yes">gtk-go-forward</property> - <property name="use_stock">True</property> - <property name="response_id">0</property> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkButton" id="bQuit"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="label" translatable="yes">gtk-quit</property> - <property name="use_stock">True</property> - <property name="response_id">0</property> - </widget> - <packing> - <property name="position">2</property> - </packing> - </child> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> - </child> - </widget> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkStatusbar" id="appBar"> - <property name="visible">True</property> - <property name="spacing">2</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">2</property> - </packing> - </child> - </widget> - </child> - </widget> - <widget class="GtkDialog" id="reporter_dialog"> - <property name="border_width">5</property> - <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property> - <property name="default_width">400</property> - <property name="default_height">400</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> - <property name="has_separator">False</property> - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox1"> - <property name="visible">True</property> - <property name="spacing">2</property> - <child> - <widget class="GtkVBox" id="vbox5"> - <property name="visible">True</property> - <child> - <widget class="GtkLabel" id="label10"> - <property name="visible">True</property> - <property name="label" translatable="yes">Report</property> - </widget> - <packing> - <property name="expand">False</property> - </packing> - </child> - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow5"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <child> - <widget class="GtkTreeView" id="tvReport"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </widget> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area1"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - <child> - <widget class="GtkButton" id="bApply"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="label" translatable="yes">gtk-apply</property> - <property name="use_stock">True</property> - <property name="response_id">-10</property> - </widget> - </child> - <child> - <widget class="GtkButton" id="bCancel"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="label" translatable="yes">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="response_id">-6</property> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="expand">False</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - </widget> - </child> - </widget> - <widget class="GtkDialog" id="dialog2"> - <property name="border_width">5</property> - <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property> - <property name="default_width">400</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> - <property name="has_separator">False</property> - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox2"> - <property name="visible">True</property> - <property name="spacing">2</property> - <child> - <widget class="GtkNotebook" id="notebook1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <widget class="GtkTable" id="table1"> - <property name="visible">True</property> - <property name="n_rows">6</property> - <property name="n_columns">2</property> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <widget class="GtkLabel" id="label14"> - <property name="visible">True</property> - <property name="label" translatable="yes">BlackList</property> - </widget> - </child> - <child> - <widget class="GtkEntry" id="entry1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label15"> - <property name="visible">True</property> - <property name="label" translatable="yes">Database Plugin</property> - </widget> - <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - </packing> - </child> - <child> - <widget class="GtkComboBox" id="combobox1"> - <property name="visible">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label16"> - <property name="visible">True</property> - <property name="label" translatable="yes">OpenPGP Public Keys</property> - </widget> - <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="hbox7"> - <property name="visible">True</property> - <child> - <widget class="GtkTreeView" id="treeview4"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </widget> - </child> - <child> - <widget class="GtkVBox" id="vbox9"> - <property name="visible">True</property> - <child> - <widget class="GtkButton" id="button6"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="label" translatable="yes">gtk-add</property> - <property name="use_stock">True</property> - <property name="response_id">0</property> - </widget> - </child> - <child> - <widget class="GtkButton" id="button7"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="label" translatable="yes">gtk-remove</property> - <property name="use_stock">True</property> - <property name="response_id">0</property> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - </packing> - </child> - </widget> - </child> - <child> - <widget class="GtkLabel" id="label11"> - <property name="visible">True</property> - <property name="label" translatable="yes">Settings</property> - </widget> - <packing> - <property name="type">tab</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <widget class="GtkVBox" id="vbox6"> - <property name="visible">True</property> - <child> - <widget class="GtkHBox" id="hbox6"> - <property name="visible">True</property> - <property name="spacing">10</property> - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow3"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <child> - <widget class="GtkTreeView" id="treeview2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </widget> - </child> - </widget> - </child> - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow4"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <child> - <widget class="GtkVBox" id="vbox7"> - <property name="visible">True</property> - <child> - <widget class="GtkLabel" id="label17"> - <property name="visible">True</property> - <property name="label" translatable="yes">reporter association</property> - </widget> - <packing> - <property name="expand">False</property> - </packing> - </child> - <child> - <widget class="GtkTreeView" id="treeview3"> - <property name="visible">True</property> - <property name="can_focus">True</property> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - </child> - <child> - <widget class="GtkExpander" id="expander1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <placeholder/> - </child> - <child> - <widget class="GtkLabel" id="label13"> - <property name="visible">True</property> - <property name="label" translatable="yes">Plugin details</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label12"> - <property name="visible">True</property> - <property name="label" translatable="yes">Plugins</property> - </widget> - <packing> - <property name="type">tab</property> - <property name="position">1</property> - <property name="tab_fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area2"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - <child> - <widget class="GtkButton" id="button8"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="label" translatable="yes">gtk-apply</property> - <property name="use_stock">True</property> - <property name="response_id">0</property> - </widget> - </child> - <child> - <widget class="GtkButton" id="button9"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="label" translatable="yes">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="response_id">0</property> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="expand">False</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - </widget> - </child> - </widget> <widget class="GtkWindow" id="main_window2"> <property name="title" translatable="yes">Crash-catcher</property> <property name="window_position">GTK_WIN_POS_CENTER</property> @@ -717,6 +11,8 @@ <child> <widget class="GtkMenuBar" id="menubar2"> <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="tooltip" translatable="yes">Not implemented yet...</property> <child> <widget class="GtkMenuItem" id="menuitem5"> <property name="visible">True</property> @@ -859,7 +155,7 @@ <property name="spacing">10</property> <property name="homogeneous">True</property> <child> - <widget class="GtkButton" id="bDelet"> + <widget class="GtkButton" id="bDelete"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -869,11 +165,12 @@ </widget> </child> <child> - <widget class="GtkButton" id="button1"> + <widget class="GtkButton" id="bReport"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="label" translatable="yes">button</property> + <property name="label" translatable="yes">gtk-save</property> + <property name="use_stock">True</property> <property name="response_id">0</property> </widget> <packing> @@ -906,7 +203,7 @@ </widget> </child> <child> - <widget class="GtkButton" id="bQui"> + <widget class="GtkButton" id="bQuit"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -930,22 +227,73 @@ </packing> </child> <child> - <widget class="GtkTreeView" id="tvDump"> + <widget class="GtkScrolledWindow" id="swDumps"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <child> + <widget class="GtkTreeView" id="tvDumps"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </widget> + </child> </widget> <packing> <property name="position">2</property> </packing> </child> <child> + <widget class="GtkEventBox" id="evDescription"> + <property name="visible">True</property> + <child> + <widget class="GtkLabel" id="Description"> + <property name="visible">True</property> + <property name="xalign">0.05000000074505806</property> + <property name="label" translatable="yes"><span color="white">Description</span></property> + <property name="use_markup">True</property> + </widget> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">3</property> + </packing> + </child> + <child> + <widget class="GtkScrolledWindow" id="swDesscription"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <child> + <widget class="GtkViewport" id="vDescription"> + <property name="visible">True</property> + <property name="resize_mode">GTK_RESIZE_QUEUE</property> + <child> + <widget class="GtkLabel" id="lDescription"> + <property name="visible">True</property> + <property name="xalign">0.10000000149011612</property> + <property name="yalign">0.20000000298023224</property> + <property name="justify">GTK_JUSTIFY_FILL</property> + <property name="selectable">True</property> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="position">4</property> + </packing> + </child> + <child> <widget class="GtkStatusbar" id="statusbar1"> <property name="visible">True</property> <property name="spacing">2</property> </widget> <packing> <property name="expand">False</property> - <property name="position">3</property> + <property name="position">5</property> </packing> </child> </widget> diff --git a/src/Gui/report.glade b/src/Gui/report.glade new file mode 100644 index 00000000..d8bc9bbb --- /dev/null +++ b/src/Gui/report.glade @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> +<!--Generated with glade3 3.4.5 on Sat Feb 28 15:50:38 2009 --> +<glade-interface> + <widget class="GtkDialog" id="reporter_dialog"> + <property name="border_width">5</property> + <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property> + <property name="default_width">400</property> + <property name="default_height">400</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> + <property name="has_separator">False</property> + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox4"> + <property name="visible">True</property> + <property name="spacing">2</property> + <child> + <widget class="GtkVBox" id="vbox5"> + <property name="visible">True</property> + <child> + <widget class="GtkLabel" id="label10"> + <property name="visible">True</property> + <property name="label" translatable="yes">Report</property> + </widget> + <packing> + <property name="expand">False</property> + </packing> + </child> + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow5"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <child> + <widget class="GtkTreeView" id="tvReport"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </widget> + </child> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area4"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + <child> + <widget class="GtkButton" id="bApply"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="label" translatable="yes">gtk-apply</property> + <property name="use_stock">True</property> + <property name="response_id">-10</property> + </widget> + </child> + <child> + <widget class="GtkButton" id="bCancel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="label" translatable="yes">gtk-cancel</property> + <property name="use_stock">True</property> + <property name="response_id">-6</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + </widget> + </child> + </widget> +</glade-interface> |