[gedit] Fix snippets platform detection for windows
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Fix snippets platform detection for windows
- Date: Fri, 20 Jan 2012 22:09:26 +0000 (UTC)
commit 579d445e3c3e8f593ebf902c59ba00895ce5abfc
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Fri Jan 20 23:08:26 2012 +0100
Fix snippets platform detection for windows
plugins/snippets/snippets/appactivatable.py | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/plugins/snippets/snippets/appactivatable.py b/plugins/snippets/snippets/appactivatable.py
index c52c4cc..63f9147 100644
--- a/plugins/snippets/snippets/appactivatable.py
+++ b/plugins/snippets/snippets/appactivatable.py
@@ -37,19 +37,15 @@ class AppActivatable(GObject.Object, Gedit.AppActivatable):
# Initialize snippets library
library = Library()
- if platform.platform() == 'Windows':
+ if platform.system() == 'Windows':
snippetsdir = os.path.expanduser('~/gedit/snippets')
else:
- userdir = os.getenv('GNOME22_USER_DIR')
- if userdir:
- snippetsdir = os.path.join(userdir, 'gedit/snippets')
- else:
- snippetsdir = os.path.join(GLib.get_user_config_dir(), 'gedit/snippets')
+ snippetsdir = os.path.join(GLib.get_user_config_dir(), 'gedit/snippets')
library.set_dirs(snippetsdir, self.system_dirs())
def system_dirs(self):
- if platform.platform() != 'Windows':
+ if platform.system() != 'Windows':
if 'XDG_DATA_DIRS' in os.environ:
datadirs = os.environ['XDG_DATA_DIRS']
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]