From 4da9f9dbc4ba4a858e585e3a02174f75aa1842ec Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Thu, 12 Aug 2010 17:21:24 +0000 Subject: [PATCH] Remove return value for ui_label_set_markup() as it probably shouldn't be used for macros. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5155 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- src/ui_utils.c | 7 +++---- src/ui_utils.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ui_utils.c b/src/ui_utils.c index 65932b197..74a3cc8d4 100644 --- a/src/ui_utils.c +++ b/src/ui_utils.c @@ -2293,8 +2293,7 @@ void ui_menu_sort_by_label(GtkMenu *menu) } -/* 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 @@ GtkWidget *ui_label_set_markup(GtkLabel *label, const gchar *format, ...) gtk_label_set_text(label, text); gtk_label_set_use_markup(label, TRUE); g_free(text); - return GTK_WIDGET(label); } @@ -2316,7 +2314,8 @@ GtkWidget *ui_label_new_bold(const gchar *text) gchar *label_text; label_text = g_markup_escape_text(text, -1); - label = ui_label_set_markup(GTK_LABEL(gtk_label_new(NULL)), "%s", label_text); + label = gtk_label_new(NULL); + ui_label_set_markup(GTK_LABEL(label), "%s", label_text); g_free(label_text); return label; } diff --git a/src/ui_utils.h b/src/ui_utils.h index 697563119..db76e6316 100644 --- a/src/ui_utils.h +++ b/src/ui_utils.h @@ -211,7 +211,7 @@ void ui_editable_insert_text_callback(GtkEditable *editable, gchar *new_text, 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 */ -- 2.11.4.GIT