Commits

Marcin Kasperski committed 69297ff

twisted

Comments (0)

Files changed (1)

src/mekk/nozbe2xmind/gui.py

 from twisted.internet import gtk2reactor
 gtk2reactor.install()
 
+from twisted.internet import reactor
+
 import pygtk
 import gtk, gtk.glade
 
         self.wTree = gtk.glade.XML(self.gladefile)
         self.window = self.wTree.get_widget("MainWindow")
         if (self.window):
-            self.window.connect("destroy", gtk.main_quit)
+            self.window.connect("destroy", self.close)
+
+    def close(self, widget, data=None):
+        reactor.stop()
+
 
 if __name__ == "__main__":
     hwg = MainWindow()
-    gtk.main()
+    #gtk.main()
+    reactor.run()