summaryrefslogtreecommitdiff
path: root/plugins/snippets
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-11-07 21:10:16 -0300
committerPerberos <[email protected]>2011-11-07 21:10:16 -0300
commit421415f7cb1ba9c8a97a1837d4f789242c2fb0e6 (patch)
treeff577138b5844466f1a22527c4f92e805a607c7c /plugins/snippets
parent1d63a49a77ab8f7d01daef6ce18e57100508067b (diff)
downloadpluma-421415f7cb1ba9c8a97a1837d4f789242c2fb0e6.tar.bz2
pluma-421415f7cb1ba9c8a97a1837d4f789242c2fb0e6.tar.xz
using ./config/ instead of ./mate2/
Diffstat (limited to 'plugins/snippets')
-rwxr-xr-xplugins/snippets/snippets/__init__.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/plugins/snippets/snippets/__init__.py b/plugins/snippets/snippets/__init__.py
index 609e3c0c..e74ecd28 100755
--- a/plugins/snippets/snippets/__init__.py
+++ b/plugins/snippets/snippets/__init__.py
@@ -20,7 +20,7 @@ import os
import shutil
import gtk
-from gtk import gdk
+from gtk import gdk
import pluma
import platform
@@ -34,7 +34,7 @@ class SnippetsPlugin(pluma.Plugin):
pluma.Plugin.__init__(self)
self.dlg = None
-
+
library = Library()
library.set_accelerator_callback(self.accelerator_activated)
@@ -45,7 +45,7 @@ class SnippetsPlugin(pluma.Plugin):
if userdir:
snippetsdir = os.path.join(userdir, 'pluma/snippets')
else:
- snippetsdir = os.path.expanduser('~/.mate2/pluma/snippets')
+ snippetsdir = os.path.expanduser('~/.config/pluma/snippets')
library.set_dirs(snippetsdir, self.system_dirs())
@@ -55,18 +55,18 @@ class SnippetsPlugin(pluma.Plugin):
datadirs = os.environ['XDG_DATA_DIRS']
else:
datadirs = '/usr/local/share' + os.pathsep + '/usr/share'
-
+
dirs = []
-
+
for d in datadirs.split(os.pathsep):
- d = os.path.join(d, 'pluma-2', 'plugins', 'snippets')
-
+ d = os.path.join(d, 'pluma', 'plugins', 'snippets')
+
if os.path.isdir(d):
dirs.append(d)
-
+
dirs.append(self.get_data_dir())
return dirs
-
+
def activate(self, window):
data = WindowHelper(self)
window._snippets_plugin_data = data
@@ -75,23 +75,23 @@ class SnippetsPlugin(pluma.Plugin):
def deactivate(self, window):
window._snippets_plugin_data.stop()
window._snippets_plugin_data = None
-
+
def update_ui(self, window):
window._snippets_plugin_data.update()
-
+
def create_configure_dialog(self):
if not self.dlg:
self.dlg = Manager(self.get_data_dir())
else:
self.dlg.run()
-
+
window = pluma.app_get_default().get_active_window()
-
+
if window:
self.dlg.dlg.set_transient_for(window)
-
+
return self.dlg.dlg
-
+
def accelerator_activated(self, group, obj, keyval, mod):
ret = False