Revision: 1836 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1836&view=re... Author: colombanw Date: 2011-01-13 19:39:51 +0000 (Thu, 13 Jan 2011)
Log Message: ----------- WebHelper: Add global plugin data in a header to make it accessible
This will allow use of Geany functions from other files than gwh-plugin.c, by including gwh-plugin.h.
Modified Paths: -------------- trunk/geany-plugins/webhelper/src/Makefile.am trunk/geany-plugins/webhelper/src/gwh-plugin.c trunk/geany-plugins/webhelper/wscript_build
Added Paths: ----------- trunk/geany-plugins/webhelper/src/gwh-plugin.h
Modified: trunk/geany-plugins/webhelper/src/Makefile.am =================================================================== --- trunk/geany-plugins/webhelper/src/Makefile.am 2011-01-13 19:39:19 UTC (rev 1835) +++ trunk/geany-plugins/webhelper/src/Makefile.am 2011-01-13 19:39:51 UTC (rev 1836) @@ -16,6 +16,7 @@ gwh-settings.c \ gwh-utils.c headers = gwh-browser.h \ + gwh-plugin.h \ gwh-settings.h \ gwh-utils.h autogen_sources = gwh-enum-types.c
Modified: trunk/geany-plugins/webhelper/src/gwh-plugin.c =================================================================== --- trunk/geany-plugins/webhelper/src/gwh-plugin.c 2011-01-13 19:39:19 UTC (rev 1835) +++ trunk/geany-plugins/webhelper/src/gwh-plugin.c 2011-01-13 19:39:51 UTC (rev 1836) @@ -32,12 +32,9 @@ #include "gwh-utils.h" #include "gwh-browser.h" #include "gwh-settings.h" +#include "gwh-plugin.h"
-#define PLUGIN_NAME "Web Helper" -#define PLUGIN_TARNAME "web-helper" - - GeanyPlugin *geany_plugin; GeanyData *geany_data; GeanyFunctions *geany_functions; @@ -51,7 +48,7 @@ _("Display a preview web page that gets updated upon document saving and " "provide web analysis and debugging tools (aka Web Inspector), all using " "WebKit."), - "0.1", + GWH_PLUGIN_VERSION, "Colomban Wendling ban@herbesfolles.org" )
@@ -61,7 +58,6 @@ CONTAINER_WINDOW };
- static GtkWidget *G_browser = NULL; static struct { guint type; @@ -253,7 +249,7 @@ get_config_filename (void) { return g_build_filename (geany_data->app->configdir, "plugins", - PLUGIN_TARNAME, PLUGIN_TARNAME".conf", NULL); + GWH_PLUGIN_TARNAME, GWH_PLUGIN_TARNAME".conf", NULL); }
static void
Added: trunk/geany-plugins/webhelper/src/gwh-plugin.h =================================================================== --- trunk/geany-plugins/webhelper/src/gwh-plugin.h (rev 0) +++ trunk/geany-plugins/webhelper/src/gwh-plugin.h 2011-01-13 19:39:51 UTC (rev 1836) @@ -0,0 +1,43 @@ +/* + * + * Copyright (C) 2010-2011 Colomban Wendling ban@herbesfolles.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/. + * + */ + +#ifndef H_GWH_PLUGIN +#define H_GWH_PLUGIN + +#include <glib.h> + +#include <geanyplugin.h> +#include <geany.h> + +G_BEGIN_DECLS + + +#define GWH_PLUGIN_NAME "Web Helper" +#define GWH_PLUGIN_TARNAME "web-helper" +#define GWH_PLUGIN_VERSION "0.1" + + +extern GeanyPlugin *geany_plugin; +extern GeanyData *geany_data; +extern GeanyFunctions *geany_functions; + + +G_END_DECLS + +#endif /* guard */
Modified: trunk/geany-plugins/webhelper/wscript_build =================================================================== --- trunk/geany-plugins/webhelper/wscript_build 2011-01-13 19:39:19 UTC (rev 1835) +++ trunk/geany-plugins/webhelper/wscript_build 2011-01-13 19:39:51 UTC (rev 1836) @@ -32,6 +32,7 @@ 'src/gwh-utils.c'] header = [ 'src/gwh-browser.h', + 'src/gwh-plugin.h', 'src/gwh-settings.h', 'src/gwh-utils.h'] generated_sources = [
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.