pidgin: 5f0bd751: Add a row-activation event for the Pounc...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Sat Aug 22 02:25:54 EDT 2009


-----------------------------------------------------------------
Revision: 5f0bd751206378b9557654c6a6286407c7e48e35
Ancestor: 1ae3d13a24c511c4c73913ef30307d2b5e0c01b1
Author: salinasv at gmail.com
Date: 2009-08-22T06:20:10
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/5f0bd751206378b9557654c6a6286407c7e48e35

Modified files:
        pidgin/gtknotify.c

ChangeLog: 

Add a row-activation event for the Pounces dialog to open a new conversation window.

-------------- next part --------------
============================================================
--- pidgin/gtknotify.c	711b214b526737967e32d6a148bb4cc7120d5060
+++ pidgin/gtknotify.c	063b0e7309859bc362161b08a1b26eefffe4cad2
@@ -296,6 +296,28 @@ static void
 }
 
 static void
+pounce_row_activated_cb(GtkTreeView *tv, GtkTreePath *path,
+	GtkTreeViewColumn *col, gpointer data)
+{
+	PidginNotifyPounceData *pounce_data;
+	PurpleAccount *account;
+	GtkTreeIter iter;
+
+	if(!gtk_tree_model_get_iter(GTK_TREE_MODEL(pounce_dialog->treemodel), &iter, path))
+		return;
+
+	gtk_tree_model_get(GTK_TREE_MODEL(pounce_dialog->treemodel), &iter,
+		PIDGIN_POUNCE_DATA, &pounce_data, -1);
+
+	account = pounce_data->account;
+
+	purple_conversation_new(PURPLE_CONV_TYPE_IM, account,
+		purple_account_get_username(account));
+
+	pounce_response_dismiss();
+}
+
+static void
 reset_mail_dialog(GtkDialog *unused)
 {
 	if (mail_dialog->in_use)
@@ -1539,6 +1561,8 @@ pidgin_create_notification_dialog(Pidgin
 		gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE);
 		g_signal_connect(G_OBJECT(sel), "changed",
 			G_CALLBACK(pounce_row_selected_cb), NULL);
+		g_signal_connect(G_OBJECT(spec_dialog->treeview), "row-activated",
+			G_CALLBACK(pounce_row_activated_cb), NULL);
 	}
 
 	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);


More information about the Commits mailing list