aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-contact-chooser.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-10-17 20:10:01 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-10-18 16:46:21 +0800
commit061d4ab96a0ebde9665192c3712ca3928ff2c679 (patch)
treed7636da121e1467ca69e11ce45a386814a076adb /libempathy-gtk/empathy-contact-chooser.c
parent4444861d7999d6b1326e7f3b26637e9b9335950d (diff)
downloadgsoc2013-empathy-061d4ab96a0ebde9665192c3712ca3928ff2c679.tar
gsoc2013-empathy-061d4ab96a0ebde9665192c3712ca3928ff2c679.tar.gz
gsoc2013-empathy-061d4ab96a0ebde9665192c3712ca3928ff2c679.tar.bz2
gsoc2013-empathy-061d4ab96a0ebde9665192c3712ca3928ff2c679.tar.lz
gsoc2013-empathy-061d4ab96a0ebde9665192c3712ca3928ff2c679.tar.xz
gsoc2013-empathy-061d4ab96a0ebde9665192c3712ca3928ff2c679.tar.zst
gsoc2013-empathy-061d4ab96a0ebde9665192c3712ca3928ff2c679.zip
contact-chooser: add 'activate' signal
https://bugzilla.gnome.org/show_bug.cgi?id=661993
Diffstat (limited to 'libempathy-gtk/empathy-contact-chooser.c')
-rw-r--r--libempathy-gtk/empathy-contact-chooser.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c
index c266e3feb..1e61667fa 100644
--- a/libempathy-gtk/empathy-contact-chooser.c
+++ b/libempathy-gtk/empathy-contact-chooser.c
@@ -22,6 +22,7 @@ G_DEFINE_TYPE (EmpathyContactChooser,
enum {
SIG_SELECTION_CHANGED,
+ SIG_ACTIVATE,
LAST_SIGNAL
};
@@ -122,6 +123,15 @@ empathy_contact_chooser_class_init (
g_cclosure_marshal_generic,
G_TYPE_NONE,
1, FOLKS_TYPE_INDIVIDUAL);
+
+ signals[SIG_ACTIVATE] = g_signal_new ("activate",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 0);
}
static void
@@ -284,6 +294,13 @@ search_text_changed (GtkEntry *entry,
}
static void
+search_activate_cb (GtkEntry *entry,
+ EmpathyContactChooser *self)
+{
+ g_signal_emit (self, signals[SIG_ACTIVATE], 0);
+}
+
+static void
empathy_contact_chooser_init (EmpathyContactChooser *self)
{
EmpathyIndividualManager *mgr;
@@ -309,6 +326,8 @@ empathy_contact_chooser_init (EmpathyContactChooser *self)
g_signal_connect (self->priv->search_entry, "changed",
G_CALLBACK (search_text_changed), self);
+ g_signal_connect (self->priv->search_entry, "activate",
+ G_CALLBACK (search_activate_cb), self);
/* Add the treeview */
mgr = empathy_individual_manager_dup_singleton ();