diff finch/libgnt/gntws.c @ 19174:974f9298814c

propagate from branch 'im.pidgin.pidgin.2.1.0' (head 1b855097a1f8ddde513bda1e81761c8d8455f931) to branch 'im.pidgin.soc.2007.finchfeat' (head 547aba29502f4db0b429e29c831c88b06270862e)
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 11 Aug 2007 02:38:56 +0000
parents e16d097c5739
children 9187d331aebe
line wrap: on
line diff
--- a/finch/libgnt/gntws.c	Sat Aug 11 02:38:23 2007 +0000
+++ b/finch/libgnt/gntws.c	Sat Aug 11 02:38:56 2007 +0000
@@ -35,6 +35,9 @@
 	int n, width = 0;
 	int i;
 
+	if (gnt_is_refugee())
+		return;
+
 	if (taskbar == NULL) {
 		taskbar = newwin(1, getmaxx(stdscr), getmaxy(stdscr) - 1, 0);
 	} else if (reposition) {
@@ -87,8 +90,12 @@
 
 void gnt_ws_add_widget(GntWS *ws, GntWidget* wid)
 {
+	GntWidget *oldfocus;
+	oldfocus = ws->ordered ? ws->ordered->data : NULL;
 	ws->list = g_list_append(ws->list, wid);
 	ws->ordered = g_list_prepend(ws->ordered, wid);
+	if (oldfocus)
+		gnt_widget_set_focus(oldfocus, FALSE);
 }
 
 void gnt_ws_remove_widget(GntWS *ws, GntWidget* wid)
@@ -110,11 +117,13 @@
 	g_list_foreach(ws->ordered, widget_hide, nodes);
 }
 
-void gnt_ws_widget_hide(GntWidget *widget, GHashTable *nodes) {
+void gnt_ws_widget_hide(GntWidget *widget, GHashTable *nodes)
+{
 	widget_hide(widget, nodes);
 }
 
-void gnt_ws_widget_show(GntWidget *widget, GHashTable *nodes) {
+void gnt_ws_widget_show(GntWidget *widget, GHashTable *nodes)
+{
 	widget_show(widget, nodes);
 }