On Wed, Jan 4, 2012 at 4:02 PM, Lachlan <[email protected]> wrote: > 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.
What are you actually trying to do here? It looks like this would only catch events received by the source that was selected when the plugin was activated. Maybe you need to use 'notify::selected-page' signal on the shell to track the active source. _______________________________________________ rhythmbox-devel mailing list [email protected] http://mail.gnome.org/mailman/listinfo/rhythmbox-devel
