aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table
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
parent794f39a5d690344364ab5fb16872fb2950d6cedc (diff)
downloadgsoc2013-evolution-8940a14544be4a714e29478c4bb9b8a0deff41fa.tar
gsoc2013-evolution-8940a14544be4a714e29478c4bb9b8a0deff41fa.tar.gz
gsoc2013-evolution-8940a14544be4a714e29478c4bb9b8a0deff41fa.tar.bz2
gsoc2013-evolution-8940a14544be4a714e29478c4bb9b8a0deff41fa.tar.lz
gsoc2013-evolution-8940a14544be4a714e29478c4bb9b8a0deff41fa.tar.xz
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')
-rw-r--r--widgets/e-table/ChangeLog4
-rw-r--r--widgets/e-table/TODO3
-rw-r--r--widgets/e-table/e-table-sorted.c66
3 files changed, 73 insertions, 0 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index 846582f447..97bfa3144e 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,3 +1,7 @@
+1999-11-19 Miguel de Icaza <miguel@gnu.org>
+
+ * e-table-sorted.c: Finished implementing.
+
1999-11-18 Miguel de Icaza <miguel@gnu.org>
* e-table-model.c (e_table_model_class_init): Add model_changed
diff --git a/widgets/e-table/TODO b/widgets/e-table/TODO
new file mode 100644
index 0000000000..a4bf6483a0
--- /dev/null
+++ b/widgets/e-table/TODO
@@ -0,0 +1,3 @@
+Perhaps implement E-table-sorted in terms of e-table-subset?
+
+Miguel \ No newline at end of file
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);