summaryrefslogtreecommitdiff
path: root/plugins/externaltools/tools/library.py
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-12-14 15:35:49 +0300
committermonsta <[email protected]>2016-12-19 14:16:30 +0300
commit4ea3ff79c350c9af799ed76e72e5c862af3eb73e (patch)
tree1eeb0c435c0e3adc512efb55c72cb3747cc27a58 /plugins/externaltools/tools/library.py
parent38c20e460232c5f4ec7bf616180ff777b5d6b3a0 (diff)
downloadpluma-4ea3ff79c350c9af799ed76e72e5c862af3eb73e.tar.bz2
pluma-4ea3ff79c350c9af799ed76e72e5c862af3eb73e.tar.xz
externaltools plugin: port to gi and libpeas
note: tools manager dialog can now be invoked only via Pluma's menu. Preferences button in plugin manager is inactive. re-enabling it would mean introducing even more complexity, because we would need to pass a configure widget to libpeas, not the whole dialog. mostly adapted from: https://git.gnome.org/browse/gedit/commit/?id=8b6d353e0ab94ad52ce6119759db5e14b281fbba https://git.gnome.org/browse/gedit/commit/?id=2aa6071912dac227f04f44c07e07f159b77be7ff https://git.gnome.org/browse/gedit/commit/?id=09738cd6f5f24a37cb7dd85dfca7a5099529e5d2 https://git.gnome.org/browse/gedit/commit/?id=f08e9d2953fa213f77dce635127c3a0131fba02f https://git.gnome.org/browse/gedit/commit/?id=d09a703e84f818dcadd7bd1c16c2091305a691c2 https://git.gnome.org/browse/gedit/commit/?id=985f3908abe3f2ade53db1364dccf0d1fd61ec1b https://git.gnome.org/browse/gedit/commit/?id=b6086cab8c664d2cfb3e5b4a6d33c215d1b207da https://git.gnome.org/browse/gedit/commit/?id=befd854563e4691a6b75b03695d6a7c458836312 https://git.gnome.org/browse/gedit/commit/?id=cf7549c8e5944a3fbf9d18170b6e45a552071b4c https://git.gnome.org/browse/gedit/commit/?id=6c95d28a13ae87232346583a86ae525a22fcc651 https://git.gnome.org/browse/gedit/commit/?id=c70319048b42b898fd6c2f6ee37e98e54cea54be
Diffstat (limited to 'plugins/externaltools/tools/library.py')
-rwxr-xr-xplugins/externaltools/tools/library.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/externaltools/tools/library.py b/plugins/externaltools/tools/library.py
index 09a0cd42..b4e6924e 100755
--- a/plugins/externaltools/tools/library.py
+++ b/plugins/externaltools/tools/library.py
@@ -19,6 +19,7 @@
import os
import re
import locale
+from gi.repository import GLib
class Singleton(object):
_instance = None
@@ -44,7 +45,7 @@ class ToolLibrary(Singleton):
self.locations.append(datadir)
# self.locations[0] is where we save the custom scripts
- toolsdir = os.path.expanduser('~/.config/pluma/tools')
+ toolsdir = os.path.join(GLib.get_user_config_dir(), 'pluma/tools')
self.locations.insert(0, toolsdir);
if not os.path.isdir(self.locations[0]):
@@ -68,7 +69,7 @@ class ToolLibrary(Singleton):
# storage file.
def import_old_xml_store(self):
import xml.etree.ElementTree as et
- filename = os.path.expanduser('~/.config/pluma/pluma-tools.xml')
+ filename = os.path.join(GLib.get_user_config_dir(), 'pluma/pluma-tools.xml')
if not os.path.isfile(filename):
return