Commits

Arne Babenhauserheide  committed 2d15d3c

added shutdown handling.

  • Participants
  • Parent commits 092ee7c

Comments (0)

Files changed (2)

File Changelog.txt

 - Icon Editor: show a preview of the icon.
 - Icon Editor: Added a delete and a folder. 
 - Register Alt-F6 and Meta-F6 als global shortcuts. 
+- FIX: Crash at logout ⇒ Added shutdown handling. 
 
 pyRad 0.4.3
 
 # KApplication for basics
 from PyKDE4.kdeui import KUniqueApplication
 
+# SIGNALs and SLOTs for a clean shutdown. 
+from PyQt4.QtCore import SIGNAL, SLOT
+
 # and exiting.
 from sys import exit as exit_
 
         # And get and show the GUI
         Rad = importRad()
         self.rad = Rad()
+        self.connect(self, SIGNAL("shutDown()"), self.close)
+        self.connect(self, SIGNAL("shutDown()"), self.quit)
+
+    def close(self):
+        """Slot for closing the rad."""
+        self.rad.close()
 
     def newInstance(self):
         """Get a new instance -> in reality only check if there's already an instance and tell the GUI to run."""