aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/select-names/e-select-names-completion.c
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-07-26 13:46:37 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-07-26 13:46:37 +0800
commit09365bf01c61dd2a28eee92fd332c2b6ca82ce2b (patch)
tree4247bef9f99f9e685cba8d72110d9a6a4ad9864f /addressbook/gui/component/select-names/e-select-names-completion.c
parent9cf5ba1797448f8a2eb28add9f6b07c6adb31495 (diff)
downloadgsoc2013-evolution-09365bf01c61dd2a28eee92fd332c2b6ca82ce2b.tar
gsoc2013-evolution-09365bf01c61dd2a28eee92fd332c2b6ca82ce2b.tar.gz
gsoc2013-evolution-09365bf01c61dd2a28eee92fd332c2b6ca82ce2b.tar.bz2
gsoc2013-evolution-09365bf01c61dd2a28eee92fd332c2b6ca82ce2b.tar.lz
gsoc2013-evolution-09365bf01c61dd2a28eee92fd332c2b6ca82ce2b.tar.xz
gsoc2013-evolution-09365bf01c61dd2a28eee92fd332c2b6ca82ce2b.tar.zst
gsoc2013-evolution-09365bf01c61dd2a28eee92fd332c2b6ca82ce2b.zip
Removed some debugging chatter.
2001-07-26 Jon Trowbridge <trow@ximian.com> * backend/ebook/e-card.c: Removed some debugging chatter. * gui/component/select-names/e-select-names-manager.c (e_select_names_manager_create_entry): Store the completion handler in the entry's object data. * gui/component/select-names/e-select-names-bonobo.c (entry_get_property_fn): Added support for getting "destinations" and "allow_contact_lists" properties. (entry_set_property_fn): Added support for setting "destinations" and "allow_contact_lists" properties. (impl_SelectNames_get_entry_for_section): Added definitions for "destinations" and "allow_contact_lists" properties. * gui/component/select-names/e-select-names-completion.c (e_select_names_completion_get_match_contact_lists): Added. (e_select_names_completion_set_match_contact_lists): Added. Controls whether contact lists are offered as options during completion. (book_query_process_card_list): Check if match_contact_lists is set before (duh!) matching on a contact list. (e_select_names_completion_init): Set match_contact_lists to TRUE by default. 2001-07-26 Jon Trowbridge <trow@ximian.com> * e-msg-composer-hdrs.c (set_recipients): Get "destinations", rather than "text" from the entry_widget. (The getters/setters in the control have been made more symmetric.) svn path=/trunk/; revision=11422
Diffstat (limited to 'addressbook/gui/component/select-names/e-select-names-completion.c')
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.c38
1 files changed, 29 insertions, 9 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-completion.c b/addressbook/gui/component/select-names/e-select-names-completion.c
index 2590a8515b..e75f964b4c 100644
--- a/addressbook/gui/component/select-names/e-select-names-completion.c
+++ b/addressbook/gui/component/select-names/e-select-names-completion.c
@@ -62,6 +62,7 @@ struct _ESelectNamesCompletionPrivate {
gchar *cached_query_text;
GList *cached_cards;
+ gboolean match_contact_lists;
gboolean primary_only;
};
@@ -543,16 +544,20 @@ book_query_process_card_list (ESelectNamesCompletion *comp, const GList *cards)
if (e_card_evolution_list (card)) {
- EDestination *dest = e_destination_new ();
- ECompletionMatch *match;
- e_destination_set_card (dest, card, 0);
- match = book_query_score (comp, dest);
- if (match && match->score > 0) {
- e_completion_found_match (E_COMPLETION (comp), match);
- } else {
- e_completion_match_unref (match);
+ if (comp->priv->match_contact_lists) {
+
+ EDestination *dest = e_destination_new ();
+ ECompletionMatch *match;
+ e_destination_set_card (dest, card, 0);
+ match = book_query_score (comp, dest);
+ if (match && match->score > 0) {
+ e_completion_found_match (E_COMPLETION (comp), match);
+ } else {
+ e_completion_match_unref (match);
+ }
+ gtk_object_unref (GTK_OBJECT (dest));
+
}
- gtk_object_unref (GTK_OBJECT (dest));
} else if (card->email) {
gint i;
@@ -715,6 +720,7 @@ static void
e_select_names_completion_init (ESelectNamesCompletion *comp)
{
comp->priv = g_new0 (struct _ESelectNamesCompletionPrivate, 1);
+ comp->priv->match_contact_lists = TRUE;
}
static void
@@ -1154,3 +1160,17 @@ e_select_names_completion_new (EBook *book, ESelectNamesModel *model)
return E_COMPLETION (comp);
}
+gboolean
+e_select_names_completion_get_match_contact_lists (ESelectNamesCompletion *comp)
+{
+ g_return_val_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp), FALSE);
+ return comp->priv->match_contact_lists;
+}
+
+
+void
+e_select_names_completion_set_match_contact_lists (ESelectNamesCompletion *comp, gboolean x)
+{
+ g_return_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp));
+ comp->priv->match_contact_lists = x;
+}