[pyclutter] examples: Fix Cogl loading
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pyclutter] examples: Fix Cogl loading
- Date: Tue, 5 May 2015 14:13:01 +0000 (UTC)
commit cd45372f9760ac6da2198ad78db4a702e69bde31
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue May 5 12:10:07 2015 +0100
examples: Fix Cogl loading
We just need to load Cogl *after* Clutter in order to get the right
version.
examples/image-content.py | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/examples/image-content.py b/examples/image-content.py
index da42654..4bfa416 100644
--- a/examples/image-content.py
+++ b/examples/image-content.py
@@ -1,12 +1,8 @@
# Clutter depends on Cogl 1.0 for public API, but Cogl ships with
# introspection data for both 1.0 and 2.0; pygobject will prefer
-# the latter, so we need to explicitly version the Cogl module
-# before loading it
-import gi
-gi.require_version('Cogl', '1.0')
-
-from gi.repository import Cogl
+# the latter, so we need to load Clutter before Cogl
from gi.repository import Clutter
+from gi.repository import Cogl
from gi.repository import GdkPixbuf
gravities = [
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]