aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/ChangeLog4
-rw-r--r--widgets/TODO3
-rw-r--r--widgets/e-table-sorted.c66
-rw-r--r--widgets/e-table/ChangeLog4
-rw-r--r--widgets/e-table/TODO3
-rw-r--r--widgets/e-table/e-table-sorted.c66
-rw-r--r--widgets/table/e-table-sorted.c66
7 files changed, 212 insertions, 0 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog
index 846582f447..97bfa3144e 100644
--- a/widgets/ChangeLog
+++ b/widgets/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/TODO b/widgets/TODO
new file mode 100644
index 0000000000..a4bf6483a0
--- /dev/null
+++ b/widgets/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-sorted.c b/widgets/e-table-sorted.c
index d8c5273800..2d53c79e5d 100644
--- a/widgets/e-table-sorted.c
+++ b/widgets/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);
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);
diff --git a/widgets/table/e-table-sorted.c b/widgets/table/e-table-sorted.c
index d8c5273800..2d53c79e5d 100644
--- a/widgets/table/e-table-sorted.c
+++ b/widgets/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);