diff console/libgnt/gntlabel.c @ 13964:0a0d2a1fd2bc

[gaim-migrate @ 16520] Add multi-column support for GntTree. Use it for email-notifications. Restore colors before exiting. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 19 Jul 2006 07:12:59 +0000
parents 841a5ffbfee4
children 2d1b41e3cf0d
line wrap: on
line diff
--- a/console/libgnt/gntlabel.c	Tue Jul 18 07:18:05 2006 +0000
+++ b/console/libgnt/gntlabel.c	Wed Jul 19 07:12:59 2006 +0000
@@ -126,3 +126,16 @@
 	return widget;
 }
 
+void gnt_label_set_text(GntLabel *label, const char *text)
+{
+	g_free(label->text);
+	label->text = g_strdup(text);
+
+	if (GNT_WIDGET(label)->window)
+	{
+		gnt_widget_hide(GNT_WIDGET(label));
+		gnt_label_size_request(GNT_WIDGET(label));
+		gnt_widget_draw(GNT_WIDGET(label));
+	}
+}
+