aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-addressbook-model.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-04-11 15:50:57 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-11 15:50:57 +0800
commit9b8230a24c15f594069fec206bd93be86a502b9c (patch)
treee70d3f8697b34b48a9f9375cd404eb0ca4880818 /addressbook/gui/widgets/e-addressbook-model.c
parent5c2ab36536714ed22a78d4fa5b45b9bafc58e239 (diff)
downloadgsoc2013-evolution-9b8230a24c15f594069fec206bd93be86a502b9c.tar.gz
gsoc2013-evolution-9b8230a24c15f594069fec206bd93be86a502b9c.tar.zst
gsoc2013-evolution-9b8230a24c15f594069fec206bd93be86a502b9c.zip
Added E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING.
2001-04-11 Christopher James Lahey <clahey@ximian.com> * backend/ebook/e-card-simple.h: Added E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING. * gui/component/addressbook-component.c (accepted_dnd_types): Fixed a warning here. * gui/widgets/e-addressbook-model.c: Modified this to have more columns, but not let them be edited if they're not a simple string. * gui/widgets/e-minicard-view.c (e_minicard_view_init): Fixed a warning and a memory leak here. svn path=/trunk/; revision=9230
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-model.c')
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index abd97c8464..c20161259f 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -8,11 +8,11 @@
*/
#include <config.h>
-#include <gtk/gtksignal.h>
+#include "e-addressbook-model.h"
#include <gnome-xml/tree.h>
#include <gnome-xml/parser.h>
#include <gnome-xml/xmlmemory.h>
-#include "e-addressbook-model.h"
+#include <gnome.h>
#define PARENT_TYPE e_table_model_get_type()
ETableModelClass *parent_class;
@@ -37,7 +37,7 @@ enum {
LAST_SIGNAL
};
-#define COLS (E_CARD_SIMPLE_FIELD_LAST - 5)
+#define COLS (E_CARD_SIMPLE_FIELD_LAST)
static guint e_addressbook_model_signals [LAST_SIGNAL] = {0, };
@@ -142,7 +142,7 @@ addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val)
static gboolean
addressbook_is_cell_editable (ETableModel *etc, int col, int row)
{
- return E_ADDRESSBOOK_MODEL(etc)->editable;
+ return E_ADDRESSBOOK_MODEL(etc)->editable && col < E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING;
}
static void
@@ -156,7 +156,7 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row)
card = e_card_new("");
simple = e_card_simple_new(card);
- for (col = 0; col < COLS; col++) {
+ for (col = 0; col < E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING; col++) {
const void *val = e_table_model_value_at(source, col, row);
e_card_simple_set(simple,
col,