Re: ERROR:root:Requiring namespace 'Gtk' version '2.0', but '3.0' is already loaded
- From: John Palmieri <johnp redhat com>
- To: Robert Park <rbpark exolucere ca>
- Cc: libchamplain-list gnome org, python-hackers-list <python-hackers-list gnome org>
- Subject: Re: ERROR:root:Requiring namespace 'Gtk' version '2.0', but '3.0' is already loaded
- Date: Tue, 16 Nov 2010 15:07:17 -0500 (EST)
----- "Robert Park" <rbpark exolucere ca> wrote:
> On Tue, Nov 16, 2010 at 11:13 AM, John Palmieri <johnp redhat com>
> wrote:
> > from gi.repository import Gtk
> > Gtk.require_version('2.0')
>
> Thanks J5, you're amazing! I'll try this as soon as I get home
> tonight.
>
> Just a quick thought though -- requiring version 2.0 seems kinda like
> a stopgap solution. I want to be future-proofing my application,
> developing for the latest versions, not ignoring 3.0 with my head
> buried in the sand.
>
> Am I just basically waiting for the Champlain people to catch up with
> gtk3 development, or is there something I can do to make 3.0 work?
>
> Thanks again!
>
> --
> http://exolucere.ca
Actually looking at champlain-gtk source code it already requires clutter so the best way to do this is to use clutter-gtk to embed a canvas into your app and add the champlain clutter actor to the canvas. My opinion is there is no reason for Champlain to have a Champlain-gtk. Here si what I do to embed gstreamer:
from gi.repository import Gtk, Clutter, GtkClutter, ClutterGst
window = Gtk.Window()
ClutterGst.init(sys.argv)
clutter_window = GtkClutter.Embed()
window.add(clutter_window)
video_texture = ClutterGst.VideoTexture()
video_texture.set_filename("data/intro.ogv")
stage = self.clutter_window.get_stage()
stage.add_actor(video_texture)
window.connect('delete', lambda x: Gtk.main_quit())
window.show_all()
Gtk.main()
--
John (J5) Palmieri
Software Engineer
Red Hat, Inc.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]