changeset 4211:468f1ce401db

[gaim-migrate @ 4448] faceprint fixed the menu when you have chats as well now. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 06 Jan 2003 00:26:49 +0000
parents e11393a176d5
children bbd1236e9cc9
files src/buddy_chat.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddy_chat.c	Mon Jan 06 00:23:47 2003 +0000
+++ b/src/buddy_chat.c	Mon Jan 06 00:26:49 2003 +0000
@@ -1233,7 +1233,7 @@
 			gtk_notebook_set_scrollable(GTK_NOTEBOOK(chat_notebook), TRUE);
 			gtk_notebook_popup_enable(GTK_NOTEBOOK(chat_notebook));
 			gtk_container_add(GTK_CONTAINER(win), testidea);
-			g_signal_connect(GTK_OBJECT(chat_notebook), "switch-page",
+			g_signal_connect_after(GTK_OBJECT(chat_notebook), "switch-page",
 					   G_CALLBACK(convo_switch), NULL);
 			gtk_widget_show(chat_notebook);
 		} else
@@ -1255,6 +1255,8 @@
 		gtk_box_pack_start(GTK_BOX(tabby), b->close, FALSE, FALSE, 0);
 		gtk_widget_show_all(tabby);
 		gtk_notebook_append_page(GTK_NOTEBOOK(chat_notebook), cont, tabby);
+		gtk_notebook_set_menu_label_text(GTK_NOTEBOOK(chat_notebook), cont,
+				b->name);
 		gtk_widget_show(cont);
 	} else {
 		win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
@@ -1393,8 +1395,10 @@
 	g_object_set_data(G_OBJECT(b->entry_buffer), "user_data", b);
 	chatentry = gtk_text_view_new_with_buffer(b->entry_buffer);
 	b->entry = chatentry;
-	if (!(chat_options & OPT_CHAT_ONE_WINDOW))
-		gtk_window_set_focus(GTK_WINDOW(b->window), b->entry);
+	if (!(chat_options & OPT_CHAT_ONE_WINDOW)
+			|| ((gtk_notebook_get_current_page(GTK_NOTEBOOK(chat_notebook)) == 0)
+				&& (b = g_list_nth_data(chats, 0))))
+		gtk_widget_grab_focus(b->entry);
 
 
 	b->makesound = 1; /* Need to do this until we get a menu */