Sawfish and gnome-panel action menu

Seems i can't bind a key to the gnome-panel "Run Application..." action
with Sawsfish (gnome-panel 2.8.2, sawfish 1.3+cvs20040617, i.e. an
updated Debian Sid).

I've briefly looked in the gnome-panel sources for a way to activate the
dialog with an external program but found nothing interesting (i know
near zero about Gnome internals). I think i need to use the panel
"panel_action_run_program" function but i've no idea how to do it with
Sawfish (my  C skills are weak and my Lisp knowledge is even poorer).

Looking on the Metacity keybindings.c source, i found this snippet:

*static* *void*
*handle_panel_keybinding* (MetaDisplay    *display,
                        MetaScreen     *screen,
                        MetaWindow     *window,
                        XEvent         *event,
                        MetaKeyBinding *binding)
 MetaKeyBindingAction action;
 Atom action_atom;
 XClientMessageEvent ev;

 action = GPOINTER_TO_INT (binding->handler->data);

 action_atom = None;
 *switch* (action)
     action_atom = display->atom_gnome_panel_action_main_menu;
     action_atom = display->atom_gnome_panel_action_run_dialog;

 ev.type = ClientMessage;
 ev.window = screen->xroot;
 ev.message_type = display->atom_gnome_panel_action;
 ev.format = 32;[0] = action_atom;[1] = event->xkey.time;

*"Sending panel message with timestamp %lu\n"*, event->xkey.time);

 meta_error_trap_push (display);

 //* Release the grab for the panel before sending the event *//
 XUngrabKeyboard (display->xdisplay, event->xkey.time);

 XSendEvent (display->xdisplay,
	      (XEvent*) &ev);

 meta_error_trap_pop (display, FALSE);

I think it's the code that open the "Run Application" dialog with a
shortcut, someone here knows if i can do something similar can be done with rep?


P.S. hope that Thunderbird didn't mess too much the code snippet...

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