##// END OF EJS Templates
Use appnope in qt and wx gui support from the terminal; closes #6189...
Eric Firing -
Show More
@@ -211,7 +211,9 b' class InputHookManager(object):'
211 211 raise ValueError("requires wxPython >= 2.8, but you have %s" % wx.__version__)
212 212
213 213 from IPython.lib.inputhookwx import inputhook_wx
214 from IPython.external.appnope import nope
214 215 self.set_inputhook(inputhook_wx)
216 nope()
215 217 self._current_gui = GUI_WX
216 218 import wx
217 219 if app is None:
@@ -227,9 +229,11 b' class InputHookManager(object):'
227 229
228 230 This merely sets PyOS_InputHook to NULL.
229 231 """
232 from IPython.external.appnope import nap
230 233 if GUI_WX in self._apps:
231 234 self._apps[GUI_WX]._in_event_loop = False
232 235 self.clear_inputhook()
236 nap()
233 237
234 238 def enable_qt4(self, app=None):
235 239 """Enable event loop integration with PyQt4.
@@ -254,8 +258,10 b' class InputHookManager(object):'
254 258 app = QtGui.QApplication(sys.argv)
255 259 """
256 260 from IPython.lib.inputhookqt4 import create_inputhook_qt4
261 from IPython.external.appnope import nope
257 262 app, inputhook_qt4 = create_inputhook_qt4(self, app)
258 263 self.set_inputhook(inputhook_qt4)
264 nope()
259 265
260 266 self._current_gui = GUI_QT4
261 267 app._in_event_loop = True
@@ -267,9 +273,11 b' class InputHookManager(object):'
267 273
268 274 This merely sets PyOS_InputHook to NULL.
269 275 """
276 from IPython.external.appnope import nap
270 277 if GUI_QT4 in self._apps:
271 278 self._apps[GUI_QT4]._in_event_loop = False
272 279 self.clear_inputhook()
280 nap()
273 281
274 282 def enable_gtk(self, app=None):
275 283 """Enable event loop integration with PyGTK.
General Comments 0
You need to be logged in to leave comments. Login now