SF.net SVN: geany-plugins:[2081] trunk/geany-plugins/devhelp/src

codebrainz at users.sourceforge.net codebrainz at xxxxx
Mon May 23 11:30:32 UTC 2011


Revision: 2081
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2081&view=rev
Author:   codebrainz
Date:     2011-05-23 11:30:31 +0000 (Mon, 23 May 2011)

Log Message:
-----------
Make keybindings depend on 'man' program at runtime.

Modified Paths:
--------------
    trunk/geany-plugins/devhelp/src/devhelpplugin.c
    trunk/geany-plugins/devhelp/src/devhelpplugin.h
    trunk/geany-plugins/devhelp/src/plugin.c

Modified: trunk/geany-plugins/devhelp/src/devhelpplugin.c
===================================================================
--- trunk/geany-plugins/devhelp/src/devhelpplugin.c	2011-05-23 11:21:57 UTC (rev 2080)
+++ trunk/geany-plugins/devhelp/src/devhelpplugin.c	2011-05-23 11:30:31 UTC (rev 2081)
@@ -688,6 +688,13 @@
 }
 
 
+gboolean devhelp_plugin_get_have_man(DevhelpPlugin *self)
+{
+	g_return_val_if_fail(self != NULL, FALSE);
+	return self->priv->have_man;
+}
+
+
 /* Activates (brings to top/makes visible) the Devhelp plugin's sidebar tab. */
 static inline void devhelp_plugin_activate_sidebar_tab(DevhelpPlugin *self)
 {

Modified: trunk/geany-plugins/devhelp/src/devhelpplugin.h
===================================================================
--- trunk/geany-plugins/devhelp/src/devhelpplugin.h	2011-05-23 11:21:57 UTC (rev 2080)
+++ trunk/geany-plugins/devhelp/src/devhelpplugin.h	2011-05-23 11:30:31 UTC (rev 2081)
@@ -102,7 +102,9 @@
 
 WebKitWebView*	devhelp_plugin_get_webview				(DevhelpPlugin *self);
 
+gboolean		devhelp_plugin_get_have_man				(DevhelpPlugin *self);
 
+
 gchar *devhelp_plugin_manpages_search(const gchar *term, const gchar *section);
 void devhelp_plugin_remove_manpages_temp_files(void);
 

Modified: trunk/geany-plugins/devhelp/src/plugin.c
===================================================================
--- trunk/geany-plugins/devhelp/src/plugin.c	2011-05-23 11:21:57 UTC (rev 2080)
+++ trunk/geany-plugins/devhelp/src/plugin.c	2011-05-23 11:30:31 UTC (rev 2081)
@@ -333,8 +333,11 @@
 		0, 0, "devhelp_activate_all", _("Activate all tabs"), NULL);
 	keybindings_set_item(key_group, KB_DEVHELP_SEARCH_SYMBOL, kb_activate,
 		0, 0, "devhelp_search_symbol", _("Search for current tag in Devhelp"), NULL);
-	keybindings_set_item(key_group, KB_DEVHELP_SEARCH_MANPAGES, kb_activate,
-		0, 0, "devhelp_search_manpages", _("Search for current tag in Manual Pages"), NULL);
+	if (devhelp_plugin_get_have_man(plugin.devhelp))
+	{
+		keybindings_set_item(key_group, KB_DEVHELP_SEARCH_MANPAGES, kb_activate,
+			0, 0, "devhelp_search_manpages", _("Search for current tag in Manual Pages"), NULL);
+	}
 	keybindings_set_item(key_group, KB_DEVHELP_SEARCH_CODESEARCH, kb_activate,
 		0, 0, "devhelp_search_codesearch", _("Search for current tag in Google Code Search"), NULL);
 }


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