diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-08-20 07:32:50 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-08-20 07:32:50 +0800 |
commit | 862d1f25dea4fde774aca9b8e849f22b2e0b9d93 (patch) | |
tree | ed6266c92fbee21440085d1a71e258f2cbb18fb9 /widgets/e-table/e-table-model.c | |
parent | 668e92af992e05e58c714d71943a66a60eb49965 (diff) | |
download | gsoc2013-evolution-862d1f25dea4fde774aca9b8e849f22b2e0b9d93.tar gsoc2013-evolution-862d1f25dea4fde774aca9b8e849f22b2e0b9d93.tar.gz gsoc2013-evolution-862d1f25dea4fde774aca9b8e849f22b2e0b9d93.tar.bz2 gsoc2013-evolution-862d1f25dea4fde774aca9b8e849f22b2e0b9d93.tar.lz gsoc2013-evolution-862d1f25dea4fde774aca9b8e849f22b2e0b9d93.tar.xz gsoc2013-evolution-862d1f25dea4fde774aca9b8e849f22b2e0b9d93.tar.zst gsoc2013-evolution-862d1f25dea4fde774aca9b8e849f22b2e0b9d93.zip |
Made background colors alternate.
2000-08-19 Christopher James Lahey <clahey@helixcode.com>
* e-cell-text.c: Made background colors alternate.
* e-table-click-to-add.c: Made tabbing off the right edge of the
click to add commit the new values.
* e-table-group-container.c, e-table-group-leaf.c,
e-table-group.c, e-table-group.h, e-table-sorted-variable.c,
e-table-subset-variable.c, e-table-subset-variable.h: Added a
decrement method. Made the add and remove methods not
automatically increment and decrement.
* e-table-item.c: Fixed some view vs model issues for both rows
and columns.
* e-table-model.c: Added debugging code. Removed automatic
signalling of changes by the ETableModel set_value_at function
(the model should send these signals itself.)
* e-table.c: Added increment and decrement calls when a row is
removed or added from the source model.
svn path=/trunk/; revision=4881
Diffstat (limited to 'widgets/e-table/e-table-model.c')
-rw-r--r-- | widgets/e-table/e-table-model.c | 49 |
1 files changed, 39 insertions, 10 deletions
diff --git a/widgets/e-table/e-table-model.c b/widgets/e-table/e-table-model.c index f47fb7afb2..d9c0c4fd38 100644 --- a/widgets/e-table/e-table-model.c +++ b/widgets/e-table/e-table-model.c @@ -14,7 +14,11 @@ #define ETM_CLASS(e) ((ETableModelClass *)((GtkObject *)e)->klass) #define PARENT_TYPE gtk_object_get_type () - + +#define d(x) + +d(static gint depth = 0); + static GtkObjectClass *e_table_model_parent_class; @@ -66,15 +70,6 @@ e_table_model_set_value_at (ETableModel *e_table_model, int col, int row, const g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); ETM_CLASS (e_table_model)->set_value_at (e_table_model, col, row, data); - - gtk_signal_emit (GTK_OBJECT (e_table_model), - e_table_model_signals [MODEL_ROW_CHANGED], row); - gtk_signal_emit (GTK_OBJECT (e_table_model), - e_table_model_signals [MODEL_CELL_CHANGED], col, row); - - /* - * Notice that "model_changed" is not emitted - */ } gboolean @@ -264,14 +259,28 @@ e_table_model_get_type (void) return type; } +#if d(!)0 +static void +print_tabs (void) +{ + int i; + for (i = 0; i < depth; i++) + g_print("\t"); +} +#endif + void e_table_model_pre_change (ETableModel *e_table_model) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); + d(print_tabs()); + d(g_print("Emitting pre_change on model 0x%p.\n", e_table_model)); + d(depth++); gtk_signal_emit (GTK_OBJECT (e_table_model), e_table_model_signals [MODEL_PRE_CHANGE]); + d(depth--); } void @@ -280,8 +289,12 @@ e_table_model_changed (ETableModel *e_table_model) g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); + d(print_tabs()); + d(g_print("Emitting model_changed on model 0x%p.\n", e_table_model)); + d(depth++); gtk_signal_emit (GTK_OBJECT (e_table_model), e_table_model_signals [MODEL_CHANGED]); + d(depth--); } void @@ -290,8 +303,12 @@ e_table_model_row_changed (ETableModel *e_table_model, int row) g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); + d(print_tabs()); + d(g_print("Emitting row_changed on model 0x%p, row %d.\n", e_table_model, row)); + d(depth++); gtk_signal_emit (GTK_OBJECT (e_table_model), e_table_model_signals [MODEL_ROW_CHANGED], row); + d(depth--); } void @@ -300,8 +317,12 @@ e_table_model_cell_changed (ETableModel *e_table_model, int col, int row) g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); + d(print_tabs()); + d(g_print("Emitting cell_changed on model 0x%p, row %d, col %d.\n", e_table_model, row, col)); + d(depth++); gtk_signal_emit (GTK_OBJECT (e_table_model), e_table_model_signals [MODEL_CELL_CHANGED], col, row); + d(depth--); } void @@ -310,8 +331,12 @@ e_table_model_row_inserted (ETableModel *e_table_model, int row) g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); + d(print_tabs()); + d(g_print("Emitting row_inserted on model 0x%p, row %d.\n", e_table_model, row)); + d(depth++); gtk_signal_emit (GTK_OBJECT (e_table_model), e_table_model_signals [MODEL_ROW_INSERTED], row); + d(depth--); } void @@ -320,6 +345,10 @@ e_table_model_row_deleted (ETableModel *e_table_model, int row) g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); + d(print_tabs()); + d(g_print("Emitting row_deleted on model 0x%p, row %d.\n", e_table_model, row)); + d(depth++); gtk_signal_emit (GTK_OBJECT (e_table_model), e_table_model_signals [MODEL_ROW_DELETED], row); + d(depth--); } |