aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-minicard.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-05-01 01:03:06 +0800
committerChris Lahey <clahey@src.gnome.org>2000-05-01 01:03:06 +0800
commitd87a10196cd82a391f9c2f937ee91dd9f06e5abe (patch)
tree0f39e8ecfe6495db3d32716ce5b20ffd50d9bca2 /addressbook/gui/widgets/e-minicard.c
parentedf876f544a5f2010f117b0b609b557f9d2b1e04 (diff)
downloadgsoc2013-evolution-d87a10196cd82a391f9c2f937ee91dd9f06e5abe.tar
gsoc2013-evolution-d87a10196cd82a391f9c2f937ee91dd9f06e5abe.tar.gz
gsoc2013-evolution-d87a10196cd82a391f9c2f937ee91dd9f06e5abe.tar.bz2
gsoc2013-evolution-d87a10196cd82a391f9c2f937ee91dd9f06e5abe.tar.lz
gsoc2013-evolution-d87a10196cd82a391f9c2f937ee91dd9f06e5abe.tar.xz
gsoc2013-evolution-d87a10196cd82a391f9c2f937ee91dd9f06e5abe.tar.zst
gsoc2013-evolution-d87a10196cd82a391f9c2f937ee91dd9f06e5abe.zip
From addressbook/ChangeLog
2000-04-30 Christopher James Lahey <clahey@helixcode.com> * backend/ebook/e-card.c: Make file as not have the : after it if it's empty. If there's no name, or file_as, fill in these fields with defaults based on full_name or name respectively. * backend/ebook/load-pine-addressbook.c: New file to do import of pine .addressbook files. * backend/pas/pas-backend-file.c: Made empty fields act as the empty string for searches. * contact-editor/e-contact-editor.c, contact-editor/e-contact-editor.h: Made the File As field update properly as you edit the name and company fields. Added the pull down list of File As choices. Made sure that all fields will be set to NULL if they are deleted to the empty string. * gui/minicard/e-minicard.c: Use the File As field instead of the Full Name field for the header. Make identical compares on the File As field do a compare on the uid. From wombat/ChangeLog 2000-04-30 Christopher James Lahey <clahey@helixcode.com> * Makefile.am: Added ename libs to LDADD. svn path=/trunk/; revision=2696
Diffstat (limited to 'addressbook/gui/widgets/e-minicard.c')
-rw-r--r--addressbook/gui/widgets/e-minicard.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 1b6138c87c..6ff1d94aeb 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -449,6 +449,7 @@ remodel( EMinicard *e_minicard )
{
if (e_minicard->card) {
char *fname;
+ char *file_as;
char *url;
char *org;
char *title;
@@ -469,6 +470,7 @@ remodel( EMinicard *e_minicard )
gtk_object_get(GTK_OBJECT(e_minicard->card),
"full_name", &fname,
+ "file_as", &file_as,
"address", &address_list,
"phone", &phone_list,
"email", &email_list,
@@ -478,17 +480,19 @@ remodel( EMinicard *e_minicard )
"role", &role,
NULL);
- if (fname) {
- add_field(e_minicard, "Name:", fname);
- if (e_minicard->header_text)
- gnome_canvas_item_set(e_minicard->header_text,
- "text", fname,
+ if (e_minicard->header_text) {
+ if (file_as)
+ gnome_canvas_item_set(e_minicard->header_text,
+ "text", file_as,
NULL);
- } else
- if (e_minicard->header_text)
+ else
gnome_canvas_item_set(e_minicard->header_text,
"text", "",
NULL);
+ }
+
+ if (fname)
+ add_field(e_minicard, "Name:", fname);
if (org)
add_field(e_minicard, "Company:", org);
@@ -592,7 +596,7 @@ e_minicard_get_card_id (EMinicard *minicard)
if (minicard->card) {
return e_card_get_id(minicard->card);
} else {
- return NULL;
+ return "";
}
}
@@ -605,20 +609,20 @@ e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2)
g_return_val_if_fail(E_IS_MINICARD(minicard2), 0);
if (minicard1->card && minicard2->card) {
- char *fname1, *fname2;
+ char *file_as1, *file_as2;
gtk_object_get(GTK_OBJECT(minicard1->card),
- "full_name", &fname1,
+ "file_as", &file_as1,
NULL);
gtk_object_get(GTK_OBJECT(minicard2->card),
- "full_name", &fname2,
+ "file_as", &file_as2,
NULL);
- if (fname1 && fname2)
- return strcmp(fname1, fname2);
- if (fname1)
+ if (file_as1 && file_as2)
+ return strcmp(file_as1, file_as2);
+ if (file_as1)
return -1;
- if (fname2)
+ if (file_as2)
return 1;
- return 0;
+ return strcmp(e_minicard_get_card_id(minicard1), e_minicard_get_card_id(minicard2));
} else {
return 0;
}