[Rhythmbox-devel] activating in gtk3
- From: Lachlan <lachlan 00 gmail com>
- To: rhythmbox-devel gnome org
- Subject: [Rhythmbox-devel] activating in gtk3
- Date: Wed, 4 Jan 2012 16:02:44 +1000
Once again i'm stumped porting to GTK3.
I have no idea what to do when activating plugins using pygobject
while trying to port my other plugin over.
When i start rhythmbox the plugin fails to activate because there is
no song selected. That part makes sense but I don't really have any
understanding of how to fix it.
For some reason this worked in GTK2.
def do_activate(self):
shell = self.object
self.shell = shell
self.db = shell.props.db
**** self.music_view = shell.props.selected_page
self.library_source = shell.props.library_source
self.signal_id = self.music_view.connect('event',
self.event_handler, shell)
I use this plugin to check for click events in the event_handler
function but because when you start you haven't selected anything it
will fail to activate unless i click a song then reactivate in the
plugin menu. Then it all works.
I've looked into Gdk and Gtk from gi.repository but i haven't been
able to find an example to help.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]