Mercurial > pidgin
comparison finch/libgnt/gntmain.c @ 18069:08776fc5c06f
propagate from branch 'im.pidgin.finch.workspaces' (head 76cfc9565a5cdde8d2e1f2efc3282b309a55a110)
to branch 'im.pidgin.pidgin.2.1.0' (head 7369e1bc964aa300a73670872d34129642b3ec49)
author | Richard Nelson <wabz@pidgin.im> |
---|---|
date | Fri, 08 Jun 2007 10:21:50 +0000 |
parents | 1cedd520cd18 4d4a396a478c |
children | 2b757aadddc9 |
comparison
equal
deleted
inserted
replaced
18068:0b3d6ea61760 | 18069:08776fc5c06f |
---|---|
114 static int offset = 0; | 114 static int offset = 0; |
115 GntMouseEvent event; | 115 GntMouseEvent event; |
116 GntWidget *widget = NULL; | 116 GntWidget *widget = NULL; |
117 PANEL *p = NULL; | 117 PANEL *p = NULL; |
118 | 118 |
119 if (!wm->ordered || buffer[0] != 27) | 119 if (!wm->cws->ordered || buffer[0] != 27) |
120 return FALSE; | 120 return FALSE; |
121 | 121 |
122 buffer++; | 122 buffer++; |
123 if (strlen(buffer) < 5) | 123 if (strlen(buffer) < 5) |
124 return FALSE; | 124 return FALSE; |
170 if (widget && gnt_wm_process_click(wm, event, x, y, widget)) | 170 if (widget && gnt_wm_process_click(wm, event, x, y, widget)) |
171 return TRUE; | 171 return TRUE; |
172 | 172 |
173 if (event == GNT_LEFT_MOUSE_DOWN && widget && widget != wm->_list.window && | 173 if (event == GNT_LEFT_MOUSE_DOWN && widget && widget != wm->_list.window && |
174 !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_TRANSIENT)) { | 174 !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_TRANSIENT)) { |
175 if (widget != wm->ordered->data) { | 175 if (widget != wm->cws->ordered->data) { |
176 gnt_wm_raise_window(wm, widget); | 176 gnt_wm_raise_window(wm, widget); |
177 } | 177 } |
178 if (y == widget->priv.y) { | 178 if (y == widget->priv.y) { |
179 offset = x - widget->priv.x; | 179 offset = x - widget->priv.x; |
180 remember = widget; | 180 remember = widget; |
181 button = MOUSE_LEFT; | 181 button = MOUSE_LEFT; |
182 } | 182 } |
183 } else if (event == GNT_MOUSE_UP) { | 183 } else if (event == GNT_MOUSE_UP) { |
184 if (button == MOUSE_NONE && y == getmaxy(stdscr) - 1) { | 184 if (button == MOUSE_NONE && y == getmaxy(stdscr) - 1) { |
185 /* Clicked on the taskbar */ | 185 /* Clicked on the taskbar */ |
186 int n = g_list_length(wm->list); | 186 int n = g_list_length(wm->cws->list); |
187 if (n) { | 187 if (n) { |
188 int width = getmaxx(stdscr) / n; | 188 int width = getmaxx(stdscr) / n; |
189 gnt_bindable_perform_action_named(GNT_BINDABLE(wm), "switch-window-n", x/width, NULL); | 189 gnt_bindable_perform_action_named(GNT_BINDABLE(wm), "switch-window-n", x/width, NULL); |
190 } | 190 } |
191 } else if (button == MOUSE_LEFT && remember) { | 191 } else if (button == MOUSE_LEFT && remember) { |
513 while (widget->parent) | 513 while (widget->parent) |
514 widget = widget->parent; | 514 widget = widget->parent; |
515 | 515 |
516 if (widget == wm->_list.window) | 516 if (widget == wm->_list.window) |
517 return TRUE; | 517 return TRUE; |
518 if (wm->ordered && wm->ordered->data == widget) { | 518 if (wm->cws->ordered && wm->cws->ordered->data == widget) { |
519 if (GNT_IS_BOX(widget) && | 519 if (GNT_IS_BOX(widget) && |
520 (GNT_BOX(widget)->active == w || widget == w)) | 520 (GNT_BOX(widget)->active == w || widget == w)) |
521 return TRUE; | 521 return TRUE; |
522 } | 522 } |
523 return FALSE; | 523 return FALSE; |
526 void gnt_widget_set_urgent(GntWidget *widget) | 526 void gnt_widget_set_urgent(GntWidget *widget) |
527 { | 527 { |
528 while (widget->parent) | 528 while (widget->parent) |
529 widget = widget->parent; | 529 widget = widget->parent; |
530 | 530 |
531 if (wm->ordered && wm->ordered->data == widget) | 531 if (wm->cws->ordered && wm->cws->ordered->data == widget) |
532 return; | 532 return; |
533 | 533 |
534 GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_URGENT); | 534 GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_URGENT); |
535 | 535 |
536 gnt_wm_update_window(wm, widget); | 536 gnt_wm_update_window(wm, widget); |