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

frlan at users.sourceforge.net frlan at xxxxx
Fri Mar 27 23:28:41 UTC 2009


Revision: 563
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=563&view=rev
Author:   frlan
Date:     2009-03-27 23:28:41 +0000 (Fri, 27 Mar 2009)

Log Message:
-----------
GeanyLaTeX: Use a text field with pull down instead of a normal combo box for font size at LaTeX wizard.

Modified Paths:
--------------
    trunk/geanylatex/ChangeLog
    trunk/geanylatex/src/geanylatex.c

Modified: trunk/geanylatex/ChangeLog
===================================================================
--- trunk/geanylatex/ChangeLog	2009-03-27 22:54:49 UTC (rev 562)
+++ trunk/geanylatex/ChangeLog	2009-03-27 23:28:41 UTC (rev 563)
@@ -1,3 +1,9 @@
+2009-03-28  Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>
+
+ * Use a text field with pull down instead of a normal combo box for
+   font size at LaTeX wizard.
+
+
 2009-03-27  Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>
 
  * doc/geanylatex.tex: Added documentation written in LaTeX.

Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c	2009-03-27 22:54:49 UTC (rev 562)
+++ trunk/geanylatex/src/geanylatex.c	2009-03-27 23:28:41 UTC (rev 563)
@@ -621,16 +621,15 @@
 	gtk_table_attach_defaults(GTK_TABLE(table), encoding_combobox, 1, 2, 1, 2);
 
 	/*  fontsize */
-	label_fontsize = gtk_label_new(_("Fontsize:"));
-	fontsize_combobox = gtk_combo_box_new_text();
+
+	label_fontsize = gtk_label_new(_("Font size:"));
+	fontsize_combobox = gtk_combo_box_entry_new_text();
+	gtk_combo_box_append_text(GTK_COMBO_BOX(fontsize_combobox),"10pt");
+	gtk_combo_box_append_text(GTK_COMBO_BOX(fontsize_combobox),"11pt");
+	gtk_combo_box_append_text(GTK_COMBO_BOX(fontsize_combobox),"12pt");
 	gtk_tooltips_set_tip(tooltip, fontsize_combobox,
-		_("Set the default fontsize of your new document"), NULL);
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(fontsize_combobox), 0, "10pt");
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(fontsize_combobox), 1, "11pt");
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(fontsize_combobox), 2, "12pt");
+		_("Set the default font size of your new document"), NULL);
 
-	gtk_combo_box_set_active(GTK_COMBO_BOX(fontsize_combobox), 0);
-
 	gtk_misc_set_alignment(GTK_MISC(label_fontsize), 0, 0.5);
 
 	gtk_table_attach_defaults(GTK_TABLE(table), label_fontsize, 0, 1, 2, 3);
@@ -756,26 +755,8 @@
 			}
 		}
 
-		fontsize_int = gtk_combo_box_get_active(
-			GTK_COMBO_BOX(fontsize_combobox));
-		switch (fontsize_int)
-		{
-			case 0:
-			{
-				fontsize = g_strconcat("10pt", NULL);
-				break;
-			}
-			case 1:
-			{
-				fontsize = g_strconcat("11pt", NULL);
-				break;
-			}
-			case 2:
-			{
-				fontsize = g_strconcat("12pt", NULL);
-				break;
-			}
-		}
+		fontsize = g_strdup(gtk_combo_box_get_active_text(
+			GTK_COMBO_BOX(fontsize_combobox)));
 
 		if (papersize != NULL)
 		{


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