Revision: 1232 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1232&view=re... Author: frlan Date: 2010-04-11 13:13:30 +0000 (Sun, 11 Apr 2010)
Log Message: ----------- GeanyLaTeX: Enabling inserting label on pushing return after typing in label name.
Modified Paths: -------------- trunk/geanylatex/ChangeLog trunk/geanylatex/src/geanylatex.c trunk/geanylatex/src/geanylatex.h
Modified: trunk/geanylatex/ChangeLog =================================================================== --- trunk/geanylatex/ChangeLog 2010-04-11 09:27:59 UTC (rev 1231) +++ trunk/geanylatex/ChangeLog 2010-04-11 13:13:30 UTC (rev 1232) @@ -1,3 +1,8 @@ +2010-04-11 Frank Lanitz frank@frank.uvena.de + + * Enabling inserting label on pushing return after typing in label name. + + 2010-03-27 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Add a menu entry for inserting font sizes to document
Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2010-04-11 09:27:59 UTC (rev 1231) +++ trunk/geanylatex/src/geanylatex.c 2010-04-11 13:13:30 UTC (rev 1232) @@ -132,6 +132,13 @@ /* Some functions*/ static void toggle_toolbar_items_by_file_type(gint id);
+ +void glatex_enter_key_pressed_in_entry(GtkWidget *widget, gpointer dialog ) +{ + gtk_dialog_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); +} + + static GtkWidget *init_toolbar() { GtkWidget *toolbar = NULL; @@ -703,6 +710,9 @@ 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)
Modified: trunk/geanylatex/src/geanylatex.h =================================================================== --- trunk/geanylatex/src/geanylatex.h 2010-04-11 09:27:59 UTC (rev 1231) +++ trunk/geanylatex/src/geanylatex.h 2010-04-11 13:13:30 UTC (rev 1232) @@ -90,4 +90,5 @@ void glatex_replace_special_character(); void glatex_insert_usepackage_dialog(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer gdata); +void glatex_enter_key_pressed_in_entry(GtkWidget *widget, gpointer dialog); #endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.