aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog55
-rw-r--r--addressbook/backend/ebook/e-card.c35
-rw-r--r--addressbook/contact-editor/e-contact-editor-fullname.c5
-rw-r--r--addressbook/contact-editor/e-contact-editor.c2
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c5
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c2
6 files changed, 64 insertions, 40 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index c8bf71d284..196aacf24c 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,22 @@
+Tue Sep 26 16:28:47 2000 Christopher James Lahey <clahey@helixcode.com>
+
+ * backend/ebook/e-card.c: Make sure that card->name and
+ card->full_name are always valid.
+
+ * contact-editor/e-contact-editor.c: Removed some unused
+ variables.
+
+2000-09-22 Matt Bissiri <bissiri@eecs.umich.edu>
+
+ * contact-editor/e-contact-editor-fullname.c (extract_info): If
+ (editor->name == NULL), store ptr to newly allocated ECardName in
+ editor->name, not just in a stack variable. This fixes a crash
+ which happened when you click "New", then click "Full Name...",
+ then enter name, then click "OK".
+
+ * backend/ebook/e-card.c (e_card_name_to_string): Add
+ g_return_val_if_fail.
+
2000-09-25 Jeffrey Stedfast <fejj@helixcode.com>
* gui/widgets/Makefile.am:
@@ -26,15 +45,15 @@
2000-09-22 Chris Toshok <toshok@helixcode.com>
* backend/pas/pas-backend-ldap.c: lots of changes. flesh out the
- remove/modify/create functions. add another flag for the property
- table, PROP_DN, which makes it easy for us to determine when we
- need to create a new DN for a record when we're modifying. also
- add a ber_func to the table for PROP_TYPE_LIST fields, which fills
- in the list of bvalues that we send to the ldap server. The
- add/modify/delete stuff hasn't been tested yet, and it hopelessly
- complex (yay ldap).
+ remove/modify/create functions. add another flag for the property
+ table, PROP_DN, which makes it easy for us to determine when we
+ need to create a new DN for a record when we're modifying. also
+ add a ber_func to the table for PROP_TYPE_LIST fields, which fills
+ in the list of bvalues that we send to the ldap server. The
+ add/modify/delete stuff hasn't been tested yet, and it hopelessly
+ complex (yay ldap).
(ldap_search_handler): act synchronous when ldap_search responds
- with -1.
+ with -1.
(view_destroy): use pas_book_view_notify_status_message.
(ldap_op_process_current): same
(ldap_op_process): same
@@ -43,25 +62,27 @@
2000-09-22 Chris Toshok <toshok@helixcode.com>
- * backend/ebook/e-card-simple.h: add E_CARD_SIMPLE_FIELD_FAMILY_NAME to the enum.
+ * backend/ebook/e-card-simple.h: add
+ E_CARD_SIMPLE_FIELD_FAMILY_NAME to the enum.
- * backend/ebook/e-card-simple.c (field_data): add E_CARD_SIMPLE_FIELD_FAMILY_NAME.
+ * backend/ebook/e-card-simple.c (field_data): add
+ E_CARD_SIMPLE_FIELD_FAMILY_NAME.
(e_card_simple_get): add getter for FAMILY_NAME.
2000-09-22 Christopher James Lahey <clahey@helixcode.com>
* backend/ebook/e-card.c: Made addresses be quoted printable again
- so that they will encode properly if they have carriage returns in
- them. This is possible now because of a fix in libversit.
+ so that they will encode properly if they have carriage returns in
+ them. This is possible now because of a fix in libversit.
2000-09-22 Christopher James Lahey <clahey@helixcode.com>
* backend/ebook/e-book-view-listener.c,
- backend/ebook/e-book-view-listener.h, backend/ebook/e-book-view.c,
- backend/ebook/e-book-view.h, backend/idl/addressbook.idl,
- backend/pas/pas-book-view.c, backend/pas/pas-book-view.h: Added a
- function to set the status message associated with a given view.
- This is not yet implemented in the gui.
+ backend/ebook/e-book-view-listener.h, backend/ebook/e-book-view.c,
+ backend/ebook/e-book-view.h, backend/idl/addressbook.idl,
+ backend/pas/pas-book-view.c, backend/pas/pas-book-view.h: Added a
+ function to set the status message associated with a given view.
+ This is not yet implemented in the gui.
2000-09-22 Christopher James Lahey <clahey@helixcode.com>
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c
index 528465f439..940bfd84d5 100644
--- a/addressbook/backend/ebook/e-card.c
+++ b/addressbook/backend/ebook/e-card.c
@@ -951,26 +951,24 @@ parse(ECard *card, VObject *vobj)
while(moreIteration (&iterator)) {
parse_attribute(card, nextVObject(&iterator));
}
+ if (!card->fname) {
+ card->fname = g_strdup("");
+ }
if (!card->name) {
- if (card->fname) {
- card->name = e_card_name_from_string(card->fname);
- }
+ card->name = e_card_name_from_string(card->fname);
}
if (!card->file_as) {
- if (card->name) {
- ECardName *name = card->name;
- char *strings[3], **stringptr;
- char *string;
- stringptr = strings;
- if (name->family && *name->family)
- *(stringptr++) = name->family;
- if (name->given && *name->given)
- *(stringptr++) = name->given;
- *stringptr = NULL;
- string = g_strjoinv(", ", strings);
- card->file_as = string;
- } else
- card->file_as = g_strdup("");
+ ECardName *name = card->name;
+ char *strings[3], **stringptr;
+ char *string;
+ stringptr = strings;
+ if (name->family && *name->family)
+ *(stringptr++) = name->family;
+ if (name->given && *name->given)
+ *(stringptr++) = name->given;
+ *stringptr = NULL;
+ string = g_strjoinv(", ", strings);
+ card->file_as = string;
}
}
@@ -1299,6 +1297,9 @@ char *
e_card_name_to_string(const ECardName *name)
{
char *strings[6], **stringptr = strings;
+
+ g_return_val_if_fail (name != NULL, NULL);
+
if (name->prefix && *name->prefix)
*(stringptr++) = name->prefix;
if (name->given && *name->given)
diff --git a/addressbook/contact-editor/e-contact-editor-fullname.c b/addressbook/contact-editor/e-contact-editor-fullname.c
index 79f458aa22..05e8d45702 100644
--- a/addressbook/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/contact-editor/e-contact-editor-fullname.c
@@ -205,8 +205,11 @@ static void
extract_info(EContactEditorFullname *editor)
{
ECardName *name = editor->name;
- if (!name)
+ if (!name) {
name = e_card_name_new();
+ editor->name = name;
+ }
+
name->prefix = extract_field(editor, "entry-title" );
name->given = extract_field(editor, "entry-first" );
name->additional = extract_field(editor, "entry-middle");
diff --git a/addressbook/contact-editor/e-contact-editor.c b/addressbook/contact-editor/e-contact-editor.c
index 42782fc549..b41a5e3ae7 100644
--- a/addressbook/contact-editor/e-contact-editor.c
+++ b/addressbook/contact-editor/e-contact-editor.c
@@ -738,8 +738,6 @@ BonoboUIVerb verbs [] = {
static void
create_ui (EContactEditor *ce)
{
- char *fname;
- BonoboUINode *ui;
BonoboUIComponent *component;
Bonobo_UIContainer container;
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index 79f458aa22..05e8d45702 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -205,8 +205,11 @@ static void
extract_info(EContactEditorFullname *editor)
{
ECardName *name = editor->name;
- if (!name)
+ if (!name) {
name = e_card_name_new();
+ editor->name = name;
+ }
+
name->prefix = extract_field(editor, "entry-title" );
name->given = extract_field(editor, "entry-first" );
name->additional = extract_field(editor, "entry-middle");
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 42782fc549..b41a5e3ae7 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -738,8 +738,6 @@ BonoboUIVerb verbs [] = {
static void
create_ui (EContactEditor *ce)
{
- char *fname;
- BonoboUINode *ui;
BonoboUIComponent *component;
Bonobo_UIContainer container;