##// END OF EJS Templates
remove set_interactive gtk check (fix #185)...
Paul Ivanov -
Show More
@@ -1149,19 +1149,6 b' class IPShellMatplotlibQt4(IPShellQt4):'
1149 1149 #-----------------------------------------------------------------------------
1150 1150 # Factory functions to actually start the proper thread-aware shell
1151 1151
1152 def check_gtk(mode):
1153 try:
1154 import gtk
1155 except (ImportError, RuntimeError):
1156 # GTK not present, or can't be started (no X11, happens in console)
1157 return mode
1158 if hasattr(gtk,'set_interactive'):
1159 gtk.set_interactive(False)
1160 return 'tkthread'
1161 else:
1162 return mode
1163
1164
1165 1152 def _select_shell(argv):
1166 1153 """Select a shell from the given argv vector.
1167 1154
@@ -1231,10 +1218,6 b' def _select_shell(argv):'
1231 1218 else:
1232 1219 # Any other backend, use plain Tk
1233 1220 th_mode = 'tkthread'
1234
1235 # New versions of pygtk don't need the brittle threaded support.
1236 th_mode = check_gtk(th_mode)
1237
1238 1221 return mpl_shell[th_mode]
1239 1222 else:
1240 1223 # No pylab requested, just plain threads
@@ -1242,10 +1225,6 b' def _select_shell(argv):'
1242 1225 th_mode = special_opts.pop()
1243 1226 except KeyError:
1244 1227 th_mode = 'tkthread'
1245
1246 # New versions of pygtk don't need the brittle threaded support.
1247 if th_mode == 'gthread':
1248 th_mode = check_gtk(th_mode)
1249 1228 return th_shell[th_mode]
1250 1229
1251 1230
General Comments 0
You need to be logged in to leave comments. Login now