pidgin: 4a7fc8bb: Patch from fmoo to make double-clicking ...

resiak at soc.pidgin.im resiak at soc.pidgin.im
Fri Apr 11 18:55:39 EDT 2008


-----------------------------------------------------------------
Revision: 4a7fc8bbb7dca50f323427f841dc0ad3b71d1b2b
Ancestor: f30343e20446f38fc867f0f4ab9a6e6c23ef00cc
Author: resiak at soc.pidgin.im
Date: 2008-04-11T22:53:34
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4a7fc8bbb7dca50f323427f841dc0ad3b71d1b2b

Modified files:
        pidgin/gtkconv.c

ChangeLog: 

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

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	b1362347e19ae2b0470cfcd7fd50eb8dcde77f7e
+++ pidgin/gtkconv.c	9965c96e3759111943b63e426e8a50070afd2ff0
@@ -1813,6 +1813,22 @@ static void
 }
 
 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 @@ setup_chat_userlist(PidginConversation *
 
 	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);


More information about the Commits mailing list