Mercurial > pidgin.yaz
diff console/libgnt/gntlabel.c @ 14423:cfd5bcc06a7e
[gaim-migrate @ 17131]
Try to make sure the strings are not too long to get out of the range of the screen.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 02 Sep 2006 23:06:25 +0000 |
parents | 2d1b41e3cf0d |
children | 3ac156db9cb6 |
line wrap: on
line diff
--- a/console/libgnt/gntlabel.c Sat Sep 02 20:17:43 2006 +0000 +++ b/console/libgnt/gntlabel.c Sat Sep 02 23:06:25 2006 +0000 @@ -101,7 +101,7 @@ GntWidget *widget = g_object_new(GNT_TYPE_LABEL, NULL); GntLabel *label = GNT_LABEL(widget); - label->text = g_strdup(text); + label->text = gnt_util_onscreen_fit_string(text, -1); label->flags = flags; gnt_widget_set_take_focus(widget, FALSE); GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); @@ -112,7 +112,7 @@ void gnt_label_set_text(GntLabel *label, const char *text) { g_free(label->text); - label->text = g_strdup(text); + label->text = gnt_util_onscreen_fit_string(text, -1); if (GNT_WIDGET(label)->window) {