aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table-sorted.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1999-11-19 16:34:47 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-11-19 16:34:47 +0800
commit8940a14544be4a714e29478c4bb9b8a0deff41fa (patch)
tree3b79dfc25c127759251bb572db8a23b438168c0d /widgets/e-table/e-table-sorted.c
parent794f39a5d690344364ab5fb16872fb2950d6cedc (diff)
downloadgsoc2013-evolution-8940a14544be4a714e29478c4bb9b8a0deff41fa.tar.gz
gsoc2013-evolution-8940a14544be4a714e29478c4bb9b8a0deff41fa.tar.zst
gsoc2013-evolution-8940a14544be4a714e29478c4bb9b8a0deff41fa.zip
Finish implementing e-table-sorted -mig
svn path=/trunk/; revision=1421
Diffstat (limited to 'widgets/e-table/e-table-sorted.c')
-rw-r--r--widgets/e-table/e-table-sorted.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/widgets/e-table/e-table-sorted.c b/widgets/e-table/e-table-sorted.c
index d8c5273800..2d53c79e5d 100644
--- a/widgets/e-table/e-table-sorted.c
+++ b/widgets/e-table/e-table-sorted.c
@@ -27,11 +27,77 @@ ets_destroy (GtkObject *object)
GTK_OBJECT_CLASS (ets_parent_class)->destroy (object);
}
+static int
+ets_column_count (ETableModel *etm)
+{
+ ETableSorted *ets = (ETableSorted *)etm;
+
+ return e_table_model_column_count (ets->source);
+}
+
+static const char *
+ets_column_name (ETableModel *etm, int col)
+{
+ ETableSorted *ets = (ETableSorted *)etm;
+
+ return e_table_model_column_name (ets->source, col);
+}
+
+static int
+ets_row_count (ETableModel *etm)
+{
+ ETableSorted *ets = (ETableSorted *)etm;
+
+ return e_table_model_row_count (ets->source);
+}
+
+static void *
+ets_value_at (ETableModel *etm, int col, int row)
+{
+ ETableSorted *ets = (ETableSorted *)etm;
+
+ return e_table_model_value_at (ets->source, col, ets->map_table [row]);
+}
+
+static void
+ets_set_value_at (ETableModel *etm, int col, int row, void *val)
+{
+ ETableSorted *ets = (ETableSorted *)etm;
+
+ return e_table_model_set_value_at (ets->source, col, ets->map_table [row], val);
+}
+
+static gboolean
+ets_is_cell_editable (ETableModel *etm, int col, int row)
+{
+ ETableSorted *ets = (ETableSorted *)etm;
+
+ return e_table_model_is_cell_editable (ets->source, col, ets->map_table [row]);
+}
+
+static int
+ets_row_height (ETableModel *etm, int row)
+{
+ ETableSorted *ets = (ETableSorted *)etm;
+
+ return e_table_model_row_height (ets->source, ets->map_table [row]);
+}
+
static void
ets_class_init (GtkObjectClass *klass)
{
+ ETableModelClass *table_class = (ETableModelClass *) klass;
+
ets_parent_class = gtk_type_class (PARENT_TYPE);
klass->destroy = ets_destroy;
+
+ table_class->column_count = ets_column_count;
+ table_class->column_name = ets_column_name;
+ table_class->row_count = ets_row_count;
+ table_class->value_at = ets_value_at;
+ table_class->set_value_at = ets_set_value_at;
+ table_class->is_cell_editable = ets_is_cell_editable;
+ table_class->row_height = ets_row_height;
}
E_MAKE_TYPE(e_table_sorted, "ETableSorted", ETableSorted, ets_class_init, NULL, PARENT_TYPE);