[gnome-clocks] Make Ctrl+C work



commit c9c64b960f18758fb334324f02ca571fabf78028
Author: Seif Lotfy <seif lotfy com>
Date:   Fri Aug 17 11:31:41 2012 +0200

    Make Ctrl+C work
    
    Added a workaround for Ctrl+C to work by binding SIGINT to SIG_DFL
    
    Signed-off-by: Seif Lotfy <seif lotfy com>

 gnome-clocks |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gnome-clocks b/gnome-clocks
index 8e45b4d..e06574f 100755
--- a/gnome-clocks
+++ b/gnome-clocks
@@ -20,6 +20,7 @@
 # Author: Seif Lotfy <seif lotfy collabora co uk>
 
 import os
+import signal
 import sys
 
 # Detect if we are running from the source dir
@@ -55,5 +56,9 @@ from gnomeclocks.app import ClocksApplication
 
 if __name__ == "__main__":
     app = ClocksApplication ()
+    # FIXME: Get rid of the following line which has the only purpose of working
+    # around Ctrl+C not exiting Gtk applications from bug 622084.
+    # https://bugzilla.gnome.org/show_bug.cgi?id=622084
+    signal.signal(signal.SIGINT, signal.SIG_DFL)
     exit_status = app.run(sys.argv)
     sys.exit(exit_status)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]