aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-10-29 22:01:57 +0800
committerChris Lahey <clahey@src.gnome.org>2001-10-29 22:01:57 +0800
commit79672bdb3b4388763cf08367fc64805138edb4b3 (patch)
tree4263cf3fc0e27f04442b246f8166ceb6484ec904 /addressbook/backend
parente7f020e3a2bd293193a73ed349163aec23bd310c (diff)
downloadgsoc2013-evolution-79672bdb3b4388763cf08367fc64805138edb4b3.tar
gsoc2013-evolution-79672bdb3b4388763cf08367fc64805138edb4b3.tar.gz
gsoc2013-evolution-79672bdb3b4388763cf08367fc64805138edb4b3.tar.bz2
gsoc2013-evolution-79672bdb3b4388763cf08367fc64805138edb4b3.tar.lz
gsoc2013-evolution-79672bdb3b4388763cf08367fc64805138edb4b3.tar.xz
gsoc2013-evolution-79672bdb3b4388763cf08367fc64805138edb4b3.tar.zst
gsoc2013-evolution-79672bdb3b4388763cf08367fc64805138edb4b3.zip
Use the actual ECardName in the ECard instead of parsing the full_name
2001-10-29 Christopher James Lahey <clahey@ximian.com> * backend/ebook/e-card-simple.c (file_as_get_style, file_as_set_style): Use the actual ECardName in the ECard instead of parsing the full_name here. svn path=/trunk/; revision=14338
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/ebook/e-card-simple.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/addressbook/backend/ebook/e-card-simple.c b/addressbook/backend/ebook/e-card-simple.c
index c5c9d38c8c..c7b58f275d 100644
--- a/addressbook/backend/ebook/e-card-simple.c
+++ b/addressbook/backend/ebook/e-card-simple.c
@@ -939,19 +939,17 @@ file_as_get_style (ECardSimple *simple)
{
char *filestring = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_FILE_AS);
char *trystring;
- char *full_name = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_FULL_NAME);
char *company = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_ORG);
ECardName *name = NULL;
int i;
int style;
style = 0;
- if (!full_name)
- full_name = g_strdup("");
if (!company)
company = g_strdup("");
if (filestring) {
-
- name = e_card_name_from_string(full_name);
+ gtk_object_get (GTK_OBJECT (simple->card),
+ "name", &name,
+ NULL);
if (!name) {
goto end;
@@ -972,9 +970,7 @@ file_as_get_style (ECardSimple *simple)
end:
g_free(filestring);
- g_free(full_name);
g_free(company);
- e_card_name_unref(name);
return style;
}
@@ -984,23 +980,20 @@ file_as_set_style(ECardSimple *simple, int style)
{
if (style != -1) {
char *string;
- char *full_name = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_FULL_NAME);
char *company = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_ORG);
ECardName *name;
-
- if (!full_name)
- full_name = g_strdup("");
+
if (!company)
company = g_strdup("");
- name = e_card_name_from_string(full_name);
+ gtk_object_get (GTK_OBJECT (simple->card),
+ "name", &name,
+ NULL);
if (name) {
string = name_to_style(name, company, style);
e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_FILE_AS, string);
g_free(string);
}
- g_free(full_name);
g_free(company);
- e_card_name_unref(name);
}
}