Mercurial > pidgin.yaz
comparison console/libgnt/gntlabel.c @ 13952:841a5ffbfee4
[gaim-migrate @ 16500]
uiops for GaimConnections. This only shows an error message for a disconnect.
uiops for GaimNotify. I have not done the notifications for searchresults
yet. That will require multi-column GntTree's, which will also allow for
improved email-notifications. I hope to complete it by next week.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 17 Jul 2006 03:45:24 +0000 |
parents | 25be562aaca8 |
children | 0a0d2a1fd2bc |
comparison
equal
deleted
inserted
replaced
13951:614c56622453 | 13952:841a5ffbfee4 |
---|---|
19 | 19 |
20 static void | 20 static void |
21 gnt_label_draw(GntWidget *widget) | 21 gnt_label_draw(GntWidget *widget) |
22 { | 22 { |
23 GntLabel *label = GNT_LABEL(widget); | 23 GntLabel *label = GNT_LABEL(widget); |
24 chtype flag = gnt_text_format_flag_to_chtype(label->flags); | |
24 | 25 |
25 wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); | 26 wbkgdset(widget->window, '\0' | flag); |
26 mvwprintw(widget->window, 0, 0, label->text); | 27 mvwprintw(widget->window, 0, 0, label->text); |
27 | 28 |
28 DEBUG; | 29 DEBUG; |
29 } | 30 } |
30 | 31 |
107 return type; | 108 return type; |
108 } | 109 } |
109 | 110 |
110 GntWidget *gnt_label_new(const char *text) | 111 GntWidget *gnt_label_new(const char *text) |
111 { | 112 { |
113 return gnt_label_new_with_format(text, 0); | |
114 } | |
115 | |
116 GntWidget *gnt_label_new_with_format(const char *text, GntTextFormatFlags flags) | |
117 { | |
112 GntWidget *widget = g_object_new(GNT_TYPE_LABEL, NULL); | 118 GntWidget *widget = g_object_new(GNT_TYPE_LABEL, NULL); |
113 GntLabel *label = GNT_LABEL(widget); | 119 GntLabel *label = GNT_LABEL(widget); |
114 | 120 |
115 label->text = g_strdup(text); | 121 label->text = g_strdup(text); |
122 label->flags = flags; | |
116 gnt_widget_set_take_focus(widget, FALSE); | 123 gnt_widget_set_take_focus(widget, FALSE); |
117 GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); | 124 GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); |
118 | 125 |
119 return widget; | 126 return widget; |
120 } | 127 } |