[totem] pythonconsole: Update gi.require_version for python modules
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] pythonconsole: Update gi.require_version for python modules
- Date: Mon, 11 Sep 2017 12:25:00 +0000 (UTC)
commit 382f18e463c2be1a10265afc2a2f4f43fbda0ea8
Author: vrishab <gnome vrb gmail com>
Date: Thu Dec 8 00:39:46 2016 +0530
pythonconsole: Update gi.require_version for python modules
https://bugzilla.gnome.org/show_bug.cgi?id=759075
src/plugins/pythonconsole/console.py | 5 +++++
src/plugins/pythonconsole/pythonconsole.py | 11 +++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/pythonconsole/console.py b/src/plugins/pythonconsole/console.py
index 4ffd6a4..112d9cd 100644
--- a/src/plugins/pythonconsole/console.py
+++ b/src/plugins/pythonconsole/console.py
@@ -35,6 +35,11 @@
import sys
import re
import traceback
+import gi
+
+gi.require_version('Gtk', '3.0')
+gi.require_version('Pango', '1.0')
+
from gi.repository import GLib, Pango, Gtk, Gdk # pylint: disable-msg=E0611
class PythonConsole(Gtk.ScrolledWindow): # pylint: disable-msg=R0902
diff --git a/src/plugins/pythonconsole/pythonconsole.py b/src/plugins/pythonconsole/pythonconsole.py
index 24dafbe..21d6048 100644
--- a/src/plugins/pythonconsole/pythonconsole.py
+++ b/src/plugins/pythonconsole/pythonconsole.py
@@ -32,13 +32,20 @@
# Monday 7th February 2005: Christian Schaller: Add exception clause.
# See license_change file for details.
-from console import PythonConsole, OutFile
+import gi
-__all__ = ('PythonConsole', 'OutFile') # pylint: disable-msg=E0603
+gi.require_version('Gtk', '3.0')
+gi.require_version('Peas', '1.0')
+gi.require_version('Pango', '1.0')
+gi.require_version('Totem', '1.0')
from gi.repository import GObject, Peas, Gtk, Totem # pylint: disable-msg=E0611
from gi.repository import Gio # pylint: disable-msg=E0611
+from console import PythonConsole, OutFile
+
+__all__ = ('PythonConsole', 'OutFile') # pylint: disable-msg=E0603
+
try:
import rpdb2
HAVE_RPDB2 = True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]