aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog9
-rw-r--r--addressbook/backend/ebook/e-card-simple.c29
-rw-r--r--addressbook/backend/ebook/e-card-simple.h5
3 files changed, 41 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index ba25fe1b55..ab3f9d7ecd 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,12 @@
+2001-09-22 Chris Toshok <toshok@ximian.com>
+
+ * backend/ebook/e-card-simple.c
+ (e_card_simple_get): add getters for the additional name fields.
+ (field_data): move FAMILY_NAME to the end of the list, and add
+ GIVEN_NAME, ADDITIONAL_NAME (middle name), and NAME_SUFFIX.
+
+ * backend/ebook/e-card-simple.h: same.
+
2001-09-21 Christopher James Lahey <clahey@ximian.com>
* gui/component/addressbook.c (print_preview_cb): Hooked up print
diff --git a/addressbook/backend/ebook/e-card-simple.c b/addressbook/backend/ebook/e-card-simple.c
index 4cd558e5e2..1dac48d86d 100644
--- a/addressbook/backend/ebook/e-card-simple.c
+++ b/addressbook/backend/ebook/e-card-simple.c
@@ -57,7 +57,6 @@ static ECardSimpleFieldData field_data[] =
{
{ E_CARD_SIMPLE_FIELD_FILE_AS, "file_as", N_("File As"), "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
{ E_CARD_SIMPLE_FIELD_FULL_NAME, "full_name", N_("Name"), N_("Name"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_FAMILY_NAME, "family_name", N_("Family Name"), N_("Family Name"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL },
{ E_CARD_SIMPLE_FIELD_EMAIL, "email", N_("Email"), N_("Email"), E_CARD_SIMPLE_EMAIL_ID_EMAIL, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL },
{ E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, "primary_phone", N_("Primary"), N_("Prim"), E_CARD_SIMPLE_PHONE_ID_PRIMARY, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
{ E_CARD_SIMPLE_FIELD_PHONE_ASSISTANT, "assistant_phone", N_("Assistant"), N_("Assistant"),E_CARD_SIMPLE_PHONE_ID_ASSISTANT, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
@@ -101,6 +100,10 @@ static ECardSimpleFieldData field_data[] =
{ E_CARD_SIMPLE_FIELD_MAILER, "mailer", "", "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
{ E_CARD_SIMPLE_FIELD_NAME_OR_ORG, "nameororg", "", "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL },
{ E_CARD_SIMPLE_FIELD_CATEGORIES, "categories", N_("Categories"), N_("Categories"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
+ { E_CARD_SIMPLE_FIELD_FAMILY_NAME, "family_name", N_("Family Name"), N_("Family Name"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL },
+ { E_CARD_SIMPLE_FIELD_GIVEN_NAME, "given_name", "Given Name", "Given Name", 0, E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL },
+ { E_CARD_SIMPLE_FIELD_ADDITIONAL_NAME, "additional_name", "Additional Name", "Additional Name", 0, E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL },
+ { E_CARD_SIMPLE_FIELD_NAME_SUFFIX, "name_suffix", "Name Suffix", "Name Suffix", 0, E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL },
};
static int field_data_count = sizeof (field_data) / sizeof (field_data[0]);
@@ -828,6 +831,30 @@ char *e_card_simple_get (ECardSimple *simple,
return g_strdup (name->family);
} else
return NULL;
+ case E_CARD_SIMPLE_FIELD_GIVEN_NAME:
+ if (simple->card) {
+ gtk_object_get (GTK_OBJECT(simple->card),
+ "name", &name,
+ NULL);
+ return g_strdup (name->given);
+ } else
+ return NULL;
+ case E_CARD_SIMPLE_FIELD_ADDITIONAL_NAME:
+ if (simple->card) {
+ gtk_object_get (GTK_OBJECT(simple->card),
+ "name", &name,
+ NULL);
+ return g_strdup (name->additional);
+ } else
+ return NULL;
+ case E_CARD_SIMPLE_FIELD_NAME_SUFFIX:
+ if (simple->card) {
+ gtk_object_get (GTK_OBJECT(simple->card),
+ "name", &name,
+ NULL);
+ return g_strdup (name->suffix);
+ } else
+ return NULL;
default:
return NULL;
}
diff --git a/addressbook/backend/ebook/e-card-simple.h b/addressbook/backend/ebook/e-card-simple.h
index 1af3ecb606..0d353f00da 100644
--- a/addressbook/backend/ebook/e-card-simple.h
+++ b/addressbook/backend/ebook/e-card-simple.h
@@ -78,7 +78,6 @@ enum _ECardSimpleType {
enum _ECardSimpleField {
E_CARD_SIMPLE_FIELD_FILE_AS,
E_CARD_SIMPLE_FIELD_FULL_NAME,
- E_CARD_SIMPLE_FIELD_FAMILY_NAME,
E_CARD_SIMPLE_FIELD_EMAIL,
E_CARD_SIMPLE_FIELD_PHONE_PRIMARY,
E_CARD_SIMPLE_FIELD_PHONE_ASSISTANT,
@@ -123,6 +122,10 @@ enum _ECardSimpleField {
E_CARD_SIMPLE_FIELD_MAILER,
E_CARD_SIMPLE_FIELD_NAME_OR_ORG,
E_CARD_SIMPLE_FIELD_CATEGORIES,
+ E_CARD_SIMPLE_FIELD_FAMILY_NAME,
+ E_CARD_SIMPLE_FIELD_GIVEN_NAME,
+ E_CARD_SIMPLE_FIELD_ADDITIONAL_NAME,
+ E_CARD_SIMPLE_FIELD_NAME_SUFFIX,
E_CARD_SIMPLE_FIELD_LAST
};