Revision: 1332 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1332&view=re... Author: frlan Date: 2010-05-03 22:53:23 +0000 (Mon, 03 May 2010)
Log Message: ----------- GeanyLaTeX: Make usage of plugin API v184
Modified Paths: -------------- trunk/geanylatex/INSTALL trunk/geanylatex/doc/geanylatex.tex trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/INSTALL =================================================================== --- trunk/geanylatex/INSTALL 2010-05-03 22:52:50 UTC (rev 1331) +++ trunk/geanylatex/INSTALL 2010-05-03 22:53:23 UTC (rev 1332) @@ -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 v170 +Building the plugin requires Geany 0.19 or above (Geany Plugin API v184 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-05-03 22:52:50 UTC (rev 1331) +++ trunk/geanylatex/doc/geanylatex.tex 2010-05-03 22:53:23 UTC (rev 1332) @@ -152,7 +152,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 v170 or higher). +plugin, you need Geany 0.19svn or later (Geany Plugin API v184 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-05-03 22:52:50 UTC (rev 1331) +++ trunk/geanylatex/src/geanylatex.c 2010-05-03 22:53:23 UTC (rev 1332) @@ -28,7 +28,7 @@ #include "geanylatex.h" #include "ctype.h"
-PLUGIN_VERSION_CHECK(170) +PLUGIN_VERSION_CHECK(184)
PLUGIN_SET_INFO(_("GeanyLaTeX"), _("Plugin to provide better LaTeX support"), VERSION,"Frank Lanitz frank@frank.uvena.de") @@ -437,12 +437,13 @@ if (sci_get_char_at(sci, pos - (editor_get_eol_char_len (editor) + 1)) == '}'|| sci_get_char_at(sci, pos - (editor_get_eol_char_len (editor) + 1)) == ']') { - gchar *buf, *construct, *indent; + gchar *buf, *construct; /* TODO: Make possible to have longer than a 50 chars environment */ gchar env[50]; gint line = sci_get_line_from_position(sci, pos - (editor_get_eol_char_len (editor) + 1)); gint line_len = sci_get_line_length(sci, line); gint i, start; + gint indent;
/* get the line */ buf = sci_get_line(sci, line); @@ -516,15 +517,18 @@
/* After we have this, we need to ensure basic * indent is getting applied on closing command */ - indent = g_strndup(buf, start); + indent = sci_get_line_indentation(sci, line);
/* Now we build up closing string and insert * it into document */ - construct = g_strdup_printf("\t\n%s\end%s{%s}", indent, full_cmd, env); + construct = g_strdup_printf("\t\n\end%s{%s}", full_cmd, env); editor_insert_text_block(editor, construct, pos, 1, -1, TRUE); + sci_set_line_indentation( + sci, + sci_get_current_line(sci) + 1, + indent); g_free(construct); - g_free(indent); } } break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org