]> git.0d.be Git - empathy.git/commitdiff
Emit RESPONSE_APPLY on row-activated
authorDanielle Madeley <danielle.madeley@collabora.co.uk>
Thu, 3 Mar 2011 13:16:18 +0000 (00:16 +1100)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Thu, 3 Mar 2011 13:35:13 +0000 (13:35 +0000)
libempathy-gtk/empathy-contact-search-dialog.c

index cd62a1940fc4fe9b57ccf75fd9bf6f8ef8cf0c15..ce5c578acd7cced2e2fc4a017bda292a7ed2097b 100644 (file)
@@ -431,6 +431,16 @@ empathy_account_chooser_filter_supports_contact_search (
       cb_data);
 }
 
+static void
+contact_search_dialog_row_activated_cb (GtkTreeView *tv,
+    GtkTreePath *path,
+    GtkTreeViewColumn *column,
+    EmpathyContactSearchDialog *self)
+{
+  /* just emit the same response as the Add Button */
+  gtk_dialog_response (GTK_DIALOG (self), GTK_RESPONSE_APPLY);
+}
+
 static void
 empathy_contact_search_dialog_init (EmpathyContactSearchDialog *self)
 {
@@ -500,6 +510,8 @@ empathy_contact_search_dialog_init (EmpathyContactSearchDialog *self)
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree_view));
   gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
 
+  g_signal_connect (priv->tree_view, "row-activated",
+      G_CALLBACK (contact_search_dialog_row_activated_cb), self);
   g_signal_connect (selection, "changed",
       G_CALLBACK (on_selection_changed), self);