diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1999-11-10 15:31:21 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-11-10 15:31:21 +0800 |
commit | afbee2366ab309647467c17dd9087a42955a977a (patch) | |
tree | 0417022d7e9dfa00922bdb26f044e354f957e711 /widgets/e-table-model.c | |
parent | 9e76b410eda5783fc725b5e1260a30b583fc3395 (diff) | |
download | gsoc2013-evolution-afbee2366ab309647467c17dd9087a42955a977a.tar gsoc2013-evolution-afbee2366ab309647467c17dd9087a42955a977a.tar.gz gsoc2013-evolution-afbee2366ab309647467c17dd9087a42955a977a.tar.bz2 gsoc2013-evolution-afbee2366ab309647467c17dd9087a42955a977a.tar.lz gsoc2013-evolution-afbee2366ab309647467c17dd9087a42955a977a.tar.xz gsoc2013-evolution-afbee2366ab309647467c17dd9087a42955a977a.tar.zst gsoc2013-evolution-afbee2366ab309647467c17dd9087a42955a977a.zip |
Stuff
svn path=/trunk/; revision=1378
Diffstat (limited to 'widgets/e-table-model.c')
-rw-r--r-- | widgets/e-table-model.c | 45 |
1 files changed, 4 insertions, 41 deletions
diff --git a/widgets/e-table-model.c b/widgets/e-table-model.c index 23782e52c9..868664cf08 100644 --- a/widgets/e-table-model.c +++ b/widgets/e-table-model.c @@ -40,7 +40,7 @@ e_table_model_value_at (ETableModel *etable, int col, int row) void e_table_model_set_value_at (ETableModel *etable, int col, int row, void *data) { - return ETM_CLASS (etable)->set_value_at (etable, col, row, data); + return ETM_CLASS (etable)->set_value_at (etable, col, row); } gboolean @@ -55,39 +55,6 @@ e_table_model_row_height (ETableModel *etable, int row) return ETM_CLASS (etable)->row_height (etable, row); } -typedef struct { - ETableModelListenerFn listener; - void *data; -} listener_t; - -void -e_table_model_add_listener (ETableModel *etable, ETableModelListenerFn listener, void *data) -{ - listener_t *lis; - - lis = g_new (listener_t, 1); - lis->listener_t = listener; - lis->data = data; - - etable->listeners = g_list_prepend (etable->listeners, lis); -} - -void -e_table_model_remove_listener (ETableModel *etable, ETableModelListenerFn listener, void *data) -{ - GSList *l; - - for (l = etable->listeners; l; l = l->next){ - listener_t *lis = l->data; - - if (lis->listener == listener && lis->data == data){ - etable->listeners = g_list_remove (etable->listeners, lis); - g_free (lis); - return; - } - } -} - static void e_table_model_destroy (GtkObject *object) { @@ -95,10 +62,6 @@ e_table_model_destroy (GtkObject *object) ETableModel *etable = (ETableModel *) object; - for (l = etable->listeners; l; l = l->next) - g_free (l->data); - g_list_free (etable->listeners); - if (e_table_model_parent_class->destroy) (*e_table_model_parent_class->destroy)(object); } @@ -137,9 +100,9 @@ e_table_model_get_type (void) int e_table_model_height (ETableModel *etable) { - int rows; - int size; - g_return_val_if_fail (etable != NULL); + int rows, size, i; + + g_return_val_if_fail (etable != NULL, 0); rows = e_table_model_row_count (etable); size = 0; |