activating in gtk3

Lachlan <[email protected]>
Newsgroups gmane.comp.gnome.apps.rhythmbox.devel
Message-ID <CAMXB9EECa7HAh5XmWBMRscXose2ZW+UDby+zbvr5yq=U_UzYJA@mail.gmail.com>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.