Revision: 1193 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1193&view=re... Author: frlan Date: 2010-03-20 18:21:35 +0000 (Sat, 20 Mar 2010)
Log Message: ----------- GeanyLaTeX: Adding options for inserting usecpakge function to dialog
Modified Paths: -------------- trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2010-03-20 18:20:45 UTC (rev 1192) +++ trunk/geanylatex/src/geanylatex.c 2010-03-20 18:21:35 UTC (rev 1193) @@ -1025,6 +1025,8 @@ GtkWidget *label = NULL; GtkWidget *textbox = NULL; GtkWidget *table = NULL; + GtkWidget *label_options = NULL; + GtkWidget *textbox_options = NULL;
dialog = gtk_dialog_new_with_buttons(_("Add additional package"), GTK_WINDOW(geany->main_widgets->window), @@ -1042,20 +1044,28 @@ label = gtk_label_new(_("Package name:")); textbox = gtk_entry_new();
+ label_options = gtk_label_new(_("Package options:")); + textbox_options = gtk_entry_new(); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_misc_set_alignment(GTK_MISC(label_options), 0, 0.5);
gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1); gtk_table_attach_defaults(GTK_TABLE(table), textbox, 1, 2, 0, 1); + gtk_table_attach_defaults(GTK_TABLE(table), label_options, 0, 1, 1, 2); + gtk_table_attach_defaults(GTK_TABLE(table), textbox_options, 1, 2, 1, 2); + gtk_container_add(GTK_CONTAINER(vbox), table);
gtk_widget_show_all(vbox);
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) { - const gchar *pkg; + const gchar *pkg = NULL; + const gchar *option = NULL; pkg = gtk_entry_get_text(GTK_ENTRY(textbox)); - glatex_usepackage(pkg, NULL); - + option = gtk_entry_get_text(GTK_ENTRY(textbox_options)); + glatex_usepackage(pkg, option); }
gtk_widget_destroy(dialog);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org