summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-12-13 18:44:33 +0300
committermonsta <[email protected]>2016-12-13 18:44:33 +0300
commit2d093965b129430ce20dcfb8fe1c561e818a9740 (patch)
tree42b54b6d89d98ab86b993e48339cab2a375aff37 /plugins
parentda8d189ae2ca44e32920dba59d0c31b1a8671f75 (diff)
downloadpluma-2d093965b129430ce20dcfb8fe1c561e818a9740.tar.bz2
pluma-2d093965b129430ce20dcfb8fe1c561e818a9740.tar.xz
externaltools plugin: kill useless code
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/externaltools/tools/library.py22
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