[gedit] Use introspected GLib



commit 4cb4f2a27c42b2e65520538b4a8870ee88bd0155
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Aug 15 19:23:49 2011 +0200

    Use introspected GLib

 plugins/externaltools/tools/library.py      |    6 +++---
 plugins/snippets/snippets/appactivatable.py |    6 ++----
 2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/plugins/externaltools/tools/library.py b/plugins/externaltools/tools/library.py
index 82ca83d..1e4ef64 100644
--- a/plugins/externaltools/tools/library.py
+++ b/plugins/externaltools/tools/library.py
@@ -20,7 +20,7 @@ import os
 import re
 import locale
 import platform
-import glib
+from gi.repository import GLib
 
 class Singleton(object):
     _instance = None
@@ -54,7 +54,7 @@ class ToolLibrary(Singleton):
             if userdir:
                 toolsdir = os.path.join(userdir, 'gedit/tools')
             else:
-                toolsdir = os.path.join(glib.get_user_config_dir(), 'gedit/tools')
+                toolsdir = os.path.join(GLib.get_user_config_dir(), 'gedit/tools')
 
         self.locations.insert(0, toolsdir);
 
@@ -83,7 +83,7 @@ class ToolLibrary(Singleton):
         if userdir:
             filename = os.path.join(userdir, 'gedit/gedit-tools.xml')
         else:
-            filename = os.path.join(glib.get_user_config_dir(), 'gedit/gedit-tools.xml')
+            filename = os.path.join(GLib.get_user_config_dir(), 'gedit/gedit-tools.xml')
 
         if not os.path.isfile(filename):
             return
diff --git a/plugins/snippets/snippets/appactivatable.py b/plugins/snippets/snippets/appactivatable.py
index 533d704..c52c4cc 100644
--- a/plugins/snippets/snippets/appactivatable.py
+++ b/plugins/snippets/snippets/appactivatable.py
@@ -19,9 +19,7 @@ import sys
 import os
 import shutil
 
-import glib
-
-from gi.repository import Gedit, GObject, Gtk
+from gi.repository import Gedit, GLib, GObject, Gtk
 import platform
 
 from library import Library
@@ -46,7 +44,7 @@ class AppActivatable(GObject.Object, Gedit.AppActivatable):
                         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())
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]