Mercurial > pidgin.yaz
comparison console/libgnt/gntmain.c @ 13934:ef0d515b9f97
[gaim-migrate @ 16462]
Mark urgent-hinted windows in the window-list.
Make the default size of some of the windows smaller.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 08 Jul 2006 19:06:59 +0000 |
parents | 3dbcbc5e57e1 |
children | 25be562aaca8 |
comparison
equal
deleted
inserted
replaced
13933:ad171112d52c | 13934:ef0d515b9f97 |
---|---|
116 GntNode *nd = g_hash_table_lookup(nodes, window_list.window); | 116 GntNode *nd = g_hash_table_lookup(nodes, window_list.window); |
117 top_panel(nd->panel); | 117 top_panel(nd->panel); |
118 } | 118 } |
119 update_panels(); | 119 update_panels(); |
120 doupdate(); | 120 doupdate(); |
121 draw_taskbar(); | |
122 } | |
123 | |
124 static void | |
125 update_window_in_list(GntWidget *wid) | |
126 { | |
127 GntTextFormatFlags flag = 0; | |
128 | |
129 if (window_list.window == NULL) | |
130 return; | |
131 | |
132 if (wid == focus_list->data) | |
133 flag |= GNT_TEXT_FLAG_DIM; | |
134 else if (GNT_WIDGET_IS_FLAG_SET(wid, GNT_WIDGET_URGENT)) | |
135 flag |= GNT_TEXT_FLAG_BOLD; | |
136 | |
137 gnt_tree_set_row_flags(GNT_TREE(window_list.tree), wid, flag); | |
121 } | 138 } |
122 | 139 |
123 static void | 140 static void |
124 draw_taskbar() | 141 draw_taskbar() |
125 { | 142 { |
161 color = GNT_COLOR_NORMAL; | 178 color = GNT_COLOR_NORMAL; |
162 } | 179 } |
163 wbkgdset(taskbar, '\0' | COLOR_PAIR(color)); | 180 wbkgdset(taskbar, '\0' | COLOR_PAIR(color)); |
164 mvwhline(taskbar, 0, width * i, ' ' | COLOR_PAIR(color), width); | 181 mvwhline(taskbar, 0, width * i, ' ' | COLOR_PAIR(color), width); |
165 mvwprintw(taskbar, 0, width * i, "%s", GNT_BOX(w)->title); | 182 mvwprintw(taskbar, 0, width * i, "%s", GNT_BOX(w)->title); |
183 | |
184 update_window_in_list(w); | |
166 } | 185 } |
167 | 186 |
168 wrefresh(taskbar); | 187 wrefresh(taskbar); |
169 } | 188 } |
170 | 189 |
238 for (iter = g_list_first(focus_list); iter; iter = iter->next) | 257 for (iter = g_list_first(focus_list); iter; iter = iter->next) |
239 { | 258 { |
240 GntBox *box = GNT_BOX(iter->data); | 259 GntBox *box = GNT_BOX(iter->data); |
241 | 260 |
242 gnt_tree_add_row_after(GNT_TREE(tree), box, box->title, NULL, NULL); | 261 gnt_tree_add_row_after(GNT_TREE(tree), box, box->title, NULL, NULL); |
262 update_window_in_list(GNT_WIDGET(box)); | |
243 } | 263 } |
244 | 264 |
245 gnt_box_add_widget(GNT_BOX(win), tree); | 265 gnt_box_add_widget(GNT_BOX(win), tree); |
246 | 266 |
247 gnt_widget_set_size(tree, getmaxx(stdscr) / 3, getmaxy(stdscr) / 2); | 267 gnt_widget_set_size(tree, getmaxx(stdscr) / 3, getmaxy(stdscr) / 2); |
466 doupdate(); | 486 doupdate(); |
467 } | 487 } |
468 } | 488 } |
469 } | 489 } |
470 | 490 |
471 draw_taskbar(); | |
472 refresh(); | 491 refresh(); |
473 | 492 |
474 return TRUE; | 493 return TRUE; |
475 } | 494 } |
476 | 495 |
552 | 571 |
553 if (window_list.window) | 572 if (window_list.window) |
554 { | 573 { |
555 if ((GNT_IS_BOX(widget) && GNT_BOX(widget)->title) && window_list.window != widget | 574 if ((GNT_IS_BOX(widget) && GNT_BOX(widget)->title) && window_list.window != widget |
556 && GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_CAN_TAKE_FOCUS)) | 575 && GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_CAN_TAKE_FOCUS)) |
576 { | |
557 gnt_tree_add_row_after(GNT_TREE(window_list.tree), widget, | 577 gnt_tree_add_row_after(GNT_TREE(window_list.tree), widget, |
558 GNT_BOX(widget)->title, NULL, NULL); | 578 GNT_BOX(widget)->title, NULL, NULL); |
579 update_window_in_list(widget); | |
580 } | |
559 } | 581 } |
560 | 582 |
561 update_panels(); | 583 update_panels(); |
562 doupdate(); | 584 doupdate(); |
563 } | 585 } |