SF.net SVN: geany-plugins:[2350] trunk/geany-plugins/geanyprj/src/geanyprj. c
frlan at users.sourceforge.net
frlan at xxxxx
Mon Nov 28 16:55:35 UTC 2011
Revision: 2350
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2350&view=rev
Author: frlan
Date: 2011-11-28 16:55:35 +0000 (Mon, 28 Nov 2011)
Log Message:
-----------
GeanyPrj: Adding a keybinding for find in project. Patch by Johann Saunier
Modified Paths:
--------------
trunk/geany-plugins/geanyprj/src/geanyprj.c
Modified: trunk/geany-plugins/geanyprj/src/geanyprj.c
===================================================================
--- trunk/geany-plugins/geanyprj/src/geanyprj.c 2011-11-24 19:02:53 UTC (rev 2349)
+++ trunk/geany-plugins/geanyprj/src/geanyprj.c 2011-11-28 16:55:35 UTC (rev 2350)
@@ -41,6 +41,16 @@
GeanyData *geany_data;
GeanyFunctions *geany_functions;
+/* Keybinding(s) */
+enum
+{
+ KB_FIND_IN_PROJECT,
+ KB_COUNT
+};
+
+PLUGIN_KEY_GROUP(geanyprj, KB_COUNT)
+
+
static void
reload_project()
{
@@ -114,6 +124,13 @@
{NULL, NULL, FALSE, NULL}
};
+/* Keybinding callback */
+static void
+kb_find_in_project()
+{
+ on_find_in_project(NULL, NULL);
+}
+
/* Called by Geany to initialize the plugin */
void
plugin_init(G_GNUC_UNUSED GeanyData * data)
@@ -124,6 +141,10 @@
xproject_init();
create_sidebar();
reload_project();
+
+ keybindings_set_item(plugin_key_group, KB_FIND_IN_PROJECT,
+ kb_find_in_project, 0, 0, "find_in_project",
+ _("Find a text in geanyprj's project"), NULL);
}
/* Called by Geany before unloading the plugin. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Plugins-Commits
mailing list