Revision: 1132 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1132&view=re... Author: frlan Date: 2010-01-17 16:02:55 +0000 (Sun, 17 Jan 2010)
Log Message: ----------- GeanyLaTeX: Make usage of plugin API v170 and use the new "geany-startup-complete" signal to initially update the toolbar items with correct status on startup.
Modified Paths: -------------- trunk/geanylatex/INSTALL trunk/geanylatex/doc/geanylatex.tex trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/INSTALL =================================================================== --- trunk/geanylatex/INSTALL 2010-01-17 15:24:04 UTC (rev 1131) +++ trunk/geanylatex/INSTALL 2010-01-17 16:02:55 UTC (rev 1132) @@ -1,7 +1,7 @@ These installation instructions are written for a Linux system, but should work also on other plattforms as Windows is.
-Building the plugin requires Geany 0.19 or above (Geany Plugin API v169 +Building the plugin requires Geany 0.19 or above (Geany Plugin API v170 or higher).
You need for compliling the plugin the Geany header files installed.
Modified: trunk/geanylatex/doc/geanylatex.tex =================================================================== --- trunk/geanylatex/doc/geanylatex.tex 2010-01-17 15:24:04 UTC (rev 1131) +++ trunk/geanylatex/doc/geanylatex.tex 2010-01-17 16:02:55 UTC (rev 1132) @@ -147,7 +147,7 @@ you used a prepared package e.g. from your distribution you probably need to install an additional package, this might be called geany-dev or geany-devel. Please note that in order to compile and use this -plugin, you need Geany 0.19svn or later (Geany Plugin API v169 or higher). +plugin, you need Geany 0.19svn or later (Geany Plugin API v170 or higher).
Furthermore you need, of course, a C compiler and python installed. The GNU version of the C compiler is recommended. Also there should be a
Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2010-01-17 15:24:04 UTC (rev 1131) +++ trunk/geanylatex/src/geanylatex.c 2010-01-17 16:02:55 UTC (rev 1132) @@ -28,7 +28,7 @@ #include "geanylatex.h" #include "ctype.h"
-PLUGIN_VERSION_CHECK(169) +PLUGIN_VERSION_CHECK(170)
PLUGIN_SET_INFO(_("GeanyLaTeX"), _("Plugin to provide better LaTeX support"), VERSION,"Frank Lanitz frank@frank.uvena.de") @@ -154,7 +154,6 @@ return toolbar; }
- static void on_configure_response(G_GNUC_UNUSED GtkDialog *dialog, gint response, G_GNUC_UNUSED gpointer user_data) @@ -340,6 +339,20 @@ }
+static void +on_geany_startup_complete(G_GNUC_UNUSED GObject *obj, G_GNUC_UNUSED gpointer user_data) +{ + GeanyDocument *doc = NULL; + + doc = document_get_current(); + + if (doc != NULL) + { + toggle_toolbar_items_by_file_type(doc->file_type->id); + } +} + + static gboolean on_document_filetype_set(GObject *obj, GeanyDocument *doc, GeanyFiletype *filetype_old, gpointer user_data) { @@ -579,6 +592,7 @@ { "document-activate", (GCallback) &on_document_activate, FALSE, NULL }, { "document-filetype-set", (GCallback) &on_document_filetype_set, FALSE, NULL }, { "document-new", (GCallback) &on_document_new, FALSE, NULL}, + { "geany-startup-complete", (GCallback) &on_geany_startup_complete, FALSE, NULL }, { NULL, NULL, FALSE, NULL } };
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org