From aedd47862d6d5268cd61bd4f7da7c4e5cc1a2f3b Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 9 May 2002 19:20:26 +0000 Subject: Added "first_email" property. 2002-05-09 Christopher James Lahey * gui/component/select-names/e-select-names-bonobo.c (entry_get_property_fn): Added "first_email" property. svn path=/trunk/; revision=16734 --- addressbook/ChangeLog | 5 +++++ .../component/select-names/e-select-names-bonobo.c | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index b9fe698c8e..ade3e3d532 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,8 @@ +2002-05-09 Christopher James Lahey + + * gui/component/select-names/e-select-names-bonobo.c + (entry_get_property_fn): Added "first_email" property. + 2002-05-09 Ettore Perazzoli * gui/component/addressbook-storage.c diff --git a/addressbook/gui/component/select-names/e-select-names-bonobo.c b/addressbook/gui/component/select-names/e-select-names-bonobo.c index b2c791f259..0a763899c6 100644 --- a/addressbook/gui/component/select-names/e-select-names-bonobo.c +++ b/addressbook/gui/component/select-names/e-select-names-bonobo.c @@ -53,6 +53,7 @@ struct _ESelectNamesBonoboPrivate { enum _EntryPropertyID { ENTRY_PROPERTY_ID_TEXT, ENTRY_PROPERTY_ID_DESTINATIONS, + ENTRY_PROPERTY_ID_FIRST_EMAIL, ENTRY_PROPERTY_ID_ALLOW_CONTACT_LISTS, ENTRY_PROPERTY_ID_ENTRY_CHANGED }; @@ -97,6 +98,23 @@ entry_get_property_fn (BonoboPropertyBag *bag, } break; + case ENTRY_PROPERTY_ID_FIRST_EMAIL: + { + ESelectNamesModel *model; + + model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model")); + g_assert (model != NULL); + + if (e_select_names_model_count (model) > 0) { + const EDestination *destination = e_select_names_model_get_destination (model, 0); + const char *text = e_destination_get_email (destination); + BONOBO_ARG_SET_STRING (arg, text); + } else { + BONOBO_ARG_SET_STRING (arg, ""); + } + } + break; + case ENTRY_PROPERTY_ID_ALLOW_CONTACT_LISTS: { ESelectNamesCompletion *comp; @@ -315,6 +333,9 @@ impl_SelectNames_get_entry_for_section (PortableServer_Servant servant, bonobo_property_bag_add (property_bag, "destinations", ENTRY_PROPERTY_ID_DESTINATIONS, BONOBO_ARG_STRING, NULL, NULL, BONOBO_PROPERTY_READABLE | BONOBO_PROPERTY_WRITEABLE); + bonobo_property_bag_add (property_bag, "first_email", ENTRY_PROPERTY_ID_FIRST_EMAIL, + BONOBO_ARG_STRING, NULL, NULL, + BONOBO_PROPERTY_READABLE); bonobo_property_bag_add (property_bag, "allow_contact_lists", ENTRY_PROPERTY_ID_ALLOW_CONTACT_LISTS, BONOBO_ARG_BOOLEAN, NULL, NULL, BONOBO_PROPERTY_READABLE | BONOBO_PROPERTY_WRITEABLE); -- cgit v1.2.3