25
25
path = os.path.dirname(__file__)
27
27
if not path in sys.path:
28
sys.path.insert(0, path)
28
sys.path.insert(0, path)
30
30
from windowactivatable import WindowActivatable
31
31
import commander.commands as commands
32
32
from gi.repository import GObject, GLib, Gedit
34
34
class CommanderPlugin(GObject.Object, Gedit.AppActivatable):
35
__gtype_name__ = "CommanderPlugin"
37
app = GObject.property(type=Gedit.App)
40
GObject.Object.__init__(self)
42
def do_activate(self):
43
self._path = os.path.dirname(__file__)
45
if not self._path in sys.path:
46
sys.path.insert(0, self._path)
48
commands.Commands().set_dirs([
49
os.path.join(GLib.get_user_config_dir(), 'gedit/commander/modules'),
50
os.path.join(self.plugin_info.get_data_dir(), 'modules')
54
commands.Commands().stop()
56
if self._path in sys.path:
57
sys.path.remove(self._path)
35
__gtype_name__ = "CommanderPlugin"
37
app = GObject.property(type=Gedit.App)
40
GObject.Object.__init__(self)
42
def do_activate(self):
43
self._path = os.path.dirname(__file__)
45
if not self._path in sys.path:
46
sys.path.insert(0, self._path)
48
commands.Commands().set_dirs([
49
os.path.join(GLib.get_user_config_dir(), 'gedit/commander/modules'),
50
os.path.join(self.plugin_info.get_data_dir(), 'modules')
54
commands.Commands().stop()
56
if self._path in sys.path:
57
sys.path.remove(self._path)