SF.net SVN: geany-plugins:[675] trunk/geanylatex/src/geanylatex.c

frlan at users.sourceforge.net frlan at xxxxx
Wed May 27 21:51:23 UTC 2009


Revision: 675
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=675&view=rev
Author:   frlan
Date:     2009-05-27 21:51:23 +0000 (Wed, 27 May 2009)

Log Message:
-----------
GeanyLaTeX: Don't add useless , to option list when creating a new document using wizard but not defining a fontsize

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

Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c	2009-05-26 20:55:52 UTC (rev 674)
+++ trunk/geanylatex/src/geanylatex.c	2009-05-27 21:51:23 UTC (rev 675)
@@ -918,8 +918,8 @@
 			}
 		}
 
-		fontsize = g_strdup(gtk_combo_box_get_active_text(
-			GTK_COMBO_BOX(fontsize_combobox)));
+		fontsize = gtk_combo_box_get_active_text(
+			GTK_COMBO_BOX(fontsize_combobox));
 
 		if (papersize != NULL)
 		{
@@ -935,11 +935,11 @@
 			draft = g_utf8_casefold("draft", -1);
 			classoptions = g_strconcat(draft, NULL);
 		}
-		if (classoptions != NULL && fontsize != NULL)
+		if (classoptions != NULL && NZV(fontsize))
 		{
 			classoptions = g_strconcat(classoptions, ",", fontsize, NULL);
 		}
-		else if (classoptions == NULL && fontsize != NULL)
+		else if (classoptions == NULL && NZV(fontsize))
 		{
 			classoptions = g_strconcat(fontsize, 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