diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-06-06 01:53:04 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-06-06 01:53:04 +0800 |
commit | 7b226f961c3340d85cff72b2b4485677ddfddb1d (patch) | |
tree | 4bde4031b9ed17473088a4dae76deb0f6af1d6bf /addressbook/gui/component/select-names/e-select-names-manager.c | |
parent | f90d524db34db50df1baad3410162d4301de34c9 (diff) | |
download | gsoc2013-evolution-7b226f961c3340d85cff72b2b4485677ddfddb1d.tar gsoc2013-evolution-7b226f961c3340d85cff72b2b4485677ddfddb1d.tar.gz gsoc2013-evolution-7b226f961c3340d85cff72b2b4485677ddfddb1d.tar.bz2 gsoc2013-evolution-7b226f961c3340d85cff72b2b4485677ddfddb1d.tar.lz gsoc2013-evolution-7b226f961c3340d85cff72b2b4485677ddfddb1d.tar.xz gsoc2013-evolution-7b226f961c3340d85cff72b2b4485677ddfddb1d.tar.zst gsoc2013-evolution-7b226f961c3340d85cff72b2b4485677ddfddb1d.zip |
Change the completion handler to use the ECompletionMatch.
2001-06-05 Jon Trowbridge <trow@ximian.com>
* gui/component/select-names/e-select-names-manager.c
(completion_handler): Change the completion handler to use the
ECompletionMatch.
* gui/component/select-names/e-select-names-completion.c
General changes to convert for ECompletionMatch use.
(emailify_match): Use extra sort keys in ECompletionMatch to let
us ensure that the primary email address is always the first
option, the secondary comes second, etc. There was no nice way to
do this previously.
(match_name): Removed code that adjusted score based on
similarities between the "real name" and the e-mail address. It
seemed like a good idea at the time, but produced unexpected and
confusing results.
svn path=/trunk/; revision=10120
Diffstat (limited to 'addressbook/gui/component/select-names/e-select-names-manager.c')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-manager.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-manager.c b/addressbook/gui/component/select-names/e-select-names-manager.c index 6c06624918..9361cfa836 100644 --- a/addressbook/gui/component/select-names/e-select-names-manager.c +++ b/addressbook/gui/component/select-names/e-select-names-manager.c @@ -267,17 +267,18 @@ entry_destroyed(EEntry *entry, ESelectNamesManager *manager) } static void -completion_handler (EEntry *entry, const gchar *text, gpointer user_data) +completion_handler (EEntry *entry, ECompletionMatch *match) { ESelectNamesModel *snm; EDestination *dest; gint i, pos, start_pos, len; - if (user_data == NULL) + if (match == NULL || match->user_data == NULL) return; + snm = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (entry), "select_names_model")); - dest = E_DESTINATION (user_data); + dest = E_DESTINATION (match->user_data); /* Sometimes I really long for garbage collection. Reference counting makes you feel 31337, but sometimes it is just a |