aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-10-11 17:40:22 +0800
committerChris Lahey <clahey@src.gnome.org>2000-10-11 17:40:22 +0800
commit8d310c47bd10416b7b4eca88b04664d8e903b549 (patch)
treed3968a042c420e93e4d2e715276b51a6cabb06bc /widgets/table/e-table.c
parentabbd11d2aa07bb781026c54d3394eb508c3c279c (diff)
downloadgsoc2013-evolution-8d310c47bd10416b7b4eca88b04664d8e903b549.tar.gz
gsoc2013-evolution-8d310c47bd10416b7b4eca88b04664d8e903b549.tar.zst
gsoc2013-evolution-8d310c47bd10416b7b4eca88b04664d8e903b549.zip
Changed these to use the default cells.
2000-10-11 Christopher James Lahey <clahey@helixcode.com> * tests/test-tree-1.c, tests/test-tree-2.c, tests/test-tree-3.c: Changed these to use the default cells. From gal/e-table/ChangeLog: 2000-10-11 Christopher James Lahey <clahey@helixcode.com> * e-cell-text.c, e-cell-text.h, e-cell-tree.c, e-cell-tree.h: Got rid of the model parameter to e_cell_text_new and e_cell_tree_new as they aren't used. * e-table-extras.c: Added default "integer" compare and default "tree-string", "string", and "checkbox" cells. * e-table.c: Made this use the draw-grid, cursor-mode, and _click-to-add-message fields from the xml. svn path=/trunk/; revision=5841
Diffstat (limited to 'widgets/table/e-table.c')
-rw-r--r--widgets/table/e-table.c47
1 files changed, 3 insertions, 44 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 2e14d0374c..feea12d0e5 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -61,11 +61,8 @@ enum {
enum {
ARG_0,
- ARG_TABLE_DRAW_GRID,
ARG_TABLE_DRAW_FOCUS,
- ARG_CURSOR_MODE,
ARG_LENGTH_THRESHOLD,
- ARG_CLICK_TO_ADD_MESSAGE,
};
static gint et_signals [LAST_SIGNAL] = { 0, };
@@ -759,6 +756,9 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
ete = e_table_extras_new();
e_table->use_click_to_add = specification->click_to_add;
+ e_table->click_to_add_message = g_strdup(specification->click_to_add_message_);
+ e_table->draw_grid = specification->draw_grid;
+ e_table->cursor_mode = specification->cursor_mode;
e_table->full_header = et_spec_to_full_header(e_table, specification, ete);
e_table->model = etm;
@@ -1136,17 +1136,9 @@ et_get_arg (GtkObject *o, GtkArg *arg, guint arg_id)
ETable *etable = E_TABLE (o);
switch (arg_id){
- case ARG_TABLE_DRAW_GRID:
- GTK_VALUE_BOOL (*arg) = etable->draw_grid;
- break;
-
case ARG_TABLE_DRAW_FOCUS:
GTK_VALUE_BOOL (*arg) = etable->draw_focus;
break;
-
- case ARG_CLICK_TO_ADD_MESSAGE:
- GTK_VALUE_STRING (*arg) = g_strdup (etable->click_to_add_message);
- break;
}
}
@@ -1170,15 +1162,6 @@ et_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
}
break;
- case ARG_TABLE_DRAW_GRID:
- etable->draw_grid = GTK_VALUE_BOOL (*arg);
- if (etable->group) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etable->group),
- "drawgrid", GTK_VALUE_BOOL (*arg),
- NULL);
- }
- break;
-
case ARG_TABLE_DRAW_FOCUS:
etable->draw_focus = GTK_VALUE_BOOL (*arg);
if (etable->group) {
@@ -1187,24 +1170,6 @@ et_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
NULL);
}
break;
-
- case ARG_CURSOR_MODE:
- etable->cursor_mode = GTK_VALUE_INT (*arg);
- if (etable->group) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM(etable->group),
- "cursor_mode", GTK_VALUE_INT (*arg),
- NULL);
- }
- break;
- case ARG_CLICK_TO_ADD_MESSAGE:
- if (etable->click_to_add_message)
- g_free(etable->click_to_add_message);
- etable->click_to_add_message = g_strdup(GTK_VALUE_STRING (*arg));
- if (etable->click_to_add)
- gnome_canvas_item_set(etable->click_to_add,
- "message", etable->click_to_add_message,
- NULL);
- break;
}
}
@@ -1989,16 +1954,10 @@ e_table_class_init (GtkObjectClass *object_class)
gtk_marshal_NONE__POINTER_POINTER,
GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
- gtk_object_add_arg_type ("ETable::drawgrid", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_TABLE_DRAW_GRID);
gtk_object_add_arg_type ("ETable::drawfocus", GTK_TYPE_BOOL,
GTK_ARG_READWRITE, ARG_TABLE_DRAW_FOCUS);
- gtk_object_add_arg_type ("ETable::cursor_mode", GTK_TYPE_INT,
- GTK_ARG_WRITABLE, ARG_CURSOR_MODE);
gtk_object_add_arg_type ("ETable::length_threshold", GTK_TYPE_INT,
GTK_ARG_WRITABLE, ARG_LENGTH_THRESHOLD);
- gtk_object_add_arg_type ("ETable::click_to_add_message", GTK_TYPE_STRING,
- GTK_ARG_READWRITE, ARG_CLICK_TO_ADD_MESSAGE);
}
E_MAKE_TYPE(e_table, "ETable", ETable, e_table_class_init, e_table_init, PARENT_TYPE);