[gedit-plugins] More gi.require_version



commit 838a6313d5be3fab109a356c71c395bb96f92e19
Author: Paolo Borelli <pborelli gnome org>
Date:   Mon Aug 17 10:55:53 2015 +0200

    More gi.require_version

 plugins/charmap/charmap/__init__.py |    9 +++++++--
 plugins/synctex/synctex/__init__.py |    6 ++++++
 2 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/plugins/charmap/charmap/__init__.py b/plugins/charmap/charmap/__init__.py
index 0af4257..f7016e4 100644
--- a/plugins/charmap/charmap/__init__.py
+++ b/plugins/charmap/charmap/__init__.py
@@ -17,12 +17,16 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
+import sys
+import gettext
+
 import gi
+gi.require_version('Gedit', '3.0')
+gi.require_version('Pango', '1.0')
+gi.require_version('Gtk', '3.0')
 gi.require_version('Gucharmap', '2.90')
 from gi.repository import GObject, Gio, Pango, Gtk, Gedit, Gucharmap
 from .panel import CharmapPanel
-import sys
-import gettext
 from gpdefs import *
 
 try:
@@ -31,6 +35,7 @@ try:
 except:
     _ = lambda s: s
 
+
 class CharmapPlugin(GObject.Object, Gedit.WindowActivatable):
     __gtype_name__ = "CharmapPlugin"
 
diff --git a/plugins/synctex/synctex/__init__.py b/plugins/synctex/synctex/__init__.py
index a665cb7..77f59d0 100644
--- a/plugins/synctex/synctex/__init__.py
+++ b/plugins/synctex/synctex/__init__.py
@@ -1 +1,7 @@
+import gi
+gi.require_version('Gedit', '3.0')
+gi.require_version('Gtk', '3.0')
+gi.require_version('Peas', '1.0')
+gi.require_version('PeasGtk', '1.0')
+
 from .synctex import SynctexAppActivatable, SynctexWindowActivatable


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