Setting short cut key for plugin

Diego Ongaro ongardie at gmail.com
Tue Jan 8 04:45:43 CET 2008


On Jan 7, 2008 9:25 PM, Erik Harrison <erikharrison at gmail.com> wrote:
>
> On Jan 7, 2008 9:03 PM, Diego Ongaro <ongardie at gmail.com> wrote:
> > On Jan 7, 2008 6:39 PM, Erik Harrison <erikharrison at gmail.com> wrote:
> > >
> > > $ xfce4-panel-msg plugin message
> > >
> > > Then we add a 'message' signal for plugins to listen for, which passes
> > > in the string above. The panel provides a trivial dbus api for sending
> > > messages which xfce4-panel-msg uses.
> > >
> > > Hmmm. Trouble is managing to send the signal to the right plugin. We
> > > could use the plugin instance ID, but that isn't readily key bindable.
> > > We could use the plugin name, but that's potentially problematic with
> > > multple instances.
> > >
> > > How do plugins which handroll this sort of thing handle it? Are they
> > > all Xfce X-XFCE-Unique? Or do they have some internal logic?
> > >
> > > Or maybe "command" is better than message.
> > >
> >
> > Erik, I think you're complicating this too much. If the plugin is
> > trying to do something fancy, then it should create its own dbus api
> > for whatever it wants to do.
> >
>
> If you think that's complicated, I'll warn you away from panel internals. ;-)

Too late ( e.g., http://bugzilla.xfce.org/show_bug.cgi?id=3576 )

>
> Enrico asked if the solution was generalizable. It is.
>
> > However, the standard usage is to pop up the plugin's menu. In that
> > case, a simple popup-signal will do the trick. Use "Returns : TRUE to
> > stop other handlers from being invoked for the event. FALSE to
> > propagate the event further." for callbacks to figure out which
> > instance of the plugin is handling it, or picking an arbitrary one
> > should be fine. Any reason why this wouldn't be sufficient for most
> > plugins?
>
> Well, that's essentially the solution I outlined above. Only if every
> plugin rolls it's own, it gets really messy.

OK, after another read, I guess I just didn't see the purpose for the
message string.

> 4.6 panel will likely depend on DBus anyway, through the new config
> daemon. Having the panel act as a lightweight dbus proxy makes it
> trivially easy to add this kind of functionality to panel plugins.

That seems fine. Or, if someone insists that it should use X
Selections, it shouldn't matter to the plugins (that's gross, though).

-Diego



More information about the Xfce mailing list