|
|
a00a81 |
diff -up evolution-3.22.6/e-util/e-name-selector-entry.c.name-selector-entry-fake-changed-signal evolution-3.22.6/e-util/e-name-selector-entry.c
|
|
|
a00a81 |
--- evolution-3.22.6/e-util/e-name-selector-entry.c.name-selector-entry-fake-changed-signal 2017-01-27 12:06:11.000000000 +0100
|
|
|
a00a81 |
+++ evolution-3.22.6/e-util/e-name-selector-entry.c 2017-04-18 10:51:23.716045722 +0200
|
|
|
a00a81 |
@@ -65,6 +65,8 @@ struct _ENameSelectorEntryPrivate {
|
|
|
a00a81 |
GQueue cancellables;
|
|
|
a00a81 |
|
|
|
a00a81 |
GHashTable *known_contacts; /* gchar * ~> 1 */
|
|
|
a00a81 |
+
|
|
|
a00a81 |
+ gboolean block_entry_changed_signal;
|
|
|
a00a81 |
};
|
|
|
a00a81 |
|
|
|
a00a81 |
enum {
|
|
|
a00a81 |
@@ -2028,6 +2030,16 @@ sanitize_entry (ENameSelectorEntry *name
|
|
|
a00a81 |
generate_attribute_list (name_selector_entry);
|
|
|
a00a81 |
}
|
|
|
a00a81 |
|
|
|
a00a81 |
+static void
|
|
|
a00a81 |
+maybe_block_entry_changed_cb (ENameSelectorEntry *name_selector_entry,
|
|
|
a00a81 |
+ gpointer user_data)
|
|
|
a00a81 |
+{
|
|
|
a00a81 |
+ g_return_if_fail (E_IS_NAME_SELECTOR_ENTRY (name_selector_entry));
|
|
|
a00a81 |
+
|
|
|
a00a81 |
+ if (name_selector_entry->priv->block_entry_changed_signal)
|
|
|
a00a81 |
+ g_signal_stop_emission_by_name (name_selector_entry, "changed");
|
|
|
a00a81 |
+}
|
|
|
a00a81 |
+
|
|
|
a00a81 |
static gboolean
|
|
|
a00a81 |
user_focus_in (ENameSelectorEntry *name_selector_entry,
|
|
|
a00a81 |
GdkEventFocus *event_focus)
|
|
|
a00a81 |
@@ -2037,6 +2049,8 @@ user_focus_in (ENameSelectorEntry *name_
|
|
|
a00a81 |
GString *str = g_string_new ("");
|
|
|
a00a81 |
EDestination *dest_dummy = e_destination_new ();
|
|
|
a00a81 |
|
|
|
a00a81 |
+ /* To not send fake 'changed' signals, which can influence message composer */
|
|
|
a00a81 |
+ name_selector_entry->priv->block_entry_changed_signal = TRUE;
|
|
|
a00a81 |
g_signal_handlers_block_matched (name_selector_entry, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, name_selector_entry);
|
|
|
a00a81 |
g_signal_handlers_block_matched (name_selector_entry->priv->destination_store, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, name_selector_entry);
|
|
|
a00a81 |
|
|
|
a00a81 |
@@ -2072,6 +2086,7 @@ user_focus_in (ENameSelectorEntry *name_
|
|
|
a00a81 |
|
|
|
a00a81 |
g_signal_handlers_unblock_matched (name_selector_entry->priv->destination_store, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, name_selector_entry);
|
|
|
a00a81 |
g_signal_handlers_unblock_matched (name_selector_entry, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, name_selector_entry);
|
|
|
a00a81 |
+ name_selector_entry->priv->block_entry_changed_signal = FALSE;
|
|
|
a00a81 |
|
|
|
a00a81 |
generate_attribute_list (name_selector_entry);
|
|
|
a00a81 |
|
|
|
a00a81 |
@@ -3381,11 +3396,15 @@ e_name_selector_entry_init (ENameSelecto
|
|
|
a00a81 |
|
|
|
a00a81 |
name_selector_entry->priv->minimum_query_length = 3;
|
|
|
a00a81 |
name_selector_entry->priv->show_address = FALSE;
|
|
|
a00a81 |
+ name_selector_entry->priv->block_entry_changed_signal = FALSE;
|
|
|
a00a81 |
name_selector_entry->priv->known_contacts = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
|
|
a00a81 |
|
|
|
a00a81 |
/* Edit signals */
|
|
|
a00a81 |
|
|
|
a00a81 |
g_signal_connect (
|
|
|
a00a81 |
+ name_selector_entry, "changed",
|
|
|
a00a81 |
+ G_CALLBACK (maybe_block_entry_changed_cb), NULL);
|
|
|
a00a81 |
+ g_signal_connect (
|
|
|
a00a81 |
name_selector_entry, "insert-text",
|
|
|
a00a81 |
G_CALLBACK (user_insert_text), name_selector_entry);
|
|
|
a00a81 |
g_signal_connect (
|