summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Gui/CCDBusBackend.py13
-rw-r--r--src/Gui/CCMainWindow.py16
-rw-r--r--src/Gui/ccgui.glade173
3 files changed, 38 insertions, 164 deletions
diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py
index e18667c6..1966dfda 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 ed9c05cb..0e73cf13 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 7e7715eb..a2093d1d 100644
--- a/src/Gui/ccgui.glade
+++ b/src/Gui/ccgui.glade
@@ -1,6 +1,6 @@
<?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 Mar 5 14:44:34 2009 -->
+<!--Generated with glade3 3.4.5 on Wed Mar 11 11:27:03 2009 -->
<glade-interface>
<widget class="GtkWindow" id="main_window2">
<property name="title" translatable="yes">Automatic Bug Reporting Tool</property>
@@ -11,8 +11,6 @@
<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>
@@ -22,44 +20,7 @@
<widget class="GtkMenu" id="menu4">
<property name="visible">True</property>
<child>
- <widget class="GtkImageMenuItem" id="imagemenuitem11">
- <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="imagemenuitem12">
- <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="imagemenuitem13">
- <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="imagemenuitem14">
- <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="separatormenuitem2">
- <property name="visible">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="imagemenuitem15">
+ <widget class="GtkImageMenuItem" id="miQuit">
<property name="visible">True</property>
<property name="label" translatable="yes">gtk-quit</property>
<property name="use_underline">True</property>
@@ -71,57 +32,6 @@
</widget>
</child>
<child>
- <widget class="GtkMenuItem" id="menuitem6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Edit</property>
- <property name="use_underline">True</property>
- <child>
- <widget class="GtkMenu" id="menu5">
- <property name="visible">True</property>
- <child>
- <widget class="GtkImageMenuItem" id="imagemenuitem16">
- <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="imagemenuitem17">
- <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="imagemenuitem18">
- <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="imagemenuitem19">
- <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="menuitem7">
- <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="menuitem8">
<property name="visible">True</property>
<property name="label" translatable="yes">_Help</property>
@@ -147,77 +57,34 @@
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox8">
+ <widget class="GtkToolbar" id="toolbar1">
<property name="visible">True</property>
<child>
- <widget class="GtkHBox" id="hbox9">
+ <widget class="GtkToolButton" id="bDelete">
<property name="visible">True</property>
- <property name="spacing">10</property>
- <property name="homogeneous">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="bReport">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="label" translatable="yes">gtk-save</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="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
+ <property name="label" translatable="yes">Delete</property>
+ <property name="stock_id">gtk-delete</property>
</widget>
+ <packing>
+ <property name="homogeneous">True</property>
+ </packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox10">
+ <widget class="GtkToolButton" id="bReport">
<property name="visible">True</property>
+ <property name="label" translatable="yes">Report</property>
+ <property name="stock_id">gtk-save</property>
+ </widget>
+ <packing>
<property name="homogeneous">True</property>
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
- </widget>
- </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">1</property>
- </packing>
- </child>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSeparatorToolItem" id="toolbutton1">
+ <property name="visible">True</property>
</widget>
<packing>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</widget>