Don't try to use the plugin if moo.term not available

master
Yevgen Muntyan 2006-11-15 15:41:34 -06:00
parent d07dbb8be6
commit 234644a206
1 changed files with 9 additions and 5 deletions

View File

@ -62,9 +62,13 @@ class WinPlugin(moo.edit.WinPlugin):
self.window.remove_pane(TERMINAL_PLUGIN_ID)
__plugin__ = None
if os.name == 'posix':
gobject.type_register(Plugin)
gobject.type_register(WinPlugin)
__plugin__ = Plugin
else:
__plugin__ = None
try:
import moo.term
gobject.type_register(Plugin)
gobject.type_register(WinPlugin)
__plugin__ = Plugin
except ImportError:
pass