[empathy: 4/7] [contact-chooser] emit 'activate' on 'row-activated' as well



commit 1358b8ae4551e659e3a61a7d1dc41b768cab46ea
Author: Danielle Madeley <danielle madeley collabora co uk>
Date:   Thu Oct 20 15:29:51 2011 +1100

    [contact-chooser] emit 'activate' on 'row-activated' as well
    
    This means the selection can be activated when the treeview is focused.

 libempathy-gtk/empathy-contact-chooser.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c
index 1e61667..5444ff5 100644
--- a/libempathy-gtk/empathy-contact-chooser.c
+++ b/libempathy-gtk/empathy-contact-chooser.c
@@ -301,6 +301,15 @@ search_activate_cb (GtkEntry *entry,
 }
 
 static void
+view_activate_cb (GtkTreeView *view,
+    GtkTreePath *path,
+    GtkTreeViewColumn *column,
+    EmpathyContactChooser *self)
+{
+  g_signal_emit (self, signals[SIG_ACTIVATE], 0);
+}
+
+static void
 empathy_contact_chooser_init (EmpathyContactChooser *self)
 {
   EmpathyIndividualManager *mgr;
@@ -346,6 +355,8 @@ empathy_contact_chooser_init (EmpathyContactChooser *self)
 
   g_signal_connect (selection, "changed",
       G_CALLBACK (view_selection_changed_cb), self);
+  g_signal_connect (self->priv->view, "row-activated",
+      G_CALLBACK (view_activate_cb), self);
 
   scroll = gtk_scrolled_window_new (NULL, NULL);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]