# HG changeset patch # User Will Thompson # Date 1207954414 0 # Node ID 2e16a86883c7cf43e956b51b9368dd7a63a2dbf3 # Parent 5c8d236b50eee0b260a11a37fc47de9d47c35a6e Patch from fmoo to make double-clicking or hitting enter on a chatroom user open an IM with them. It's equivalent to right-clicking them and picking IM, so should work no worse than that does in the case where you don't actually know an XMPP MUC participant's real JID. Fixes #1935 diff -r 5c8d236b50ee -r 2e16a86883c7 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Fri Apr 11 22:31:55 2008 +0000 +++ b/pidgin/gtkconv.c Fri Apr 11 22:53:34 2008 +0000 @@ -1813,6 +1813,22 @@ } static void +activate_list_cb(GtkTreeView *list, GtkTreePath *path, GtkTreeViewColumn *column, PidginConversation *gtkconv) +{ + GtkTreeIter iter; + GtkTreeModel *model; + gchar *who; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); + + gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path); + gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, CHAT_USERS_NAME_COLUMN, &who, -1); + chat_do_im(gtkconv, who); + + g_free(who); +} + +static void move_to_next_unread_tab(PidginConversation *gtkconv, gboolean forward) { PidginConversation *next_gtkconv = NULL, *most_active = NULL; @@ -4525,6 +4541,8 @@ g_signal_connect(G_OBJECT(list), "button_press_event", G_CALLBACK(right_click_chat_cb), gtkconv); + g_signal_connect(G_OBJECT(list), "row-activated", + G_CALLBACK(activate_list_cb), gtkconv); g_signal_connect(G_OBJECT(list), "popup-menu", G_CALLBACK(gtkconv_chat_popup_menu_cb), gtkconv); g_signal_connect(G_OBJECT(lbox), "size-allocate", G_CALLBACK(lbox_size_allocate_cb), gtkconv);