diff options
author | Vadim Barkov <[email protected]> | 2016-12-19 23:24:10 +0300 |
---|---|---|
committer | Vadim Barkov <[email protected]> | 2016-12-19 23:24:10 +0300 |
commit | 98c44e3c9455581f90c4f6a70fc42adf986d8206 (patch) | |
tree | e9de2a70895a7f28d47eb12b12f9e3d33c64faa3 /plugins/externaltools/tools/library.py | |
parent | 2314b3828cbe540d65ba517c32872476417501a6 (diff) | |
parent | 38c20e460232c5f4ec7bf616180ff777b5d6b3a0 (diff) | |
download | pluma-98c44e3c9455581f90c4f6a70fc42adf986d8206.tar.bz2 pluma-98c44e3c9455581f90c4f6a70fc42adf986d8206.tar.xz |
Merge branch 'master' of https://github.com/mate-desktop/pluma
Diffstat (limited to 'plugins/externaltools/tools/library.py')
-rwxr-xr-x | plugins/externaltools/tools/library.py | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/plugins/externaltools/tools/library.py b/plugins/externaltools/tools/library.py index 039e0a50..09a0cd42 100755 --- a/plugins/externaltools/tools/library.py +++ b/plugins/externaltools/tools/library.py @@ -19,7 +19,6 @@ import os import re import locale -import platform class Singleton(object): _instance = None @@ -39,22 +38,13 @@ class ToolLibrary(Singleton): def set_locations(self, datadir): self.locations = [] - if platform.platform() != 'Windows': - for d in self.get_xdg_data_dirs(): - self.locations.append(os.path.join(d, 'pluma', 'plugins', 'externaltools', 'tools')) + for d in self.get_xdg_data_dirs(): + self.locations.append(os.path.join(d, 'pluma', 'plugins', 'externaltools', 'tools')) self.locations.append(datadir) # self.locations[0] is where we save the custom scripts - if platform.platform() == 'Windows': - toolsdir = os.path.expanduser('~/pluma/tools') - else: - userdir = os.getenv('MATE22_USER_DIR') - if userdir: - toolsdir = os.path.join(userdir, 'pluma/tools') - else: - toolsdir = os.path.expanduser('~/.config/pluma/tools') - + toolsdir = os.path.expanduser('~/.config/pluma/tools') self.locations.insert(0, toolsdir); if not os.path.isdir(self.locations[0]): @@ -78,11 +68,7 @@ class ToolLibrary(Singleton): # storage file. def import_old_xml_store(self): import xml.etree.ElementTree as et - userdir = os.getenv('MATE22_USER_DIR') - if userdir: - filename = os.path.join(userdir, 'pluma/pluma-tools.xml') - else: - filename = os.path.expanduser('~/.config/pluma/pluma-tools.xml') + filename = os.path.expanduser('~/.config/pluma/pluma-tools.xml') if not os.path.isfile(filename): return |