SF.net SVN: geany:[5155] trunk/src

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Aug 12 17:21:24 UTC 2010


Revision: 5155
          http://geany.svn.sourceforge.net/geany/?rev=5155&view=rev
Author:   ntrel
Date:     2010-08-12 17:21:24 +0000 (Thu, 12 Aug 2010)

Log Message:
-----------
Remove return value for ui_label_set_markup() as it probably shouldn't be used for macros.

Modified Paths:
--------------
    trunk/src/ui_utils.c
    trunk/src/ui_utils.h

Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c	2010-08-12 17:14:47 UTC (rev 5154)
+++ trunk/src/ui_utils.c	2010-08-12 17:21:24 UTC (rev 5155)
@@ -2293,8 +2293,7 @@
 }
 
 
-/* return value is for macros */
-GtkWidget *ui_label_set_markup(GtkLabel *label, const gchar *format, ...)
+void ui_label_set_markup(GtkLabel *label, const gchar *format, ...)
 {
 	va_list a;
 	gchar *text;
@@ -2306,7 +2305,6 @@
 	gtk_label_set_text(label, text);
 	gtk_label_set_use_markup(label, TRUE);
 	g_free(text);
-	return GTK_WIDGET(label);
 }
 
 
@@ -2316,7 +2314,8 @@
 	gchar *label_text;
 
 	label_text = g_markup_escape_text(text, -1);
-	label = ui_label_set_markup(GTK_LABEL(gtk_label_new(NULL)), "<b>%s</b>", label_text);
+	label = gtk_label_new(NULL);
+	ui_label_set_markup(GTK_LABEL(label), "<b>%s</b>", label_text);
 	g_free(label_text);
 	return label;
 }

Modified: trunk/src/ui_utils.h
===================================================================
--- trunk/src/ui_utils.h	2010-08-12 17:14:47 UTC (rev 5154)
+++ trunk/src/ui_utils.h	2010-08-12 17:21:24 UTC (rev 5155)
@@ -211,7 +211,7 @@
 
 GtkWidget *ui_label_new_bold(const gchar *text);
 
-GtkWidget *ui_label_set_markup(GtkLabel *label, const gchar *format, ...) G_GNUC_PRINTF(2, 3);
+void ui_label_set_markup(GtkLabel *label, const gchar *format, ...) G_GNUC_PRINTF(2, 3);
 
 /* End of general widget functions */
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list