From 954405749b2bf50cb17a3410b40aa8d24aec271d Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 28 Mar 2001 23:37:46 +0000 Subject: Use E_CARD_SIMPLE_FIELD_NAME_OR_ORG instead of getting the NAME and then 2001-03-28 Christopher James Lahey * gui/component/select-names/e-select-names-table-model.c (fill_in_info): Use E_CARD_SIMPLE_FIELD_NAME_OR_ORG instead of getting the NAME and then the ORG. That way if we expand NAME_OR_ORG, this will use it. * gui/component/select-names/e-select-names.c (e_addressbook_create_ebook_table, SPEC): Use the correct column in the SPEC. svn path=/trunk/; revision=9000 --- .../gui/component/select-names/e-select-names-table-model.c | 5 +---- addressbook/gui/component/select-names/e-select-names.c | 8 ++++++-- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'addressbook/gui/component/select-names') diff --git a/addressbook/gui/component/select-names/e-select-names-table-model.c b/addressbook/gui/component/select-names/e-select-names-table-model.c index 7b0e27195b..be1f95cc98 100644 --- a/addressbook/gui/component/select-names/e-select-names-table-model.c +++ b/addressbook/gui/component/select-names/e-select-names-table-model.c @@ -120,10 +120,7 @@ fill_in_info (ESelectNamesTableModel *model) if (card) { ECardSimple *simple = e_card_simple_new(card); - model->data[i].name = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_FULL_NAME); - if ((model->data[i].name == 0) || *model->data[i].name == 0) { - model->data[i].name = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_ORG); - } + model->data[i].name = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_NAME_OR_ORG); if (model->data[i].name == 0) model->data[i].name = g_strdup(""); model->data[i].email = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_EMAIL); diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index 8b35349786..bb00fef6e7 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "e-select-names-table-model.h" #include #include @@ -92,7 +93,7 @@ e_select_names_class_init (ESelectNamesClass *klass) } #define SPEC " \ - \ + \ \ \ \ @@ -171,6 +172,7 @@ e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int n GtkWidget *table; char *filename; char *uri; + char *spec; model = e_addressbook_model_new(); gtk_object_set(GTK_OBJECT(model), @@ -186,7 +188,9 @@ e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int n g_free(uri); g_free(filename); - table = e_table_scrolled_new (model, NULL, SPEC, NULL); + spec = g_strdup_printf(SPEC, E_CARD_SIMPLE_FIELD_NAME_OR_ORG); + table = e_table_scrolled_new (model, NULL, spec, NULL); + g_free(spec); gtk_object_set_data(GTK_OBJECT(table), "model", model); return table; -- cgit v1.2.3