[contact-lookup-applet] Don't call entry_changed_cb when changing the entry
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [contact-lookup-applet] Don't call entry_changed_cb when changing the entry
- Date: Mon, 1 Feb 2010 15:48:36 +0000 (UTC)
commit 1d73642888c5dd0335c10fcda199a1a239719412
Author: Bastien Nocera <hadess hadess net>
Date: Mon Feb 1 15:46:45 2010 +0000
Don't call entry_changed_cb when changing the entry
When selecting a completion option, we don't want to call
entry_changed_cb as it would create another search, without
popping up the completion options.
That would make the first activation on the entry itself select
the first item in the completion even if the user selected
the second one.
src/e-contact-entry.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/e-contact-entry.c b/src/e-contact-entry.c
index bd0d739..69ffa3d 100644
--- a/src/e-contact-entry.c
+++ b/src/e-contact-entry.c
@@ -115,6 +115,7 @@ static EBookQuery* create_query (EContactEntry *entry, const char* s);
static guint entry_height (GtkWidget *widget);
static const char* stringify_ebook_error (const EBookStatus status);
static void e_contact_entry_item_free (EContactEntyItem *item);
+static void entry_changed_cb (GtkEditable *editable, gpointer user_data);
/**
* The entry was activated. Take the first contact found and signal the user.
@@ -187,8 +188,10 @@ completion_match_selected_cb (GtkEntryCompletion *completion, GtkTreeModel *mode
g_free (message);
return FALSE;
}
+ g_signal_handlers_block_by_func (G_OBJECT (entry), entry_changed_cb, NULL);
gtk_entry_set_text (GTK_ENTRY (entry), "");
g_signal_emit (G_OBJECT (entry), signals[CONTACT_SELECTED], 0, contact, identifier);
+ g_signal_handlers_unblock_by_func (G_OBJECT (entry), entry_changed_cb, NULL);
g_object_unref (contact);
g_free (uid);
g_free (identifier);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]