SF.net SVN: geany-plugins:[1246] trunk/geanylatex/src

frlan at users.sourceforge.net frlan at xxxxx
Fri Apr 16 17:33:39 UTC 2010


Revision: 1246
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1246&view=rev
Author:   frlan
Date:     2010-04-16 17:33:39 +0000 (Fri, 16 Apr 2010)

Log Message:
-----------
GeanyLaTeX: Move glatex_insert_string() into latexutils.[c|h]

Modified Paths:
--------------
    trunk/geanylatex/src/geanylatex.c
    trunk/geanylatex/src/geanylatex.h
    trunk/geanylatex/src/latexutils.c
    trunk/geanylatex/src/latexutils.h

Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c	2010-04-16 17:33:10 UTC (rev 1245)
+++ trunk/geanylatex/src/geanylatex.c	2010-04-16 17:33:39 UTC (rev 1246)
@@ -640,28 +640,7 @@
 	{ NULL, NULL, FALSE, NULL }
 };
 
-void
-glatex_insert_string(gchar *string, gboolean reset_position)
-{
-	GeanyDocument *doc = NULL;
 
-	doc = document_get_current();
-
-	if (doc != NULL && string != NULL)
-	{
-		gint pos = sci_get_current_position(doc->editor->sci);
-		gint len = 0;
-
-		if (reset_position == TRUE)
-		{
-			len = strlen(string);
-		}
-
-		editor_insert_text_block(doc->editor, string, pos, len, -1, TRUE);
-	}
-}
-
-
 inline gchar*
 get_latex_command(gint tab_index)
 {

Modified: trunk/geanylatex/src/geanylatex.h
===================================================================
--- trunk/geanylatex/src/geanylatex.h	2010-04-16 17:33:10 UTC (rev 1245)
+++ trunk/geanylatex/src/geanylatex.h	2010-04-16 17:33:39 UTC (rev 1246)
@@ -79,7 +79,6 @@
 } LaTeXWizard;
 
 extern LaTeXWizard glatex_wizard;
-extern void glatex_insert_string(gchar *string, gboolean reset_position);
 gint glatex_count_menu_entries(SubMenuTemplate *tmp, gint categorie);
 void glatex_wizard_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
 	 G_GNUC_UNUSED gpointer gdata);

Modified: trunk/geanylatex/src/latexutils.c
===================================================================
--- trunk/geanylatex/src/latexutils.c	2010-04-16 17:33:10 UTC (rev 1245)
+++ trunk/geanylatex/src/latexutils.c	2010-04-16 17:33:39 UTC (rev 1246)
@@ -97,3 +97,24 @@
 	gtk_dialog_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT);
 }
 
+
+void
+glatex_insert_string(gchar *string, gboolean reset_position)
+{
+	GeanyDocument *doc = NULL;
+
+	doc = document_get_current();
+
+	if (doc != NULL && string != NULL)
+	{
+		gint pos = sci_get_current_position(doc->editor->sci);
+		gint len = 0;
+
+		if (reset_position == TRUE)
+		{
+			len = strlen(string);
+		}
+
+		editor_insert_text_block(doc->editor, string, pos, len, -1, TRUE);
+	}
+}

Modified: trunk/geanylatex/src/latexutils.h
===================================================================
--- trunk/geanylatex/src/latexutils.h	2010-04-16 17:33:10 UTC (rev 1245)
+++ trunk/geanylatex/src/latexutils.h	2010-04-16 17:33:39 UTC (rev 1246)
@@ -24,9 +24,8 @@
 #include "geanylatex.h"
 
 gchar **glatex_read_file_in_array(const gchar *filename);
-
 void glatex_usepackage(const gchar *pkg, const gchar *options);
-
 void glatex_enter_key_pressed_in_entry(G_GNUC_UNUSED GtkWidget *widget, gpointer dialog);
+void glatex_insert_string(gchar *string, gboolean reset_position);
 
 #endif


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