SF.net SVN: geany-plugins:[1754] trunk/geanylatex
frlan at users.sourceforge.net
frlan at xxxxx
Fri Nov 19 00:22:05 UTC 2010
Revision: 1754
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1754&view=rev
Author: frlan
Date: 2010-11-19 00:22:05 +0000 (Fri, 19 Nov 2010)
Log Message:
-----------
GeanyLaTeX: Update of used plugin API and start to Make usage of dialogs_show_input()
Modified Paths:
--------------
trunk/geanylatex/INSTALL
trunk/geanylatex/doc/geanylatex.tex
trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/INSTALL
===================================================================
--- trunk/geanylatex/INSTALL 2010-11-19 00:21:41 UTC (rev 1753)
+++ trunk/geanylatex/INSTALL 2010-11-19 00:22:05 UTC (rev 1754)
@@ -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 v188
+Building the plugin requires Geany 0.20 or above (Geany Plugin API v199
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-11-19 00:21:41 UTC (rev 1753)
+++ trunk/geanylatex/doc/geanylatex.tex 2010-11-19 00:22:05 UTC (rev 1754)
@@ -103,6 +103,7 @@
toolbar
\item Added a dialog for inserting BibTeX references based on
available *.bib-files
+ \item Upgrade plugin API to version 199
\end{itemize}
\subsection{Geany\LaTeX{} 0.5 -- 2010-06-13}
@@ -165,7 +166,7 @@
you used a prepared package, e.g. from your distribution, you probably
need to install an additional package, probably 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 v188 or higher).
+plugin, you need Geany 0.20svn or later (Geany Plugin API v199 or higher).
Furthermore you need, of course, a C compiler and python installed. The
GNU version of the C compiler is recommended. Furthermore, there should be a
Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c 2010-11-19 00:21:41 UTC (rev 1753)
+++ trunk/geanylatex/src/geanylatex.c 2010-11-19 00:22:05 UTC (rev 1754)
@@ -28,7 +28,7 @@
#include "geanylatex.h"
#include "ctype.h"
-PLUGIN_VERSION_CHECK(188)
+PLUGIN_VERSION_CHECK(199)
PLUGIN_SET_TRANSLATABLE_INFO(
LOCALEDIR,
@@ -797,42 +797,20 @@
GtkWidget *textbox_label = NULL;
GtkWidget *table = NULL;
- dialog = gtk_dialog_new_with_buttons(_("Insert Label"),
- GTK_WINDOW(geany->main_widgets->window),
- GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
- NULL);
- vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog));
- gtk_widget_set_name(dialog, "GeanyDialog");
- gtk_box_set_spacing(GTK_BOX(vbox), 10);
- table = gtk_table_new(1, 2, FALSE);
- gtk_table_set_col_spacings(GTK_TABLE(table), 6);
- gtk_table_set_row_spacings(GTK_TABLE(table), 6);
-
- label = gtk_label_new(_("Label name:"));
- textbox_label = gtk_entry_new();
-
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-
- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1);
- gtk_table_attach_defaults(GTK_TABLE(table), textbox_label, 1, 2, 0, 1);
- gtk_container_add(GTK_CONTAINER(vbox), table);
-
- g_signal_connect(G_OBJECT(textbox_label), "activate",
- G_CALLBACK(glatex_enter_key_pressed_in_entry), dialog);
-
- gtk_widget_show_all(vbox);
-
- if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
+ gchar *input = dialogs_show_input(_("Insert Label"),
+ GTK_WINDOW(geany->main_widgets->window),
+ _("Label name:"),
+ NULL);
+
+ if (input)
{
gchar *label_str = NULL;
- label_str = g_strconcat("\\label{",gtk_entry_get_text(
- GTK_ENTRY(textbox_label)), "}", NULL);
+ label_str = g_strconcat("\\label{",input , "}", NULL);
glatex_insert_string(label_str, TRUE);
+ g_free(input);
+ g_free(label_str);
}
-
- gtk_widget_destroy(dialog);
}
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