comparison src/gtkconv.c @ 5204:44de70702205

[gaim-migrate @ 5570] this should fix new incoming conversations stealing focus and sending it away to never-never land. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 24 Apr 2003 03:52:25 +0000
parents bfd1e4c681a1
children fefad67de2c7
comparison
equal deleted inserted replaced
5203:824f0ecf47ee 5204:44de70702205
3464 static void 3464 static void
3465 gaim_gtk_add_conversation(struct gaim_window *win, 3465 gaim_gtk_add_conversation(struct gaim_window *win,
3466 struct gaim_conversation *conv) 3466 struct gaim_conversation *conv)
3467 { 3467 {
3468 struct gaim_gtk_window *gtkwin; 3468 struct gaim_gtk_window *gtkwin;
3469 struct gaim_gtk_conversation *gtkconv; 3469 struct gaim_gtk_conversation *gtkconv, *focus_gtkconv;
3470 struct gaim_conversation *focus_conv;
3470 GtkWidget *pane = NULL; 3471 GtkWidget *pane = NULL;
3471 GtkWidget *tab_cont; 3472 GtkWidget *tab_cont;
3472 GtkWidget *tabby; 3473 GtkWidget *tabby;
3473 gboolean new_ui; 3474 gboolean new_ui;
3474 GaimConversationType conv_type; 3475 GaimConversationType conv_type;
3644 } 3645 }
3645 } else { 3646 } else {
3646 gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gtkwin->notebook), TRUE); 3647 gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gtkwin->notebook), TRUE);
3647 } 3648 }
3648 3649
3649 if ((gtk_notebook_get_current_page(GTK_NOTEBOOK(gtkwin->notebook)) == 0) || 3650 focus_conv = g_list_nth_data(gaim_window_get_conversations(win),
3650 (conv == g_list_nth_data(gaim_window_get_conversations(win), 0))) { 3651 gtk_notebook_get_current_page(GTK_NOTEBOOK(gtkwin->notebook)));
3651 3652 focus_gtkconv = GAIM_GTK_CONVERSATION(focus_conv);
3652 gtk_widget_grab_focus(gtkconv->entry); 3653 gtk_widget_grab_focus(focus_gtkconv->entry);
3653 }
3654 3654
3655 gaim_gtkconv_update_buddy_icon(conv); 3655 gaim_gtkconv_update_buddy_icon(conv);
3656 3656
3657 if (!new_ui) 3657 if (!new_ui)
3658 g_object_unref(gtkconv->tab_cont); 3658 g_object_unref(gtkconv->tab_cont);