summaryrefslogtreecommitdiff
path: root/examples/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gtk')
-rw-r--r--examples/gtk/application.py2
-rw-r--r--examples/gtk/bin.py3
-rw-r--r--examples/gtk/customtreemodel.py2
-rw-r--r--examples/gtk/mirror.py2
-rw-r--r--examples/gtk/scrollable.py2
-rw-r--r--examples/gtk/sizegroup.py2
-rw-r--r--examples/gtk/testprint.py3
-rw-r--r--examples/gtk/treeview_dnd.py2
-rw-r--r--examples/gtk/widget.py2
9 files changed, 20 insertions, 0 deletions
diff --git a/examples/gtk/application.py b/examples/gtk/application.py
index 5d654288..02ea56fa 100644
--- a/examples/gtk/application.py
+++ b/examples/gtk/application.py
@@ -1,5 +1,7 @@
# By Jarek Zgoda and Johan Dahlin
+import pygtk
+pygtk.require('2.0')
import gtk
ui_string = """<ui>
diff --git a/examples/gtk/bin.py b/examples/gtk/bin.py
index fa8d7afa..407120db 100644
--- a/examples/gtk/bin.py
+++ b/examples/gtk/bin.py
@@ -1,4 +1,7 @@
# A simple gtk.Conatiner subclassing example reimplementing gtk.Bin in python
+
+import pygtk
+pygtk.require('2.0')
import gtk
class Bin(gtk.Container):
diff --git a/examples/gtk/customtreemodel.py b/examples/gtk/customtreemodel.py
index 27335dce..739c3015 100644
--- a/examples/gtk/customtreemodel.py
+++ b/examples/gtk/customtreemodel.py
@@ -3,6 +3,8 @@
import sys
import weakref
+import pygtk
+pygtk.require('2.0')
import pango
import gtk
diff --git a/examples/gtk/mirror.py b/examples/gtk/mirror.py
index 877b725a..805a1571 100644
--- a/examples/gtk/mirror.py
+++ b/examples/gtk/mirror.py
@@ -3,6 +3,8 @@
# ctypes to wrap otherwise unexposed GObject API
# John Stowers
+import pygtk
+pygtk.require('2.0')
import gobject
import cairo
import gtk
diff --git a/examples/gtk/scrollable.py b/examples/gtk/scrollable.py
index 0a79246c..5b1c3c57 100644
--- a/examples/gtk/scrollable.py
+++ b/examples/gtk/scrollable.py
@@ -6,6 +6,8 @@
#
# Requires PyGTK 2.8.0 or later
+import pygtk
+pygtk.require('2.0')
import gobject
import gtk
from gtk import gdk
diff --git a/examples/gtk/sizegroup.py b/examples/gtk/sizegroup.py
index a88308d3..10658732 100644
--- a/examples/gtk/sizegroup.py
+++ b/examples/gtk/sizegroup.py
@@ -12,6 +12,8 @@ aligned vertically. We can accomplish this by adding a horizontal
sizegroup to the labels.
"""
+import pygtk
+pygtk.require('2.0')
import gtk
def create_label(text):
diff --git a/examples/gtk/testprint.py b/examples/gtk/testprint.py
index 06acf3f3..fdaba2eb 100644
--- a/examples/gtk/testprint.py
+++ b/examples/gtk/testprint.py
@@ -2,6 +2,9 @@
import sys
import math
+
+import pygtk
+pygtk.require('2.0')
import cairo
import pango
import gtk
diff --git a/examples/gtk/treeview_dnd.py b/examples/gtk/treeview_dnd.py
index ba4d3a43..6005d8e9 100644
--- a/examples/gtk/treeview_dnd.py
+++ b/examples/gtk/treeview_dnd.py
@@ -4,6 +4,8 @@
# This file is based on http://code.google.com/p/quodlibet/source/browse/junk/dndtest.py
+import pygtk
+pygtk.require('2.0')
import gobject
import gtk
diff --git a/examples/gtk/widget.py b/examples/gtk/widget.py
index 758fce4c..5bbe88f3 100644
--- a/examples/gtk/widget.py
+++ b/examples/gtk/widget.py
@@ -1,5 +1,7 @@
import sys
+import pygtk
+pygtk.require('2.0')
import gobject
import pango
import gtk