aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-05-10 03:20:26 +0800
committerChris Lahey <clahey@src.gnome.org>2002-05-10 03:20:26 +0800
commitaedd47862d6d5268cd61bd4f7da7c4e5cc1a2f3b (patch)
treedd0d92140f4e789f5357142f7ab49046e7bcf9db /addressbook/gui
parentd325e6d453f0d8cbf448f9c078a547e06ded10a1 (diff)
downloadgsoc2013-evolution-aedd47862d6d5268cd61bd4f7da7c4e5cc1a2f3b.tar
gsoc2013-evolution-aedd47862d6d5268cd61bd4f7da7c4e5cc1a2f3b.tar.gz
gsoc2013-evolution-aedd47862d6d5268cd61bd4f7da7c4e5cc1a2f3b.tar.bz2
gsoc2013-evolution-aedd47862d6d5268cd61bd4f7da7c4e5cc1a2f3b.tar.lz
gsoc2013-evolution-aedd47862d6d5268cd61bd4f7da7c4e5cc1a2f3b.tar.xz
gsoc2013-evolution-aedd47862d6d5268cd61bd4f7da7c4e5cc1a2f3b.tar.zst
gsoc2013-evolution-aedd47862d6d5268cd61bd4f7da7c4e5cc1a2f3b.zip
Added "first_email" property.
2002-05-09 Christopher James Lahey <clahey@ximian.com> * gui/component/select-names/e-select-names-bonobo.c (entry_get_property_fn): Added "first_email" property. svn path=/trunk/; revision=16734
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.c21
1 files changed, 21 insertions, 0 deletions
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);