Lionel Fuentes wrote:
Hi all Geany developers,
I am new to the geany-plugins project and just added my new plugin,
called "Code navigation", which aims at facilitating common operations
like switching from a header to the implementation or directly opening
a file by typing its name.
------------------------------------------------------------------------
_______________________________________________
Geany-devel mailing list
Geany-devel@uvena.de
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Attached is the patch to fix compilation (I didn't commit myself as I'm
neither author nor maintainer).
Do you plan to work on it further? I'd be interested in the outcome of
goto-file.
Best regards.
Index: codenav/src/codenavigation.c
===================================================================
--- codenav/src/codenavigation.c (Revision 904)
+++ codenav/src/codenavigation.c (Arbeitskopie)
@@ -398,20 +398,11 @@
ui_add_document_sensitive(goto_file_menu_item);
/* Initialize the key bindings : */
- plugin_keys[PLUGIN_KEYS_SWITCH].key = GDK_s;
- plugin_keys[PLUGIN_KEYS_SWITCH].mods = GDK_MOD1_MASK | GDK_SHIFT_MASK;
- plugin_keys[PLUGIN_KEYS_SWITCH].name = _("switch_header_impl");
- plugin_keys[PLUGIN_KEYS_SWITCH].label = _("Switch header/implementation");
- plugin_keys[PLUGIN_KEYS_SWITCH].callback = (GeanyKeyCallback)(&switch_menu_item_activate);
- plugin_keys[PLUGIN_KEYS_SWITCH].menu_item = switch_menu_item;
+ keybindings_set_item(plugin_key_group, PLUGIN_KEYS_SWITCH, (GeanyKeyCallback)(&switch_menu_item_activate),
+ GDK_s, GDK_MOD1_MASK | GDK_SHIFT_MASK, _("switch_header_impl"), _("Switch header/implementation"), switch_menu_item);
+ keybindings_set_item(plugin_key_group, PLUGIN_KEYS_GOTO_FILE, (GeanyKeyCallback)(&goto_file_menu_item_activate),
+ GDK_g, GDK_MOD1_MASK | GDK_SHIFT_MASK, _("goto_file"), _("Goto file..."), goto_file_menu_item);
- plugin_keys[PLUGIN_KEYS_GOTO_FILE].key = GDK_g;
- plugin_keys[PLUGIN_KEYS_GOTO_FILE].mods = GDK_MOD1_MASK | GDK_SHIFT_MASK;
- plugin_keys[PLUGIN_KEYS_GOTO_FILE].name = _("goto_file");
- plugin_keys[PLUGIN_KEYS_GOTO_FILE].label = _("Goto file...");
- plugin_keys[PLUGIN_KEYS_GOTO_FILE].callback = (GeanyKeyCallback)(&goto_file_menu_item_activate);
- plugin_keys[PLUGIN_KEYS_GOTO_FILE].menu_item = goto_file_menu_item;
-
/* Initialize the extensions array.
* TODO : we should let the user configure this. */
languages_extensions = g_array_new(FALSE, FALSE, sizeof(LanguageExtensions));
_______________________________________________
Geany-devel mailing list
Geany-devel@uvena.de
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel