changeset 13919:0febf380b473

[gaim-migrate @ 16430] Remove some warnings, and make sure the window in focus is always on top of all other windows. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 05 Jul 2006 00:09:56 +0000
parents 61ba85cf05a6
children 73cd68ae7c43
files console/libgnt/gntmain.c
diffstat 1 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/console/libgnt/gntmain.c	Tue Jul 04 18:49:13 2006 +0000
+++ b/console/libgnt/gntmain.c	Wed Jul 05 00:09:56 2006 +0000
@@ -47,6 +47,7 @@
 
 static void free_node(gpointer data);
 static void draw_taskbar();
+static void bring_on_top(GntWidget *widget);
 
 void gnt_screen_take_focus(GntWidget *widget)
 {
@@ -88,8 +89,7 @@
 
 	if (focus_list)
 	{
-		gnt_widget_set_focus(focus_list->data, TRUE);
-		gnt_widget_draw(focus_list->data);
+		bring_on_top(focus_list->data);
 	}
 	draw_taskbar();
 }
@@ -98,7 +98,6 @@
 bring_on_top(GntWidget *widget)
 {
 	GntNode *node = g_hash_table_lookup(nodes, widget);
-	GList *iter;
 
 	g_return_if_fail(focus_list->data == widget);
 
@@ -124,7 +123,7 @@
 {
 	static WINDOW *taskbar = NULL;
 	GList *iter;
-	int n, width;
+	int n, width = 0;
 	int i;
 
 	if (taskbar == NULL)
@@ -204,7 +203,7 @@
 window_list_activate(GntTree *tree, gpointer null)
 {
 	GntWidget *widget = gnt_tree_get_selection_data(GNT_TREE(tree));
-	GntWidget *old;
+	GntWidget *old = NULL;
 
 	if (focus_list)
 		old = focus_list->data;
@@ -218,15 +217,14 @@
 	}
 }
 
-static GntWidget *
+static void
 show_window_list()
 {
 	GntWidget *tree, *win;
 	GList *iter;
-	int id;
 
 	if (window_list.window)
-		return window_list.window;
+		return;
 
 	win = window_list.window = gnt_box_new(FALSE, FALSE);
 	gnt_box_set_toplevel(GNT_BOX(win), TRUE);
@@ -497,8 +495,6 @@
 
 void gnt_screen_release(GntWidget *widget)
 {
-	WINDOW *win;
-	GList *iter;
 	GntNode *node;
 
 	gnt_screen_remove_widget(widget);
@@ -520,8 +516,6 @@
 
 void gnt_screen_update(GntWidget *widget)
 {
-	GList *iter;
-	WINDOW *win;
 	GntNode *node;
 	
 	if (widget->parent)