aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-04-28 01:09:20 +0800
committerChris Lahey <clahey@src.gnome.org>2000-04-28 01:09:20 +0800
commit465efaf4dd120b2b43ae3e593bc11c8364f36ec1 (patch)
treed61471431b079ed97dcc88db38afb65789a31d50 /addressbook
parent5ad0f6610fbaa0c3a3d72296815fe568864b07bd (diff)
downloadgsoc2013-evolution-465efaf4dd120b2b43ae3e593bc11c8364f36ec1.tar
gsoc2013-evolution-465efaf4dd120b2b43ae3e593bc11c8364f36ec1.tar.gz
gsoc2013-evolution-465efaf4dd120b2b43ae3e593bc11c8364f36ec1.tar.bz2
gsoc2013-evolution-465efaf4dd120b2b43ae3e593bc11c8364f36ec1.tar.lz
gsoc2013-evolution-465efaf4dd120b2b43ae3e593bc11c8364f36ec1.tar.xz
gsoc2013-evolution-465efaf4dd120b2b43ae3e593bc11c8364f36ec1.tar.zst
gsoc2013-evolution-465efaf4dd120b2b43ae3e593bc11c8364f36ec1.zip
Added addressbook/ename/Makefile.
2000-04-27 Christopher James Lahey <clahey@helixcode.com> * configure.in: Added addressbook/ename/Makefile. From addressbook/ChangeLog: 2000-04-27 Christopher James Lahey <clahey@helixcode.com> * backend/ebook/e-card.c, backend/ebook/e-card.h: Added file as, office, manager, assistant, spouse, and anniversary fields. These all use "X-EVOLUTION-" fields in the VCards. * backend/pas/pas-backend-file.c: Added all the new fields (except anniversary) to the list of fields. * contact-editor/contact-editor.glade, contact-editor/e-contact-editor-strings.h: Fixed some misnamed fields and fixed the placement of the comments field. * contact-editor/e-contact-editor.c: Made the newly added fields display properly. * Makefile.am: Added ename. * ename/e-name-western.h, ename/test-ename-western-gtk.c, ename/test-ename-western.c: Fixed up some #includes. * ename/.cvsignore: Added .cvsignore. svn path=/trunk/; revision=2658
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog23
-rw-r--r--addressbook/Makefile.am2
-rw-r--r--addressbook/backend/ebook/e-card.c233
-rw-r--r--addressbook/backend/ebook/e-card.h8
-rw-r--r--addressbook/backend/pas/pas-backend-file.c5
-rw-r--r--addressbook/contact-editor/contact-editor.glade249
-rw-r--r--addressbook/contact-editor/e-contact-editor-strings.h2
-rw-r--r--addressbook/contact-editor/e-contact-editor.c118
-rw-r--r--addressbook/ename/.cvsignore8
-rw-r--r--addressbook/ename/e-name-western.h2
-rw-r--r--addressbook/ename/test-ename-western-gtk.c2
-rw-r--r--addressbook/ename/test-ename-western.c2
-rw-r--r--addressbook/gui/contact-editor/contact-editor.glade249
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-strings.h2
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c118
15 files changed, 735 insertions, 288 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 859932ff81..9d84cc1100 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,26 @@
+2000-04-27 Christopher James Lahey <clahey@helixcode.com>
+
+ * backend/ebook/e-card.c, backend/ebook/e-card.h: Added file as,
+ office, manager, assistant, spouse, and anniversary fields. These
+ all use "X-EVOLUTION-" fields in the VCards.
+
+ * backend/pas/pas-backend-file.c: Added all the new fields (except
+ anniversary) to the list of fields.
+
+ * contact-editor/contact-editor.glade,
+ contact-editor/e-contact-editor-strings.h: Fixed some misnamed
+ fields and fixed the placement of the comments field.
+
+ * contact-editor/e-contact-editor.c: Made the newly added fields
+ display properly.
+
+ * Makefile.am: Added ename.
+
+ * ename/e-name-western.h, ename/test-ename-western-gtk.c,
+ ename/test-ename-western.c: Fixed up some #includes.
+
+ * ename/.cvsignore: Added .cvsignore.
+
2000-04-26 Christopher James Lahey <clahey@helixcode.com>
* backend/ebook/e-card-types.h, backend/ebook/e-card.c,
diff --git a/addressbook/Makefile.am b/addressbook/Makefile.am
index 22f0922618..d3201e1741 100644
--- a/addressbook/Makefile.am
+++ b/addressbook/Makefile.am
@@ -1,2 +1,2 @@
SUBDIRS = \
- backend contact-editor gui printing
+ backend ename contact-editor gui printing
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c
index 8c7139da79..1b27ed164e 100644
--- a/addressbook/backend/ebook/e-card.c
+++ b/addressbook/backend/ebook/e-card.c
@@ -25,6 +25,7 @@
/* Object argument IDs */
enum {
ARG_0,
+ ARG_FILE_AS,
ARG_FULL_NAME,
ARG_NAME,
ARG_ADDRESS,
@@ -35,9 +36,14 @@ enum {
ARG_URL,
ARG_ORG,
ARG_ORG_UNIT,
+ ARG_OFFICE,
ARG_TITLE,
ARG_ROLE,
+ ARG_MANAGER,
+ ARG_ASSISTANT,
ARG_NICKNAME,
+ ARG_SPOUSE,
+ ARG_ANNIVERSARY,
ARG_FBURL,
ARG_NOTE,
ARG_ID
@@ -62,6 +68,7 @@ static ECardDate e_card_date_from_string (char *str);
static void parse_bday(ECard *card, VObject *object);
static void parse_full_name(ECard *card, VObject *object);
+static void parse_file_as(ECard *card, VObject *object);
static void parse_name(ECard *card, VObject *object);
static void parse_email(ECard *card, VObject *object);
static void parse_phone(ECard *card, VObject *object);
@@ -69,9 +76,14 @@ static void parse_address(ECard *card, VObject *object);
static void parse_address_label(ECard *card, VObject *object);
static void parse_url(ECard *card, VObject *object);
static void parse_org(ECard *card, VObject *object);
+static void parse_office(ECard *card, VObject *object);
static void parse_title(ECard *card, VObject *object);
static void parse_role(ECard *card, VObject *object);
+static void parse_manager(ECard *card, VObject *object);
+static void parse_assistant(ECard *card, VObject *object);
static void parse_nickname(ECard *card, VObject *object);
+static void parse_spouse(ECard *card, VObject *object);
+static void parse_anniversary(ECard *card, VObject *object);
static void parse_fburl(ECard *card, VObject *object);
static void parse_note(ECard *card, VObject *object);
static void parse_id(ECard *card, VObject *object);
@@ -88,21 +100,27 @@ struct {
ParsePropertyFunc function;
} attribute_jump_array[] =
{
- { VCFullNameProp, parse_full_name },
- { VCNameProp, parse_name },
- { VCBirthDateProp, parse_bday },
- { VCEmailAddressProp, parse_email },
- { VCTelephoneProp, parse_phone },
- { VCAdrProp, parse_address },
- { VCDeliveryLabelProp, parse_address_label },
- { VCURLProp, parse_url },
- { VCOrgProp, parse_org },
- { VCTitleProp, parse_title },
- { VCBusinessRoleProp, parse_role },
- { "NICKNAME", parse_nickname },
- { "FBURL", parse_fburl },
- { VCNoteProp, parse_note },
- { VCUniqueStringProp, parse_id }
+ { VCFullNameProp, parse_full_name },
+ { "X-EVOLUTION-FILE-AS", parse_file_as },
+ { VCNameProp, parse_name },
+ { VCBirthDateProp, parse_bday },
+ { VCEmailAddressProp, parse_email },
+ { VCTelephoneProp, parse_phone },
+ { VCAdrProp, parse_address },
+ { VCDeliveryLabelProp, parse_address_label },
+ { VCURLProp, parse_url },
+ { VCOrgProp, parse_org },
+ { "X-EVOLUTION-OFFICE", parse_office },
+ { VCTitleProp, parse_title },
+ { VCBusinessRoleProp, parse_role },
+ { "X-EVOLUTION-MANAGER", parse_manager },
+ { "X-EVOLUTION-ASSISTANT", parse_assistant },
+ { "NICKNAME", parse_nickname },
+ { "X-EVOLUTION-SPOUSE", parse_spouse },
+ { "X-EVOLUTION-ANNIVERSARY", parse_anniversary },
+ { "FBURL", parse_fburl },
+ { VCNoteProp, parse_note },
+ { VCUniqueStringProp, parse_id }
};
/**
@@ -209,6 +227,9 @@ char
vobj = newVObject (VCCardProp);
+ if ( card->file_as )
+ addPropValue(vobj, "X-EVOLUTION-FILE-AS", card->file_as);
+
if ( card->fname )
addPropValue(vobj, VCFullNameProp, card->fname);
@@ -316,6 +337,9 @@ char
if (card->org_unit)
addPropValue(orgprop, VCOrgUnitProp, card->org_unit);
}
+
+ if (card->office)
+ addPropValue(vobj, "X-EVOLUTION-OFFICE", card->office);
if (card->title)
addPropValue(vobj, VCTitleProp, card->title);
@@ -323,8 +347,29 @@ char
if (card->role)
addPropValue(vobj, VCBusinessRoleProp, card->role);
+ if (card->manager)
+ addPropValue(vobj, "X-EVOLUTION-MANAGER", card->manager);
+
+ if (card->assistant)
+ addPropValue(vobj, "X-EVOLUTION-ASSISTANT", card->assistant);
+
if (card->nickname)
addPropValue(vobj, "NICKNAME", card->nickname);
+
+ if (card->spouse)
+ addPropValue(vobj, "X-EVOLUTION-SPOUSE", card->spouse);
+
+ if ( card->anniversary ) {
+ ECardDate date;
+ char *value;
+ date = *card->anniversary;
+ date.year = MIN(date.year, 9999);
+ date.month = MIN(date.month, 12);
+ date.day = MIN(date.day, 31);
+ value = g_strdup_printf("%04d-%02d-%02d", date.year, date.month, date.day);
+ addPropValue(vobj, "X-EVOLUTION-ANNIVERSARY", value);
+ g_free(value);
+ }
if (card->fburl)
addPropValue(vobj, "FBURL", card->fburl);
@@ -355,19 +400,6 @@ char
}
}
- if (crd->dellabel.l) {
- GList *node;
-
- for (node = crd->dellabel.l; node; node = node->next) {
- CardDelLabel *dellabel = (CardDelLabel *) node->data;
-
- vprop = add_strProp (vobj, VCDeliveryLabelProp,
- dellabel->data);
- add_AddrType (vprop, dellabel->type);
- add_CardProperty (vprop, &dellabel->prop);
- }
- }
-
add_CardStrProperty (vobj, VCMailerProp, &crd->mailer);
if (crd->timezn.prop.used) {
@@ -388,8 +420,6 @@ char
add_CardProperty (vprop, &crd->geopos.prop);
}
- add_CardStrProperty (vobj, VCBusinessRoleProp, &crd->role);
-
if (crd->logo.prop.used) {
vprop = addPropSizedValue (vobj, VCLogoProp,
crd->logo.data, crd->logo.size);
@@ -400,16 +430,6 @@ char
if (crd->agent)
addVObjectProp (vobj, card_convert_to_vobject (crd->agent));
- if (crd->org.prop.used) {
- vprop = addProp (vobj, VCOrgProp);
- add_strProp (vprop, VCOrgNameProp, crd->org.name);
- add_strProp (vprop, VCOrgUnitProp, crd->org.unit1);
- add_strProp (vprop, VCOrgUnit2Prop, crd->org.unit2);
- add_strProp (vprop, VCOrgUnit3Prop, crd->org.unit3);
- add_strProp (vprop, VCOrgUnit4Prop, crd->org.unit4);
- add_CardProperty (vprop, &crd->org.prop);
- }
-
add_CardStrProperty (vobj, VCCategoriesProp, &crd->categories);
add_CardStrProperty (vobj, VCCommentProp, &crd->comment);
@@ -438,6 +458,14 @@ char
}
static void
+parse_file_as(ECard *card, VObject *vobj)
+{
+ if ( card->file_as )
+ g_free(card->file_as);
+ assign_string(vobj, &(card->file_as));
+}
+
+static void
parse_name(ECard *card, VObject *vobj)
{
if ( card->name ) {
@@ -569,6 +597,14 @@ parse_org(ECard *card, VObject *vobj)
}
static void
+parse_office(ECard *card, VObject *vobj)
+{
+ if ( card->office )
+ g_free(card->office);
+ assign_string(vobj, &(card->office));
+}
+
+static void
parse_title(ECard *card, VObject *vobj)
{
if ( card->title )
@@ -585,6 +621,22 @@ parse_role(ECard *card, VObject *vobj)
}
static void
+parse_manager(ECard *card, VObject *vobj)
+{
+ if ( card->manager )
+ g_free(card->manager);
+ assign_string(vobj, &(card->manager));
+}
+
+static void
+parse_assistant(ECard *card, VObject *vobj)
+{
+ if ( card->assistant )
+ g_free(card->assistant);
+ assign_string(vobj, &(card->assistant));
+}
+
+static void
parse_nickname(ECard *card, VObject *vobj)
{
if (card->nickname)
@@ -593,6 +645,27 @@ parse_nickname(ECard *card, VObject *vobj)
}
static void
+parse_spouse(ECard *card, VObject *vobj)
+{
+ if ( card->spouse )
+ g_free(card->spouse);
+ assign_string(vobj, &(card->spouse));
+}
+
+static void
+parse_anniversary(ECard *card, VObject *vobj)
+{
+ if ( vObjectValueType (vobj) ) {
+ char *str = fakeCString (vObjectUStringZValue (vobj));
+ if (card->anniversary)
+ g_free(card->anniversary);
+ card->anniversary = g_new(ECardDate, 1);
+ *(card->anniversary) = e_card_date_from_string(str);
+ free(str);
+ }
+}
+
+static void
parse_fburl(ECard *card, VObject *vobj)
{
if (card->fburl)
@@ -648,6 +721,8 @@ e_card_class_init (ECardClass *klass)
g_hash_table_insert(klass->attribute_jump_table, attribute_jump_array[i].key, attribute_jump_array[i].function);
}
+ gtk_object_add_arg_type ("ECard::file_as",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_FILE_AS);
gtk_object_add_arg_type ("ECard::full_name",
GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_FULL_NAME);
gtk_object_add_arg_type ("ECard::name",
@@ -668,12 +743,22 @@ e_card_class_init (ECardClass *klass)
GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ORG);
gtk_object_add_arg_type ("ECard::org_unit",
GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ORG_UNIT);
+ gtk_object_add_arg_type ("ECard::office",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_OFFICE);
gtk_object_add_arg_type ("ECard::title",
GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_TITLE);
gtk_object_add_arg_type ("ECard::role",
GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ROLE);
+ gtk_object_add_arg_type ("ECard::manager",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_MANAGER);
+ gtk_object_add_arg_type ("ECard::assistant",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ASSISTANT);
gtk_object_add_arg_type ("ECard::nickname",
GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_NICKNAME);
+ gtk_object_add_arg_type ("ECard::spouse",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_SPOUSE);
+ gtk_object_add_arg_type ("ECard::anniversary",
+ GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_ANNIVERSARY);
gtk_object_add_arg_type ("ECard::fburl",
GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_FBURL);
gtk_object_add_arg_type ("ECard::note",
@@ -781,6 +866,8 @@ e_card_destroy (GtkObject *object)
ECard *card = E_CARD(object);
if ( card->id )
g_free(card->id);
+ if (card->file_as)
+ g_free(card->file_as);
if ( card->fname )
g_free(card->fname);
if ( card->name )
@@ -794,12 +881,22 @@ e_card_destroy (GtkObject *object)
g_free(card->org);
if (card->org_unit)
g_free(card->org_unit);
+ if (card->office)
+ g_free(card->office);
if (card->title)
g_free(card->title);
if (card->role)
g_free(card->role);
+ if (card->manager)
+ g_free(card->manager);
+ if (card->assistant)
+ g_free(card->assistant);
if (card->nickname)
g_free(card->nickname);
+ if (card->spouse)
+ g_free(card->spouse);
+ if (card->anniversary)
+ g_free(card->anniversary);
if (card->fburl)
g_free(card->fburl);
if (card->note)
@@ -825,6 +922,11 @@ e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
card = E_CARD (object);
switch (arg_id) {
+ case ARG_FILE_AS:
+ if (card->file_as)
+ g_free(card->file_as);
+ card->file_as = g_strdup(GTK_VALUE_STRING(*arg));
+ break;
case ARG_FULL_NAME:
if ( card->fname )
g_free(card->fname);
@@ -855,6 +957,11 @@ e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
g_free(card->org_unit);
card->org_unit = g_strdup(GTK_VALUE_STRING(*arg));
break;
+ case ARG_OFFICE:
+ if (card->office)
+ g_free(card->office);
+ card->office = g_strdup(GTK_VALUE_STRING(*arg));
+ break;
case ARG_TITLE:
if ( card->title )
g_free(card->title);
@@ -865,11 +972,31 @@ e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
g_free(card->role);
card->role = g_strdup(GTK_VALUE_STRING(*arg));
break;
+ case ARG_MANAGER:
+ if (card->manager)
+ g_free(card->manager);
+ card->manager = g_strdup(GTK_VALUE_STRING(*arg));
+ break;
+ case ARG_ASSISTANT:
+ if (card->assistant)
+ g_free(card->assistant);
+ card->assistant = g_strdup(GTK_VALUE_STRING(*arg));
+ break;
case ARG_NICKNAME:
if (card->nickname)
g_free(card->nickname);
card->nickname = g_strdup(GTK_VALUE_STRING(*arg));
break;
+ case ARG_SPOUSE:
+ if (card->spouse)
+ g_free(card->spouse);
+ card->spouse = g_strdup(GTK_VALUE_STRING(*arg));
+ break;
+ case ARG_ANNIVERSARY:
+ if ( card->anniversary )
+ g_free(card->anniversary);
+ card->anniversary = GTK_VALUE_POINTER(*arg);
+ break;
case ARG_FBURL:
if (card->fburl)
g_free(card->fburl);
@@ -899,6 +1026,9 @@ e_card_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
card = E_CARD (object);
switch (arg_id) {
+ case ARG_FILE_AS:
+ GTK_VALUE_STRING (*arg) = card->file_as;
+ break;
case ARG_FULL_NAME:
GTK_VALUE_STRING (*arg) = card->fname;
break;
@@ -945,15 +1075,30 @@ e_card_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
case ARG_ORG_UNIT:
GTK_VALUE_STRING(*arg) = card->org_unit;
break;
+ case ARG_OFFICE:
+ GTK_VALUE_STRING(*arg) = card->office;
+ break;
case ARG_TITLE:
GTK_VALUE_STRING(*arg) = card->title;
break;
case ARG_ROLE:
GTK_VALUE_STRING(*arg) = card->role;
break;
+ case ARG_MANAGER:
+ GTK_VALUE_STRING(*arg) = card->manager;
+ break;
+ case ARG_ASSISTANT:
+ GTK_VALUE_STRING(*arg) = card->assistant;
+ break;
case ARG_NICKNAME:
GTK_VALUE_STRING(*arg) = card->nickname;
break;
+ case ARG_SPOUSE:
+ GTK_VALUE_STRING(*arg) = card->spouse;
+ break;
+ case ARG_ANNIVERSARY:
+ GTK_VALUE_POINTER(*arg) = card->anniversary;
+ break;
case ARG_FBURL:
GTK_VALUE_STRING(*arg) = card->fburl;
break;
@@ -977,7 +1122,8 @@ static void
e_card_init (ECard *card)
{
card->id = g_strdup("");
-
+
+ card->file_as = NULL;
card->fname = NULL;
card->name = NULL;
card->bday = NULL;
@@ -988,9 +1134,14 @@ e_card_init (ECard *card)
card->url = NULL;
card->org = NULL;
card->org_unit = NULL;
+ card->office = NULL;
card->title = NULL;
card->role = NULL;
+ card->manager = NULL;
+ card->assistant = NULL;
card->nickname = NULL;
+ card->spouse = NULL;
+ card->anniversary = NULL;
card->fburl = NULL;
card->note = NULL;
#if 0
diff --git a/addressbook/backend/ebook/e-card.h b/addressbook/backend/ebook/e-card.h
index 774c327371..1c48376dca 100644
--- a/addressbook/backend/ebook/e-card.h
+++ b/addressbook/backend/ebook/e-card.h
@@ -31,6 +31,7 @@ struct _ECard {
GtkObject object;
char *id;
+ char *file_as; /* The File As field. */
char *fname; /* The full name. */
ECardName *name; /* The structured name. */
ECardList *address; /* Delivery addresses (ECardDeliveryAddress *) */
@@ -48,10 +49,17 @@ struct _ECard {
char *org; /* The person's organization. */
char *org_unit; /* The person's organization unit. */
+ char *office; /* The person's office. */
char *role; /* The person's role w/in his org */
char *title; /* The person's title w/in his org */
+ char *manager;
+ char *assistant;
+
char *nickname; /* The person's nickname */
+
+ char *spouse; /* The person's spouse. */
+ ECardDate *anniversary; /* The person's anniversary. */
char *fburl; /* Free Busy URL */
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index a1435f9251..cbe75a5aba 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -231,14 +231,19 @@ static struct prop_info {
} prop_info_table[] = {
/* query prop, ecard prop, type, list compare function */
+ { "file_as", "file_as", PROP_TYPE_NORMAL, NULL },
{ "full_name", "full_name", PROP_TYPE_NORMAL, NULL },
{ "url", "url", PROP_TYPE_NORMAL, NULL },
{ "mailer", "mailer", PROP_TYPE_NORMAL, NULL },
{ "org", "org", PROP_TYPE_NORMAL, NULL },
{ "org_unit", "org_unit", PROP_TYPE_NORMAL, NULL },
+ { "office", "office", PROP_TYPE_NORMAL, NULL },
{ "title", "title", PROP_TYPE_NORMAL, NULL },
{ "role", "role", PROP_TYPE_NORMAL, NULL },
+ { "manager", "manager", PROP_TYPE_NORMAL, NULL },
+ { "assistant", "assistant", PROP_TYPE_NORMAL, NULL },
{ "nickname", "nickname", PROP_TYPE_NORMAL, NULL },
+ { "spouse", "spouse", PROP_TYPE_NORMAL, NULL },
{ "email", "email", PROP_TYPE_LIST, compare_email },
{ "phone", "phone", PROP_TYPE_LIST, compare_phone },
{ "address", "address", PROP_TYPE_LIST, compare_address },
diff --git a/addressbook/contact-editor/contact-editor.glade b/addressbook/contact-editor/contact-editor.glade
index cd17ffd288..33721520e6 100644
--- a/addressbook/contact-editor/contact-editor.glade
+++ b/addressbook/contact-editor/contact-editor.glade
@@ -429,57 +429,6 @@
</widget>
<widget>
- <class>GtkHBox</class>
- <name>hbox5</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <left_attach>0</left_attach>
- <right_attach>7</right_attach>
- <top_attach>10</top_attach>
- <bottom_attach>11</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkText</class>
- <name>text-comments</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkVScrollbar</class>
- <name>vscrollbar-comments</name>
- <policy>GTK_UPDATE_CONTINUOUS</policy>
- <value>0</value>
- <lower>0</lower>
- <upper>0</upper>
- <step>0</step>
- <page>0</page>
- <page_size>0</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
<class>GtkAlignment</class>
<name>alignment2</name>
<xalign>0</xalign>
@@ -566,38 +515,6 @@
<widget>
<class>GtkAlignment</class>
- <name>alignment4</name>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>6</left_attach>
- <right_attach>7</right_attach>
- <top_attach>6</top_attach>
- <bottom_attach>7</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-address1</name>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
<name>alignment5</name>
<xalign>1</xalign>
<yalign>0.5</yalign>
@@ -693,32 +610,6 @@
</widget>
<widget>
- <class>GtkLabel</class>
- <name>label-address1</name>
- <label>Business</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>5</left_attach>
- <right_attach>6</right_attach>
- <top_attach>6</top_attach>
- <bottom_attach>7</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
<class>GtkHSeparator</class>
<name>hseparator4</name>
<child>
@@ -910,7 +801,7 @@
<widget>
<class>GtkCombo</class>
- <name>combo-fileas</name>
+ <name>combo-file-as</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>True</case_sensitive>
@@ -935,7 +826,7 @@
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
- <name>combo-entry1</name>
+ <name>entry-file-as</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
@@ -964,12 +855,63 @@
</widget>
<widget>
- <class>GtkCheckButton</class>
- <name>checkbutton-htmlmail</name>
- <can_focus>True</can_focus>
- <label>Wants HTML mail</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
+ <class>GtkHBox</class>
+ <name>hbox5</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>8</right_attach>
+ <top_attach>10</top_attach>
+ <bottom_attach>11</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkText</class>
+ <name>text-comments</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text></text>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkVScrollbar</class>
+ <name>vscrollbar-comments</name>
+ <policy>GTK_UPDATE_CONTINUOUS</policy>
+ <value>0</value>
+ <lower>0</lower>
+ <upper>0</upper>
+ <step>0</step>
+ <page>0</page>
+ <page_size>0</page_size>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment10</name>
+ <xalign>0.5</xalign>
+ <yalign>0</yalign>
+ <xscale>1</xscale>
+ <yscale>1</yscale>
<child>
<left_attach>3</left_attach>
<right_attach>4</right_attach>
@@ -984,6 +926,73 @@
<xfill>True</xfill>
<yfill>True</yfill>
</child>
+
+ <widget>
+ <class>GtkCheckButton</class>
+ <name>checkbutton-htmlmail</name>
+ <can_focus>True</can_focus>
+ <label>Wants HTML mail</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment4</name>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>0</yscale>
+ <child>
+ <left_attach>6</left_attach>
+ <right_attach>7</right_attach>
+ <top_attach>6</top_attach>
+ <bottom_attach>7</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button-address1</name>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-address1</name>
+ <label>Business</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>5</left_attach>
+ <right_attach>6</right_attach>
+ <top_attach>6</top_attach>
+ <bottom_attach>7</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
</widget>
</widget>
@@ -1272,7 +1281,7 @@
<widget>
<class>GtkEntry</class>
- <name>entry4</name>
+ <name>entry-spouse</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
@@ -1464,7 +1473,7 @@
<widget>
<class>GtkEntry</class>
- <name>entry13</name>
+ <name>entry-assistant</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
@@ -1488,7 +1497,7 @@
<widget>
<class>GtkEntry</class>
- <name>entry12</name>
+ <name>entry-manager</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
diff --git a/addressbook/contact-editor/e-contact-editor-strings.h b/addressbook/contact-editor/e-contact-editor-strings.h
index 7f0a8a83f1..42be016fbc 100644
--- a/addressbook/contact-editor/e-contact-editor-strings.h
+++ b/addressbook/contact-editor/e-contact-editor-strings.h
@@ -17,8 +17,8 @@ gchar *s = N_("File As:");
gchar *s = N_("Web page address:");
gchar *s = N_("This is the mailing address");
gchar *s = N_("A_ddress...");
-gchar *s = N_("Business");
gchar *s = N_("Wants HTML mail");
+gchar *s = N_("Business");
gchar *s = N_("General");
gchar *s = N_("Department:");
gchar *s = N_("Office:");
diff --git a/addressbook/contact-editor/e-contact-editor.c b/addressbook/contact-editor/e-contact-editor.c
index 91339e9da3..5665e0d217 100644
--- a/addressbook/contact-editor/e-contact-editor.c
+++ b/addressbook/contact-editor/e-contact-editor.c
@@ -1,3 +1,4 @@
+
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* e-contact-editor.c
@@ -781,6 +782,7 @@ fill_in_info(EContactEditor *editor)
{
ECard *card = editor->card;
if (card) {
+ char *file_as;
char *fname;
ECardList *address_list;
ECardList *phone_list;
@@ -788,9 +790,14 @@ fill_in_info(EContactEditor *editor)
char *title;
char *org;
char *org_unit;
+ char *office;
char *url;
char *role;
+ char *manager;
+ char *assistant;
char *nickname;
+ char *spouse;
+ const ECardDate *anniversary;
char *fburl;
char *note;
const ECardPhone *phone;
@@ -803,6 +810,7 @@ fill_in_info(EContactEditor *editor)
ECardIterator *iterator;
gtk_object_get(GTK_OBJECT(card),
+ "file_as", &file_as,
"full_name", &fname,
"address_label", &address_list,
"phone", &phone_list,
@@ -810,9 +818,14 @@ fill_in_info(EContactEditor *editor)
"url", &url,
"org", &org,
"org_unit", &org_unit,
+ "office", &office,
"title", &title,
"role", &role,
+ "manager", &manager,
+ "assistant", &assistant,
"nickname", &nickname,
+ "spouse", &spouse,
+ "anniversary", &anniversary,
"fburl", &fburl,
"note", &note,
"birth_date", &bday,
@@ -824,6 +837,12 @@ fill_in_info(EContactEditor *editor)
if (fname)
gtk_editable_insert_text(editable, fname, strlen(fname), &position);
+ position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-file-as"));
+ gtk_editable_delete_text(editable, 0, -1);
+ if (file_as)
+ gtk_editable_insert_text(editable, file_as, strlen(file_as), &position);
+
for (iterator = e_card_list_get_iterator(phone_list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) {
int i;
phone = e_card_iterator_get(iterator);
@@ -879,18 +898,54 @@ fill_in_info(EContactEditor *editor)
gtk_editable_insert_text(editable, org_unit, strlen(org_unit), &position);
position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-office"));
+ gtk_editable_delete_text(editable, 0, -1);
+ if (office)
+ gtk_editable_insert_text(editable, office, strlen(office), &position);
+
+ position = 0;
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-jobtitle"));
gtk_editable_delete_text(editable, 0, -1);
if (title)
gtk_editable_insert_text(editable, title, strlen(title), &position);
position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-manager"));
+ gtk_editable_delete_text(editable, 0, -1);
+ if (manager)
+ gtk_editable_insert_text(editable, manager, strlen(manager), &position);
+
+ position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-assistant"));
+ gtk_editable_delete_text(editable, 0, -1);
+ if (assistant)
+ gtk_editable_insert_text(editable, assistant, strlen(assistant), &position);
+
+ position = 0;
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-nickname"));
gtk_editable_delete_text(editable, 0, -1);
if (nickname)
gtk_editable_insert_text(editable, nickname, strlen(nickname), &position);
position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-spouse"));
+ gtk_editable_delete_text(editable, 0, -1);
+ if (spouse)
+ gtk_editable_insert_text(editable, spouse, strlen(spouse), &position);
+
+ if (anniversary) {
+ struct tm time_struct = {0,0,0,0,0,0,0,0,0};
+ time_t time_val;
+ GnomeDateEdit *dateedit;
+ time_struct.tm_mday = anniversary->day;
+ time_struct.tm_mon = anniversary->month - 1;
+ time_struct.tm_year = anniversary->year - 1900;
+ time_val = mktime(&time_struct);
+ dateedit = GNOME_DATE_EDIT(glade_xml_get_widget(editor->gui, "dateedit-anniversary"));
+ gnome_date_edit_set_time(dateedit, time_val);
+ }
+
+ position = 0;
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-fburl"));
gtk_editable_delete_text(editable, 0, -1);
if (fburl)
@@ -928,6 +983,7 @@ extract_info(EContactEditor *editor)
{
ECard *card = editor->card;
if (card) {
+ char *file_as;
char *fname;
ECardList *address_list;
ECardList *phone_list;
@@ -935,9 +991,14 @@ extract_info(EContactEditor *editor)
char *url;
char *org;
char *org_unit;
+ char *office;
char *title;
char *role;
+ char *manager;
+ char *assistant;
char *nickname;
+ char *spouse;
+ ECardDate *anniversary;
char *fburl;
char *note;
const ECardPhone *phone;
@@ -961,6 +1022,15 @@ extract_info(EContactEditor *editor)
NULL);
position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-file-as"));
+ file_as = gtk_editable_get_chars(editable, 0, -1);
+ if (file_as && *file_as)
+ gtk_object_set(GTK_OBJECT(card),
+ "file_as", file_as,
+ NULL);
+ g_free(file_as);
+
+ position = 0;
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-fullname"));
fname = gtk_editable_get_chars(editable, 0, -1);
if (fname && *fname)
@@ -1081,6 +1151,15 @@ extract_info(EContactEditor *editor)
NULL);
g_free(org_unit);
+ position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-office"));
+ office = gtk_editable_get_chars(editable, 0, -1);
+ if (office && *office)
+ gtk_object_set(GTK_OBJECT(card),
+ "office", office,
+ NULL);
+ g_free(office);
+
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-jobtitle"));
title = gtk_editable_get_chars(editable, 0, -1);
if (title && *title)
@@ -1097,6 +1176,24 @@ extract_info(EContactEditor *editor)
NULL);
g_free(role);
+ position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-manager"));
+ manager = gtk_editable_get_chars(editable, 0, -1);
+ if (manager && *manager)
+ gtk_object_set(GTK_OBJECT(card),
+ "manager", manager,
+ NULL);
+ g_free(manager);
+
+ position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-assistant"));
+ assistant = gtk_editable_get_chars(editable, 0, -1);
+ if (assistant && *assistant)
+ gtk_object_set(GTK_OBJECT(card),
+ "assistant", assistant,
+ NULL);
+ g_free(assistant);
+
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-nickname"));
nickname = gtk_editable_get_chars(editable, 0, -1);
if (nickname && *nickname)
@@ -1105,6 +1202,27 @@ extract_info(EContactEditor *editor)
NULL);
g_free(nickname);
+ position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-spouse"));
+ spouse = gtk_editable_get_chars(editable, 0, -1);
+ if (spouse && *spouse)
+ gtk_object_set(GTK_OBJECT(card),
+ "spouse", spouse,
+ NULL);
+ g_free(spouse);
+
+ dateedit = GNOME_DATE_EDIT(glade_xml_get_widget(editor->gui, "dateedit-anniversary"));
+ time_val = gnome_date_edit_get_date(dateedit);
+ gmtime_r(&time_val,
+ &time_struct);
+ anniversary = g_new(ECardDate, 1);
+ anniversary->day = time_struct.tm_mday;
+ anniversary->month = time_struct.tm_mon + 1;
+ anniversary->year = time_struct.tm_year + 1900;
+ gtk_object_set(GTK_OBJECT(card),
+ "anniversary", anniversary,
+ NULL);
+
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-fburl"));
fburl = gtk_editable_get_chars(editable, 0, -1);
if (fburl && *fburl)
diff --git a/addressbook/ename/.cvsignore b/addressbook/ename/.cvsignore
new file mode 100644
index 0000000000..4f8c173841
--- /dev/null
+++ b/addressbook/ename/.cvsignore
@@ -0,0 +1,8 @@
+.deps
+.libs
+Makefile
+Makefile.in
+*.lo
+*.la
+test-ename-western
+test-ename-western-gtk
diff --git a/addressbook/ename/e-name-western.h b/addressbook/ename/e-name-western.h
index 695719b1c0..fa5bac494c 100644
--- a/addressbook/ename/e-name-western.h
+++ b/addressbook/ename/e-name-western.h
@@ -1,8 +1,6 @@
#ifndef __E_NAME_WESTERN_H__
#define __E_NAME_WESTERN_H__
-#include <ename/e-name.h>
-
typedef struct {
/* Public */
diff --git a/addressbook/ename/test-ename-western-gtk.c b/addressbook/ename/test-ename-western-gtk.c
index 15db38ce10..17daf42b30 100644
--- a/addressbook/ename/test-ename-western-gtk.c
+++ b/addressbook/ename/test-ename-western-gtk.c
@@ -1,5 +1,5 @@
#include <gnome.h>
-#include <ename/e-name.h>
+#include <ename/e-name-western.h>
ENameWestern *name;
GtkWidget *full;
diff --git a/addressbook/ename/test-ename-western.c b/addressbook/ename/test-ename-western.c
index 17ff91dbf2..6d3beaf16f 100644
--- a/addressbook/ename/test-ename-western.c
+++ b/addressbook/ename/test-ename-western.c
@@ -1,7 +1,7 @@
#include <gnome.h>
#include <ctype.h>
-#include <ename/e-name.h>
+#include <ename/e-name-western.h>
static void
do_name (char *n)
diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade
index cd17ffd288..33721520e6 100644
--- a/addressbook/gui/contact-editor/contact-editor.glade
+++ b/addressbook/gui/contact-editor/contact-editor.glade
@@ -429,57 +429,6 @@
</widget>
<widget>
- <class>GtkHBox</class>
- <name>hbox5</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <left_attach>0</left_attach>
- <right_attach>7</right_attach>
- <top_attach>10</top_attach>
- <bottom_attach>11</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkText</class>
- <name>text-comments</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkVScrollbar</class>
- <name>vscrollbar-comments</name>
- <policy>GTK_UPDATE_CONTINUOUS</policy>
- <value>0</value>
- <lower>0</lower>
- <upper>0</upper>
- <step>0</step>
- <page>0</page>
- <page_size>0</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
<class>GtkAlignment</class>
<name>alignment2</name>
<xalign>0</xalign>
@@ -566,38 +515,6 @@
<widget>
<class>GtkAlignment</class>
- <name>alignment4</name>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>6</left_attach>
- <right_attach>7</right_attach>
- <top_attach>6</top_attach>
- <bottom_attach>7</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-address1</name>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
<name>alignment5</name>
<xalign>1</xalign>
<yalign>0.5</yalign>
@@ -693,32 +610,6 @@
</widget>
<widget>
- <class>GtkLabel</class>
- <name>label-address1</name>
- <label>Business</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>5</left_attach>
- <right_attach>6</right_attach>
- <top_attach>6</top_attach>
- <bottom_attach>7</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
<class>GtkHSeparator</class>
<name>hseparator4</name>
<child>
@@ -910,7 +801,7 @@
<widget>
<class>GtkCombo</class>
- <name>combo-fileas</name>
+ <name>combo-file-as</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>True</case_sensitive>
@@ -935,7 +826,7 @@
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
- <name>combo-entry1</name>
+ <name>entry-file-as</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
@@ -964,12 +855,63 @@
</widget>
<widget>
- <class>GtkCheckButton</class>
- <name>checkbutton-htmlmail</name>
- <can_focus>True</can_focus>
- <label>Wants HTML mail</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
+ <class>GtkHBox</class>
+ <name>hbox5</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>8</right_attach>
+ <top_attach>10</top_attach>
+ <bottom_attach>11</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkText</class>
+ <name>text-comments</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text></text>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkVScrollbar</class>
+ <name>vscrollbar-comments</name>
+ <policy>GTK_UPDATE_CONTINUOUS</policy>
+ <value>0</value>
+ <lower>0</lower>
+ <upper>0</upper>
+ <step>0</step>
+ <page>0</page>
+ <page_size>0</page_size>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment10</name>
+ <xalign>0.5</xalign>
+ <yalign>0</yalign>
+ <xscale>1</xscale>
+ <yscale>1</yscale>
<child>
<left_attach>3</left_attach>
<right_attach>4</right_attach>
@@ -984,6 +926,73 @@
<xfill>True</xfill>
<yfill>True</yfill>
</child>
+
+ <widget>
+ <class>GtkCheckButton</class>
+ <name>checkbutton-htmlmail</name>
+ <can_focus>True</can_focus>
+ <label>Wants HTML mail</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment4</name>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>0</yscale>
+ <child>
+ <left_attach>6</left_attach>
+ <right_attach>7</right_attach>
+ <top_attach>6</top_attach>
+ <bottom_attach>7</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button-address1</name>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-address1</name>
+ <label>Business</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>5</left_attach>
+ <right_attach>6</right_attach>
+ <top_attach>6</top_attach>
+ <bottom_attach>7</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
</widget>
</widget>
@@ -1272,7 +1281,7 @@
<widget>
<class>GtkEntry</class>
- <name>entry4</name>
+ <name>entry-spouse</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
@@ -1464,7 +1473,7 @@
<widget>
<class>GtkEntry</class>
- <name>entry13</name>
+ <name>entry-assistant</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
@@ -1488,7 +1497,7 @@
<widget>
<class>GtkEntry</class>
- <name>entry12</name>
+ <name>entry-manager</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
diff --git a/addressbook/gui/contact-editor/e-contact-editor-strings.h b/addressbook/gui/contact-editor/e-contact-editor-strings.h
index 7f0a8a83f1..42be016fbc 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-strings.h
+++ b/addressbook/gui/contact-editor/e-contact-editor-strings.h
@@ -17,8 +17,8 @@ gchar *s = N_("File As:");
gchar *s = N_("Web page address:");
gchar *s = N_("This is the mailing address");
gchar *s = N_("A_ddress...");
-gchar *s = N_("Business");
gchar *s = N_("Wants HTML mail");
+gchar *s = N_("Business");
gchar *s = N_("General");
gchar *s = N_("Department:");
gchar *s = N_("Office:");
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 91339e9da3..5665e0d217 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -1,3 +1,4 @@
+
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* e-contact-editor.c
@@ -781,6 +782,7 @@ fill_in_info(EContactEditor *editor)
{
ECard *card = editor->card;
if (card) {
+ char *file_as;
char *fname;
ECardList *address_list;
ECardList *phone_list;
@@ -788,9 +790,14 @@ fill_in_info(EContactEditor *editor)
char *title;
char *org;
char *org_unit;
+ char *office;
char *url;
char *role;
+ char *manager;
+ char *assistant;
char *nickname;
+ char *spouse;
+ const ECardDate *anniversary;
char *fburl;
char *note;
const ECardPhone *phone;
@@ -803,6 +810,7 @@ fill_in_info(EContactEditor *editor)
ECardIterator *iterator;
gtk_object_get(GTK_OBJECT(card),
+ "file_as", &file_as,
"full_name", &fname,
"address_label", &address_list,
"phone", &phone_list,
@@ -810,9 +818,14 @@ fill_in_info(EContactEditor *editor)
"url", &url,
"org", &org,
"org_unit", &org_unit,
+ "office", &office,
"title", &title,
"role", &role,
+ "manager", &manager,
+ "assistant", &assistant,
"nickname", &nickname,
+ "spouse", &spouse,
+ "anniversary", &anniversary,
"fburl", &fburl,
"note", &note,
"birth_date", &bday,
@@ -824,6 +837,12 @@ fill_in_info(EContactEditor *editor)
if (fname)
gtk_editable_insert_text(editable, fname, strlen(fname), &position);
+ position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-file-as"));
+ gtk_editable_delete_text(editable, 0, -1);
+ if (file_as)
+ gtk_editable_insert_text(editable, file_as, strlen(file_as), &position);
+
for (iterator = e_card_list_get_iterator(phone_list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) {
int i;
phone = e_card_iterator_get(iterator);
@@ -879,18 +898,54 @@ fill_in_info(EContactEditor *editor)
gtk_editable_insert_text(editable, org_unit, strlen(org_unit), &position);
position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-office"));
+ gtk_editable_delete_text(editable, 0, -1);
+ if (office)
+ gtk_editable_insert_text(editable, office, strlen(office), &position);
+
+ position = 0;
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-jobtitle"));
gtk_editable_delete_text(editable, 0, -1);
if (title)
gtk_editable_insert_text(editable, title, strlen(title), &position);
position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-manager"));
+ gtk_editable_delete_text(editable, 0, -1);
+ if (manager)
+ gtk_editable_insert_text(editable, manager, strlen(manager), &position);
+
+ position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-assistant"));
+ gtk_editable_delete_text(editable, 0, -1);
+ if (assistant)
+ gtk_editable_insert_text(editable, assistant, strlen(assistant), &position);
+
+ position = 0;
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-nickname"));
gtk_editable_delete_text(editable, 0, -1);
if (nickname)
gtk_editable_insert_text(editable, nickname, strlen(nickname), &position);
position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-spouse"));
+ gtk_editable_delete_text(editable, 0, -1);
+ if (spouse)
+ gtk_editable_insert_text(editable, spouse, strlen(spouse), &position);
+
+ if (anniversary) {
+ struct tm time_struct = {0,0,0,0,0,0,0,0,0};
+ time_t time_val;
+ GnomeDateEdit *dateedit;
+ time_struct.tm_mday = anniversary->day;
+ time_struct.tm_mon = anniversary->month - 1;
+ time_struct.tm_year = anniversary->year - 1900;
+ time_val = mktime(&time_struct);
+ dateedit = GNOME_DATE_EDIT(glade_xml_get_widget(editor->gui, "dateedit-anniversary"));
+ gnome_date_edit_set_time(dateedit, time_val);
+ }
+
+ position = 0;
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-fburl"));
gtk_editable_delete_text(editable, 0, -1);
if (fburl)
@@ -928,6 +983,7 @@ extract_info(EContactEditor *editor)
{
ECard *card = editor->card;
if (card) {
+ char *file_as;
char *fname;
ECardList *address_list;
ECardList *phone_list;
@@ -935,9 +991,14 @@ extract_info(EContactEditor *editor)
char *url;
char *org;
char *org_unit;
+ char *office;
char *title;
char *role;
+ char *manager;
+ char *assistant;
char *nickname;
+ char *spouse;
+ ECardDate *anniversary;
char *fburl;
char *note;
const ECardPhone *phone;
@@ -961,6 +1022,15 @@ extract_info(EContactEditor *editor)
NULL);
position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-file-as"));
+ file_as = gtk_editable_get_chars(editable, 0, -1);
+ if (file_as && *file_as)
+ gtk_object_set(GTK_OBJECT(card),
+ "file_as", file_as,
+ NULL);
+ g_free(file_as);
+
+ position = 0;
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-fullname"));
fname = gtk_editable_get_chars(editable, 0, -1);
if (fname && *fname)
@@ -1081,6 +1151,15 @@ extract_info(EContactEditor *editor)
NULL);
g_free(org_unit);
+ position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-office"));
+ office = gtk_editable_get_chars(editable, 0, -1);
+ if (office && *office)
+ gtk_object_set(GTK_OBJECT(card),
+ "office", office,
+ NULL);
+ g_free(office);
+
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-jobtitle"));
title = gtk_editable_get_chars(editable, 0, -1);
if (title && *title)
@@ -1097,6 +1176,24 @@ extract_info(EContactEditor *editor)
NULL);
g_free(role);
+ position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-manager"));
+ manager = gtk_editable_get_chars(editable, 0, -1);
+ if (manager && *manager)
+ gtk_object_set(GTK_OBJECT(card),
+ "manager", manager,
+ NULL);
+ g_free(manager);
+
+ position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-assistant"));
+ assistant = gtk_editable_get_chars(editable, 0, -1);
+ if (assistant && *assistant)
+ gtk_object_set(GTK_OBJECT(card),
+ "assistant", assistant,
+ NULL);
+ g_free(assistant);
+
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-nickname"));
nickname = gtk_editable_get_chars(editable, 0, -1);
if (nickname && *nickname)
@@ -1105,6 +1202,27 @@ extract_info(EContactEditor *editor)
NULL);
g_free(nickname);
+ position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-spouse"));
+ spouse = gtk_editable_get_chars(editable, 0, -1);
+ if (spouse && *spouse)
+ gtk_object_set(GTK_OBJECT(card),
+ "spouse", spouse,
+ NULL);
+ g_free(spouse);
+
+ dateedit = GNOME_DATE_EDIT(glade_xml_get_widget(editor->gui, "dateedit-anniversary"));
+ time_val = gnome_date_edit_get_date(dateedit);
+ gmtime_r(&time_val,
+ &time_struct);
+ anniversary = g_new(ECardDate, 1);
+ anniversary->day = time_struct.tm_mday;
+ anniversary->month = time_struct.tm_mon + 1;
+ anniversary->year = time_struct.tm_year + 1900;
+ gtk_object_set(GTK_OBJECT(card),
+ "anniversary", anniversary,
+ NULL);
+
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-fburl"));
fburl = gtk_editable_get_chars(editable, 0, -1);
if (fburl && *fburl)