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
This commit is contained in:
Christopher James Lahey
2002-05-09 19:20:26 +00:00
committed by Chris Lahey
parent d325e6d453
commit aedd47862d
2 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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.
2002-05-09 Ettore Perazzoli <ettore@ximian.com>
* gui/component/addressbook-storage.c

View File

@ -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);