Changeset - d5692ab6bc2a
[Not reviewed]
default
0 2 0
Drew Perttula - 13 years ago 2012-06-10 05:57:15
drewp@bigasterisk.com
fix quit and ctrl-q by using kill -9
Ignore-this: db0474f9352cc297bf2e596ac42aee1c
2 files changed with 11 insertions and 2 deletions:
0 comments (0 inline, 0 general)
bin/curvecalc
Show inline comments
 
@@ -15,7 +15,7 @@ from twisted.internet import gtk2reactor
 
gtk2reactor.install()
 
from twisted.internet import reactor
 

	
 
import time, textwrap, os, optparse, urllib2, gtk, gobject, linecache
 
import time, textwrap, os, optparse, urllib2, gtk, gobject, linecache, signal
 
import louie as dispatcher 
 
from twisted.python.util import sibpath
 
from rdflib import URIRef
 
@@ -51,7 +51,8 @@ class Main(object):
 
        wtree = gtk.Builder()
 
        wtree.add_from_file(sibpath(__file__, "../light9/curvecalc/curvecalc.glade"))
 
        mainwin = wtree.get_object("MainWindow")
 
        mainwin.connect("destroy", gtk.main_quit)
 
        
 
        mainwin.connect("destroy", self.onQuit)
 
        wtree.connect_signals(self)
 
        mainwin.show_all()
 

	
 
@@ -103,6 +104,12 @@ class Main(object):
 
        
 
        self.makeStatusLines(wtree.get_object("status"))
 

	
 
    def onQuit(self, *args):
 
        reactor.crash()
 
        # there's a hang after this, maybe in sem_wait in two
 
        # threads. I don't know whose they are.
 
        os.kill(os.getpid(), signal.SIGKILL)
 

	
 
    def onSeeCurrentTime(self, item):
 
        dispatcher.send("see time")
 

	
light9/curvecalc/curvecalc.glade
Show inline comments
 
@@ -41,6 +41,8 @@
 
                        <property name="use_action_appearance">False</property>
 
                        <property name="use_underline">True</property>
 
                        <property name="use_stock">True</property>
 
                        <accelerator key="q" signal="activate" modifiers="GDK_CONTROL_MASK"/>
 
                        <signal name="activate" handler="onQuit" swapped="no"/>
 
                      </object>
 
                    </child>
 
                  </object>
0 comments (0 inline, 0 general)