Re: ANNOUNCE: Deskbar Applet 0.3 (keybindings)



Hi,

So my initial keybinding implementation tried to use metacity's command GConf keys. It's really gross in practice, since every time at startup I had to iterate the keys and determine if the default bindings exist, and re-add them if not. Also, the number of commands is bounded.

I don't think we can rely on using D-BUS in the core desktop just yet, and we don't need to for this...

I think the global binding problem can be solved by just designating a GConf path that apps install a keybinding action into. Then create a library with tomboykeybinder.c that apps call into with the GConf paths they are interested in. The library reads the GConf binding keys for the app and registers the X root window event handler.

The library can handle processing the events and updating the X bindings whenever the GCconf keys get changed. Then you just have to expose the GConf tree through gnome-keybinding-properties.

This makes things a lot easier to debug and there is no overhead if an app with global bindings is not running.

-Alex

Nigel Tao wrote:
Alex Graveley wrote:

I think it is a bad idea to make the global keybinding more
accessible to apps... really there should be a central API that
integrates with GConf to store keys sequences and command actions
which integrates with gnome-keybinding-properties (which has a
static action list today). This would avoid global keybinding
conflicts and allow altering them in a single place.


I was thinking... metacity already allows binding a key combo to
an arbitrary command.  It's not exposed as a GUI (yet...?), but you
can do it through gconf keys.

As a hack, I could piggy-back on metacity's global keybinding
behavior, and the triggered command could be a little script to
raise a D-Bus signal.  My applet would respond by requesting focus.

Having said that, I haven't looked at D-Bus and its API at all.  Is
this feasible?  Is D-Bus the most appropriate way?

Should this be rolled into gnome-keybinding-properties in general
(i.e., have a "raise signal %s" or even a plain "arbitrary command"
as a bindable Action)?

thanks,
Nigel.

_______________________________________________
desktop-devel-list mailing list
desktop-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]