##// END OF EJS Templates
Fixed two bugs in inputhook.
Brian Granger -
Show More
@@ -102,6 +102,12 b' class InputHookManager(object):'
102 102 if app:
103 103 import wx
104 104 app = wx.App(redirect=False, clearSigInt=False)
105 # The import of wx on Linux sets the handler for signal.SIGINT
106 # to 0. This is a bug in wx or gtk. We fix by just setting it
107 # back to the Python default.
108 import signal
109 if not callable(signal.getsignal(signal.SIGINT)):
110 signal.signal(signal.SIGINT, signal.default_int_handler)
105 111 return app
106 112
107 113 def disable_wx(self):
@@ -176,7 +182,8 b' class InputHookManager(object):'
176 182 except AttributeError:
177 183 # For older versions of gtk, use our own ctypes version
178 184 from IPython.lib.inputhookgtk import inputhook_gtk
179 add_inputhook(inputhook_gtk)
185 self.set_inputhook(inputhook_gtk)
186 self._current_gui = 'gtk'
180 187
181 188 def disable_gtk(self):
182 189 """Disable event loop integration with PyGTK.
General Comments 0
You need to be logged in to leave comments. Login now