[gnome-games/gnome-3-0] sudoku: Replace pygtk.require with gi.require_version
- From: Thomas Hindoe Paaboel Andersen <thomashpa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/gnome-3-0] sudoku: Replace pygtk.require with gi.require_version
- Date: Fri, 20 May 2011 21:15:01 +0000 (UTC)
commit 2c4f9fe51c8149b6a58bab6619350b688fb6bc73
Author: Thomas Hindoe Paaboel Andersen <phomes gmail com>
Date: Sat Apr 2 13:08:01 2011 +0200
sudoku: Replace pygtk.require with gi.require_version
gnome-sudoku/src/lib/main.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index b6133b8..66d27a9 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -1,13 +1,10 @@
# -*- coding: utf-8 -*-
-try:
- import pygtk
- pyGtk.require('2.0')
-except ImportError, err:
- print ("PyGTK not found. Please make sure it is installed properly and referenced in your PYTHONPATH environment variable.")
-
import os.path
import threading
+import gi
+gi.require_version("Gtk", "3.0")
+
import gobject
from gi.repository import Gtk
from gi.repository import Pango
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]