aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-05-09 13:34:02 +0800
committerChris Lahey <clahey@src.gnome.org>2000-05-09 13:34:02 +0800
commit32d76b8032a8c42b6fda2ccdded568b8bdea2eeb (patch)
treef2043e2b6e28b5a209525eb472fbe695903de5e1 /addressbook
parentc6de9ace9fe9b4a438583ed143f9b3b99211091d (diff)
downloadgsoc2013-evolution-32d76b8032a8c42b6fda2ccdded568b8bdea2eeb.tar
gsoc2013-evolution-32d76b8032a8c42b6fda2ccdded568b8bdea2eeb.tar.gz
gsoc2013-evolution-32d76b8032a8c42b6fda2ccdded568b8bdea2eeb.tar.bz2
gsoc2013-evolution-32d76b8032a8c42b6fda2ccdded568b8bdea2eeb.tar.lz
gsoc2013-evolution-32d76b8032a8c42b6fda2ccdded568b8bdea2eeb.tar.xz
gsoc2013-evolution-32d76b8032a8c42b6fda2ccdded568b8bdea2eeb.tar.zst
gsoc2013-evolution-32d76b8032a8c42b6fda2ccdded568b8bdea2eeb.zip
Fixed the string duplication problem. Fixed the business/home address
2000-05-09 Christopher James Lahey <clahey@helixcode.com> * backend/ebook/e-card-simple.c: Fixed the string duplication problem. Fixed the business/home address string mix up. * gui/component/addressbook.c: Made the minicard view the default view. svn path=/trunk/; revision=2932
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog8
-rw-r--r--addressbook/backend/ebook/e-card-simple.c21
-rw-r--r--addressbook/gui/component/addressbook.c2
3 files changed, 25 insertions, 6 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 50ac011433..0b4ac69d52 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,11 @@
+2000-05-09 Christopher James Lahey <clahey@helixcode.com>
+
+ * backend/ebook/e-card-simple.c: Fixed the string duplication
+ problem. Fixed the business/home address string mix up.
+
+ * gui/component/addressbook.c: Made the minicard view the default
+ view.
+
2000-05-08 Christopher James Lahey <clahey@helixcode.com>
* backend/ebook/e-card-simple.c: Fixed this up a bit. Syncing
diff --git a/addressbook/backend/ebook/e-card-simple.c b/addressbook/backend/ebook/e-card-simple.c
index e6a043ab9e..14b4719c33 100644
--- a/addressbook/backend/ebook/e-card-simple.c
+++ b/addressbook/backend/ebook/e-card-simple.c
@@ -80,8 +80,8 @@ static ECardSimpleFieldData field_data[] =
{ E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, "", "Business", "Bus", E_CARD_SIMPLE_PHONE_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
{ E_CARD_SIMPLE_FIELD_PHONE_HOME, "", "Home", "Home", E_CARD_SIMPLE_PHONE_ID_HOME, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
{ E_CARD_SIMPLE_FIELD_ORG, "org", "Organization", "Org", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS, "", "Business", "Bus", E_CARD_SIMPLE_ADDRESS_ID_HOME, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS },
- { E_CARD_SIMPLE_FIELD_ADDRESS_HOME, "", "Home", "Home", E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS },
+ { E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS, "", "Business", "Bus", E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS },
+ { E_CARD_SIMPLE_FIELD_ADDRESS_HOME, "", "Home", "Home", E_CARD_SIMPLE_ADDRESS_ID_HOME, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS },
{ E_CARD_SIMPLE_FIELD_PHONE_MOBILE, "", "Mobile", "Mobile", E_CARD_SIMPLE_PHONE_ID_MOBILE, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
{ E_CARD_SIMPLE_FIELD_PHONE_CAR, "", "Car", "Car", E_CARD_SIMPLE_PHONE_ID_CAR, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
{ E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX, "", "Business Fax", "Bus Fax", E_CARD_SIMPLE_PHONE_ID_BUSINESS_FAX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
@@ -634,6 +634,7 @@ fill_in_info(ECardSimple *simple)
const ECardPhone *phone;
const char *email;
const ECardAddrLabel *address;
+ int i;
ECardIterator *iterator;
@@ -642,8 +643,11 @@ fill_in_info(ECardSimple *simple)
"phone", &phone_list,
"email", &email_list,
NULL);
+ for (i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i++) {
+ e_card_phone_free(simple->phone[i]);
+ simple->phone[i] = NULL;
+ }
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);
for (i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i ++) {
if (((phone->flags & phone_correspondences[i]) == phone_correspondences[i]) && (simple->phone[i] == NULL)) {
@@ -654,8 +658,11 @@ fill_in_info(ECardSimple *simple)
}
gtk_object_unref(GTK_OBJECT(iterator));
+ for (i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i++) {
+ g_free(simple->email[i]);
+ simple->email[i] = NULL;
+ }
for (iterator = e_card_list_get_iterator(email_list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) {
- int i;
email = e_card_iterator_get(iterator);
for (i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i ++) {
if ((simple->email[i] == NULL)) {
@@ -666,8 +673,11 @@ fill_in_info(ECardSimple *simple)
}
gtk_object_unref(GTK_OBJECT(iterator));
+ for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) {
+ e_card_address_label_free(simple->address[i]);
+ simple->address[i] = NULL;
+ }
for (iterator = e_card_list_get_iterator(address_list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) {
- int i;
address = e_card_iterator_get(iterator);
for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i ++) {
if (((address->flags & addr_correspondences[i]) == addr_correspondences[i]) && (simple->address[i] == NULL)) {
@@ -790,6 +800,7 @@ e_card_simple_sync_card(ECardSimple *simple)
simple->address[i] = NULL;
}
}
+ fill_in_info(simple);
}
}
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 7794bb50b3..13f936188e 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -781,7 +781,7 @@ addressbook_factory (BonoboGenericFactory *Factory, void *closure)
view->view = NULL;
/* create the initial view */
- change_view_type (view, ADDRESSBOOK_VIEW_TABLE);
+ change_view_type (view, ADDRESSBOOK_VIEW_MINICARD);
gtk_widget_show_all( view->vbox );