aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-03-29 07:37:46 +0800
committerChris Lahey <clahey@src.gnome.org>2001-03-29 07:37:46 +0800
commit954405749b2bf50cb17a3410b40aa8d24aec271d (patch)
treebd3321afb36c488dccfe6ba22347aa5d9e293b48 /addressbook/gui
parenta9819dd335216f7094b0057460e99de026d2ea57 (diff)
downloadgsoc2013-evolution-954405749b2bf50cb17a3410b40aa8d24aec271d.tar
gsoc2013-evolution-954405749b2bf50cb17a3410b40aa8d24aec271d.tar.gz
gsoc2013-evolution-954405749b2bf50cb17a3410b40aa8d24aec271d.tar.bz2
gsoc2013-evolution-954405749b2bf50cb17a3410b40aa8d24aec271d.tar.lz
gsoc2013-evolution-954405749b2bf50cb17a3410b40aa8d24aec271d.tar.xz
gsoc2013-evolution-954405749b2bf50cb17a3410b40aa8d24aec271d.tar.zst
gsoc2013-evolution-954405749b2bf50cb17a3410b40aa8d24aec271d.zip
Use E_CARD_SIMPLE_FIELD_NAME_OR_ORG instead of getting the NAME and then
2001-03-28 Christopher James Lahey <clahey@ximian.com> * 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
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/select-names/e-select-names-table-model.c5
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c8
2 files changed, 7 insertions, 6 deletions
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 <addressbook/gui/widgets/e-addressbook-model.h>
#include <addressbook/gui/component/e-cardlist-model.h>
#include <addressbook/backend/ebook/e-book.h>
+#include <addressbook/backend/ebook/e-card-simple.h>
#include "e-select-names-table-model.h"
#include <shell/evolution-shell-client.h>
#include <addressbook/gui/component/addressbook-component.h>
@@ -92,7 +93,7 @@ e_select_names_class_init (ESelectNamesClass *klass)
}
#define SPEC "<ETableSpecification no-headers=\"true\" cursor-mode=\"line\"> \
- <ETableColumn model_col= \"35\" _title=\"Name\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col= \"%d\" _title=\"Name\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
<ETableState> \
<column source=\"0\"/> \
<grouping> <leaf column=\"0\" ascending=\"true\"/> </grouping> \
@@ -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;