comparison console/libgnt/gntentry.c @ 14041:27182f83b79b

[gaim-migrate @ 16647] Statusbox comes in. It's now possible to change the account status. There's nothing yet for creating custom statuses. It's also possible now to delete accounts. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 05 Aug 2006 11:31:54 +0000
parents 942170284c55
children ae4cbed1b309
comparison
equal deleted inserted replaced
14040:80891029f5dd 14041:27182f83b79b
14 static void 14 static void
15 gnt_entry_draw(GntWidget *widget) 15 gnt_entry_draw(GntWidget *widget)
16 { 16 {
17 GntEntry *entry = GNT_ENTRY(widget); 17 GntEntry *entry = GNT_ENTRY(widget);
18 int stop; 18 int stop;
19 19 gboolean focus;
20 if (gnt_widget_has_focus(widget)) 20
21 if ((focus = gnt_widget_has_focus(widget)))
21 wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_TEXT_NORMAL)); 22 wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_TEXT_NORMAL));
22 else 23 else
23 wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_HIGHLIGHT_D)); 24 wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_HIGHLIGHT_D));
24 25
25 if (entry->masked) 26 if (entry->masked)
32 33
33 stop = g_utf8_pointer_to_offset(entry->scroll, entry->end); 34 stop = g_utf8_pointer_to_offset(entry->scroll, entry->end);
34 if (stop < widget->priv.width) 35 if (stop < widget->priv.width)
35 mvwhline(widget->window, 0, stop, ENTRY_CHAR, widget->priv.width - stop); 36 mvwhline(widget->window, 0, stop, ENTRY_CHAR, widget->priv.width - stop);
36 37
37 mvwchgat(widget->window, 0, g_utf8_pointer_to_offset(entry->scroll, entry->cursor), 1, 38 if (focus)
38 A_REVERSE, COLOR_PAIR(GNT_COLOR_TEXT_NORMAL), NULL); 39 mvwchgat(widget->window, 0, g_utf8_pointer_to_offset(entry->scroll, entry->cursor),
40 1, A_REVERSE, COLOR_PAIR(GNT_COLOR_TEXT_NORMAL), NULL);
39 41
40 DEBUG; 42 DEBUG;
41 } 43 }
42 44
43 static void 45 static void