[gaim-migrate @ 5570] v0.62

Thu, 24 Apr 2003 03:52:25 +0000

author
Nathan Walp <nwalp@pidgin.im>
date
Thu, 24 Apr 2003 03:52:25 +0000
changeset 5204
deed98aa3181
parent 5203
c1e84c5e7f9f
child 5205
242b8aa81328

[gaim-migrate @ 5570]
this should fix new incoming conversations stealing focus and sending it
away to never-never land.

src/gtkconv.c file | annotate | diff | comparison | revisions
--- a/src/gtkconv.c	Wed Apr 23 21:41:03 2003 +0000
+++ b/src/gtkconv.c	Thu Apr 24 03:52:25 2003 +0000
@@ -3466,7 +3466,8 @@
 						  struct gaim_conversation *conv)
 {
 	struct gaim_gtk_window *gtkwin;
-	struct gaim_gtk_conversation *gtkconv;
+	struct gaim_gtk_conversation *gtkconv, *focus_gtkconv;
+	struct gaim_conversation *focus_conv;
 	GtkWidget *pane = NULL;
 	GtkWidget *tab_cont;
 	GtkWidget *tabby;
@@ -3646,11 +3647,10 @@
 		gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gtkwin->notebook), TRUE);
 	}
 
-	if ((gtk_notebook_get_current_page(GTK_NOTEBOOK(gtkwin->notebook)) == 0) ||
-		(conv == g_list_nth_data(gaim_window_get_conversations(win), 0))) {
-
-		gtk_widget_grab_focus(gtkconv->entry);
-	}
+	focus_conv = g_list_nth_data(gaim_window_get_conversations(win),
+			gtk_notebook_get_current_page(GTK_NOTEBOOK(gtkwin->notebook)));
+	focus_gtkconv = GAIM_GTK_CONVERSATION(focus_conv);
+	gtk_widget_grab_focus(focus_gtkconv->entry);
 
 	gaim_gtkconv_update_buddy_icon(conv);
 

mercurial