aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-16 03:06:28 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-17 18:38:49 +0800
commit6101004ea39c479f048d8bdc4f3ce4296fb3dba6 (patch)
tree4f14fb21c2584d8bd6af51c643a7f4be2d299207 /libempathy-gtk
parent59f03a7aef175ffa8792eb0fbf825346cf5d5c4a (diff)
downloadgsoc2013-empathy-6101004ea39c479f048d8bdc4f3ce4296fb3dba6.tar
gsoc2013-empathy-6101004ea39c479f048d8bdc4f3ce4296fb3dba6.tar.gz
gsoc2013-empathy-6101004ea39c479f048d8bdc4f3ce4296fb3dba6.tar.bz2
gsoc2013-empathy-6101004ea39c479f048d8bdc4f3ce4296fb3dba6.tar.lz
gsoc2013-empathy-6101004ea39c479f048d8bdc4f3ce4296fb3dba6.tar.xz
gsoc2013-empathy-6101004ea39c479f048d8bdc4f3ce4296fb3dba6.tar.zst
gsoc2013-empathy-6101004ea39c479f048d8bdc4f3ce4296fb3dba6.zip
contact-selector-dialog: emit response when the entry is activated
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-selector-dialog.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-selector-dialog.c b/libempathy-gtk/empathy-contact-selector-dialog.c
index de9964dc8..955487aec 100644
--- a/libempathy-gtk/empathy-contact-selector-dialog.c
+++ b/libempathy-gtk/empathy-contact-selector-dialog.c
@@ -219,6 +219,19 @@ contact_selector_change_state_button_cb (GtkEditable *editable,
}
static void
+entry_activate_cb (GtkEntry *entry,
+ gpointer self)
+{
+ const gchar *id;
+
+ id = gtk_entry_get_text (entry);
+ if (EMP_STR_EMPTY (id))
+ return;
+
+ gtk_dialog_response (GTK_DIALOG (self), GTK_RESPONSE_ACCEPT);
+}
+
+static void
empathy_contact_selector_dialog_init (EmpathyContactSelectorDialog *dialog)
{
EmpathyContactSelectorDialogPriv *priv = GET_PRIV (dialog);
@@ -239,6 +252,10 @@ empathy_contact_selector_dialog_init (EmpathyContactSelectorDialog *dialog)
NULL);
g_free (filename);
+ empathy_builder_connect (gui, dialog,
+ "entry_id", "activate", entry_activate_cb,
+ NULL);
+
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_container_add (GTK_CONTAINER (content_area), priv->table_contact);