From eb35c8f3c0dcf578309c78da28af5ef55e4dda61 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Wed, 11 Mar 2009 11:38:32 +0100 Subject: Changed gui according to rhbz#489624, fixed dbus timeouts --- src/Gui/CCDBusBackend.py | 13 ++-- src/Gui/CCMainWindow.py | 16 +++-- src/Gui/ccgui.glade | 173 ++++++----------------------------------------- 3 files changed, 38 insertions(+), 164 deletions(-) (limited to 'src') diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py index e18667c..1966dfd 100644 --- a/src/Gui/CCDBusBackend.py +++ b/src/Gui/CCDBusBackend.py @@ -26,7 +26,7 @@ class DBusManager(gobject.GObject): # new crash notify self.proxy.connect_to_signal("Crash",self.crash_cb,dbus_interface=CC_IFACE) # BT extracting complete - #self.acconnection = self.proxy.connect_to_signal("AnalyzeComplete",self.analyze_complete_cb,dbus_interface=CC_IFACE) + self.acconnection = self.proxy.connect_to_signal("AnalyzeComplete",self.analyze_complete_cb,dbus_interface=CC_IFACE) else: raise Exception("Proxy object doesn't exist!") @@ -35,8 +35,13 @@ class DBusManager(gobject.GObject): print "disconnect" def error_handler(self,*args): - for arg in args: - print "error %s" % arg + print "Error" + #for arg in args: + # print "error %s" % arg + + def dummy(*args): + # dummy function for async method call to workaround the timeout + pass def crash_cb(self,*args): #FIXME "got another crash, gui should reload!" @@ -65,7 +70,7 @@ class DBusManager(gobject.GObject): try: # let's try it async # even if it's async it timeouts, so let's try to set the timeout to 60sec - self.cc.CreateReport(UUID, reply_handler=self.analyze_complete_cb, error_handler=self.error_handler, timeout=60) + self.cc.CreateReport(UUID, reply_handler=self.dummy, error_handler=self.error_handler, timeout=60) except dbus.exceptions.DBusException, e: raise Exception(e.message) diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py index ed9c05c..0e73cf1 100644 --- a/src/Gui/CCMainWindow.py +++ b/src/Gui/CCMainWindow.py @@ -80,7 +80,7 @@ class MainWindow(): self.dlist.connect("cursor-changed", self.on_tvDumps_cursor_changed) 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.wTree.get_widget("miQuit").connect("activate", self.on_bQuit_clicked) self.ccdaemon.connect("crash", self.on_data_changed_cb, None) self.ccdaemon.connect("analyze-complete", self.on_analyze_complete_cb, self.pBarWindow) @@ -138,7 +138,7 @@ class MainWindow(): print e def destroy(self, widget, data=None): - print "destroy signal occurred" + #print "destroy signal occurred" gtk.main_quit() def on_data_changed_cb(self, *args): @@ -195,13 +195,15 @@ class MainWindow(): 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) + #return self.on_bQuit_clicked(widget) + gtk.main_quit() 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 + # quit dialog seems to be anoying... + #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() diff --git a/src/Gui/ccgui.glade b/src/Gui/ccgui.glade index 7e7715e..a2093d1 100644 --- a/src/Gui/ccgui.glade +++ b/src/Gui/ccgui.glade @@ -1,6 +1,6 @@ - + Automatic Bug Reporting Tool @@ -11,8 +11,6 @@ True - False - Not implemented yet... True @@ -22,44 +20,7 @@ True - - True - gtk-new - True - True - - - - - True - gtk-open - True - True - - - - - True - gtk-save - True - True - - - - - True - gtk-save-as - True - True - - - - - True - - - - + True gtk-quit True @@ -70,57 +31,6 @@ - - - True - _Edit - True - - - True - - - True - gtk-cut - True - True - - - - - True - gtk-copy - True - True - - - - - True - gtk-paste - True - True - - - - - True - gtk-delete - True - True - - - - - - - - - True - _View - True - - True @@ -147,77 +57,34 @@ - + True - + True - 10 - True - - - True - True - True - gtk-delete - True - 0 - - - - - True - True - True - gtk-save - True - 0 - - - 1 - - - - - True - - - - - - 2 - - + Delete + gtk-delete + + True + - + True + Report + gtk-save + + True - - - True - - - - - - - - True - True - True - gtk-quit - True - 0 - - - 1 - - + + + + + True - 1 + True -- cgit