Revision: 87 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=87&view=rev Author: frlan Date: 2008-06-25 15:55:30 -0700 (Wed, 25 Jun 2008)
Log Message: ----------- GeanyLaTeX: Update of used plugin API to v71
Modified Paths: -------------- trunk/geanylatex/ChangeLog trunk/geanylatex/geanylatex.c
Modified: trunk/geanylatex/ChangeLog =================================================================== --- trunk/geanylatex/ChangeLog 2008-06-25 22:42:47 UTC (rev 86) +++ trunk/geanylatex/ChangeLog 2008-06-25 22:55:30 UTC (rev 87) @@ -1,3 +1,8 @@ +2008-06-26 Frank Lanitz <frank(at)frank(dot)uvena(dot)de> + + * Update of used plugin API to v71. + + 2008-06-17 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* configure.in:
Modified: trunk/geanylatex/geanylatex.c =================================================================== --- trunk/geanylatex/geanylatex.c 2008-06-25 22:42:47 UTC (rev 86) +++ trunk/geanylatex/geanylatex.c 2008-06-25 22:55:30 UTC (rev 87) @@ -46,7 +46,7 @@ GeanyFunctions *geany_functions;
-PLUGIN_VERSION_CHECK(68) +PLUGIN_VERSION_CHECK(71) PLUGIN_SET_INFO(_("LaTeX"), _("Plugin to make Geany better support LaTeX"), "0.2-dev", "Frank Lanitz frank@frank.uvena.de")
@@ -92,11 +92,16 @@ static void insert_string(gchar *string) { - gint idx = p_document->get_cur_idx(); - if (DOC_IDX_VALID(idx)) + GeanyDocument *doc = NULL; + + doc = p_document->get_current(); + + if (doc != NULL) { - gint pos = p_sci->get_current_position(documents[idx]->sci); - p_sci->insert_text(documents[idx]->sci, pos, string); + gint pos = p_sci->get_current_position(doc->sci); + p_sci->insert_text(doc->sci, pos, string); + + g_free(doc); } }
@@ -390,13 +395,13 @@ static void show_output(const gchar * output, const gchar * name, const gint local_enc) { - gint idx; + GeanyDocument *doc = NULL; GeanyFiletype *ft = p_filetypes->lookup_by_name("LaTeX"); if (output) { - idx = p_document->new_file(name, ft, output); - p_document->set_encoding(idx, p_encodings->get_charset_from_index(latex_encodings[local_enc].geany_enc)); + doc = p_document->new_file(name, ft, output); + p_document->set_encoding(doc, p_encodings->get_charset_from_index(latex_encodings[local_enc].geany_enc)); }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.