[Geany-devel] Having trouble with keybindings

Nathan Broadbent nathan.f77 at xxxxx
Wed Dec 7 18:04:44 UTC 2011


Hello,

I'm working on the TreeBrowser plugin. I have fixed a few bugs, so I'm
looking forward to sending pull requests when geany-plugins is on
github :)

I'm currently trying to add a keybinding for deleting objects from the
treeview. I have added a KB_DELETE_OBJECT keybinding, and I've mapped
this to the delete key, which works fine. However, the keybinding for
the sidebar is still activated when the editor has focus, and I press
the 'delete' key.
I would like the keybinding to only activate if the sidebar widget has
focus (is active). This is also a problem for the 'rename object'
keybinding that was already there.

The last parameter to the 'keybindings_set_item' function is:
GtkWidget * menu_item  -  "Optional widget to set an accelerator for,
or NULL."
I've tried setting this to 'treeview' or 'sidebar_vbox', but that
doesn't seem to work.

I'd be really grateful if someone would be able to help me understand
how to solve this.


Thanks very much!
Nathan B



More information about the Devel mailing list