Revision: 1248 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1248&view=re... Author: frlan Date: 2010-04-16 17:51:51 +0000 (Fri, 16 Apr 2010)
Log Message: ----------- GeanyLaTeX: Make wizard run on hitting enter when inserting some of the values.
Modified Paths: -------------- trunk/geanylatex/ChangeLog trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/ChangeLog =================================================================== --- trunk/geanylatex/ChangeLog 2010-04-16 17:34:07 UTC (rev 1247) +++ trunk/geanylatex/ChangeLog 2010-04-16 17:51:51 UTC (rev 1248) @@ -1,6 +1,7 @@ 2010-04-16 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Fix indention on insert environment features. + * Make wizard run on hitting enter when inserting some of the values.
2010-04-14 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2010-04-16 17:34:07 UTC (rev 1247) +++ trunk/geanylatex/src/geanylatex.c 2010-04-16 17:51:51 UTC (rev 1248) @@ -1458,7 +1458,16 @@ GtkWidget *label_papersize = NULL; GtkWidget *label_template = NULL; GtkWidget *label_orientation = NULL; + GtkWidget *fontsize_entry = NULL;
+ /* Building the wizard-dialog and showing it */ + dialog = gtk_dialog_new_with_buttons(_("LaTeX-Wizard"), + GTK_WINDOW(geany->main_widgets->window), + GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, + NULL); + gtk_widget_set_name(dialog, "GeanyDialog"); + /* Creating and formatting table */ table = gtk_table_new(2, 6, FALSE); gtk_table_set_col_spacings(GTK_TABLE(table), 6); @@ -1547,6 +1556,10 @@ gtk_table_attach_defaults(GTK_TABLE(table), label_fontsize, 0, 1, 3, 4); gtk_table_attach_defaults(GTK_TABLE(table), glatex_wizard.fontsize_combobox, 1, 2, 3, 4);
+ fontsize_entry = gtk_bin_get_child(GTK_BIN(glatex_wizard.fontsize_combobox)); + g_signal_connect(G_OBJECT(fontsize_entry), "activate", + G_CALLBACK(glatex_enter_key_pressed_in_entry), dialog); + /* Author */ label_author = gtk_label_new(_("Author:")); glatex_wizard.author_textbox = gtk_entry_new(); @@ -1561,6 +1574,9 @@ gtk_table_attach_defaults(GTK_TABLE(table), label_author, 0, 1, 4, 5); gtk_table_attach_defaults(GTK_TABLE(table), glatex_wizard.author_textbox, 1, 2, 4, 5);
+ g_signal_connect(G_OBJECT(glatex_wizard.author_textbox), "activate", + G_CALLBACK(glatex_enter_key_pressed_in_entry), dialog); + /* Date */ label_date = gtk_label_new(_("Date:")); glatex_wizard.date_textbox = gtk_entry_new(); @@ -1573,6 +1589,9 @@ gtk_table_attach_defaults(GTK_TABLE(table), label_date, 0, 1, 5, 6); gtk_table_attach_defaults(GTK_TABLE(table), glatex_wizard.date_textbox, 1, 2, 5, 6);
+ g_signal_connect(G_OBJECT(glatex_wizard.date_textbox), "activate", + G_CALLBACK(glatex_enter_key_pressed_in_entry), dialog); + /* Title of the new document */ label_title = gtk_label_new(_("Title:")); glatex_wizard.title_textbox = gtk_entry_new(); @@ -1582,6 +1601,9 @@ gtk_table_attach_defaults(GTK_TABLE(table), label_title, 0, 1, 6, 7); gtk_table_attach_defaults(GTK_TABLE(table), glatex_wizard.title_textbox, 1, 2, 6, 7);
+ g_signal_connect(G_OBJECT(glatex_wizard.title_textbox), "activate", + G_CALLBACK(glatex_enter_key_pressed_in_entry), dialog); + /* Papersize */ label_papersize = gtk_label_new(_("Paper size:")); glatex_wizard.papersize_combobox = gtk_combo_box_new_text(); @@ -1618,14 +1640,7 @@ /* Doing the rest .... */ gtk_widget_show_all(table);
- /* Building the wizard-dialog and showing it */ - dialog = gtk_dialog_new_with_buttons(_("LaTeX-Wizard"), - 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); gtk_container_add(GTK_CONTAINER(vbox), table);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.