aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-table.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-03-25 23:30:16 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-03-25 23:30:16 +0800
commite29d5a8a7adbc9363d4a054b6ab70ada182ae15d (patch)
tree1d24c0a19929aceb4019abac6d051974851d52ec /calendar/gui/e-calendar-table.c
parente831dbdd6743d61c84966f9f84aa07adac48c320 (diff)
downloadgsoc2013-evolution-e29d5a8a7adbc9363d4a054b6ab70ada182ae15d.tar
gsoc2013-evolution-e29d5a8a7adbc9363d4a054b6ab70ada182ae15d.tar.gz
gsoc2013-evolution-e29d5a8a7adbc9363d4a054b6ab70ada182ae15d.tar.bz2
gsoc2013-evolution-e29d5a8a7adbc9363d4a054b6ab70ada182ae15d.tar.lz
gsoc2013-evolution-e29d5a8a7adbc9363d4a054b6ab70ada182ae15d.tar.xz
gsoc2013-evolution-e29d5a8a7adbc9363d4a054b6ab70ada182ae15d.tar.zst
gsoc2013-evolution-e29d5a8a7adbc9363d4a054b6ab70ada182ae15d.zip
The model_rows_{inserted,deleted} signals changed names; deal with it.
2001-03-25 Federico Mena Quintero <federico@ximian.com> * gui/e-calendar-table.c (e_calendar_table_init): The model_rows_{inserted,deleted} signals changed names; deal with it. (e_calendar_table_on_rows_inserted): Updated for new ETable API. (e_calendar_table_on_rows_deleted): Likewise. * gui/gnome-cal.h (GnomeCalendarOpenMode): Removed unused enum. * gui/gnome-cal.c (gnome_calendar_open): Constify. * gui/calendar-commands.c (calendar_set_uri): Removed function, since it was just calling gnome_calendar_open(). * gui/control-factory.c (set_prop): Replace usage of calendar_set_uri() with gnome_calendar_open(). (load_calendar): Likewise. (calendar_persist_init): Made static. * gui/e-tasks.c: #include "calendar-config.h" (e_tasks_update_all_config_settings): We are configuring a table, not a calendar! Use the appropriate function. svn path=/trunk/; revision=8928
Diffstat (limited to 'calendar/gui/e-calendar-table.c')
-rw-r--r--calendar/gui/e-calendar-table.c63
1 files changed, 37 insertions, 26 deletions
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index 4806d05c21..0c709c92ae 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -84,11 +84,13 @@ static void e_calendar_table_open_task (ECalendarTable *cal_table,
static void e_calendar_table_apply_filter (ECalendarTable *cal_table);
static void e_calendar_table_on_model_changed (ETableModel *model,
ECalendarTable *cal_table);
-static void e_calendar_table_on_row_inserted (ETableModel *model,
- gint row,
+static void e_calendar_table_on_rows_inserted (ETableModel *model,
+ int row,
+ int count,
ECalendarTable *cal_table);
-static void e_calendar_table_on_row_deleted (ETableModel *model,
- gint row,
+static void e_calendar_table_on_rows_deleted (ETableModel *model,
+ int row,
+ int count,
ECalendarTable *cal_table);
@@ -266,11 +268,11 @@ e_calendar_table_init (ECalendarTable *cal_table)
gtk_signal_connect (GTK_OBJECT (cal_table->model), "model_changed",
GTK_SIGNAL_FUNC (e_calendar_table_on_model_changed),
cal_table);
- gtk_signal_connect (GTK_OBJECT (cal_table->model), "model_row_inserted",
- GTK_SIGNAL_FUNC (e_calendar_table_on_row_inserted),
+ gtk_signal_connect (GTK_OBJECT (cal_table->model), "model_rows_inserted",
+ GTK_SIGNAL_FUNC (e_calendar_table_on_rows_inserted),
cal_table);
- gtk_signal_connect (GTK_OBJECT (cal_table->model), "model_row_deleted",
- GTK_SIGNAL_FUNC (e_calendar_table_on_row_deleted),
+ gtk_signal_connect (GTK_OBJECT (cal_table->model), "model_rows_deleted",
+ GTK_SIGNAL_FUNC (e_calendar_table_on_rows_deleted),
cal_table);
/* Create the header columns */
@@ -798,36 +800,45 @@ e_calendar_table_on_model_changed (ETableModel *model,
static void
-e_calendar_table_on_row_inserted (ETableModel *model,
- gint row,
+e_calendar_table_on_rows_inserted (ETableModel *model,
+ int row,
+ int count,
ECalendarTable *cal_table)
{
- ETableSubsetVariable *etssv;
- CalComponent *comp;
- gboolean add_row = FALSE;
+ int i;
- etssv = E_TABLE_SUBSET_VARIABLE (cal_table->subset_model);
+ for (i = 0; i < count; i++) {
+ gboolean add_row;
- if (cal_table->filter_func == NULL) {
- add_row = TRUE;
- } else {
- comp = calendar_model_get_component (cal_table->model, row);
+ add_row = FALSE;
- if ((*cal_table->filter_func) (cal_table, comp,
- cal_table->filter_data))
+ if (cal_table->filter_func) {
+ CalComponent *comp;
+
+ comp = calendar_model_get_component (cal_table->model, row + i);
+ g_assert (comp != NULL);
+
+ add_row = (* cal_table->filter_func) (cal_table, comp,
+ cal_table->filter_data);
+ } else
add_row = TRUE;
- }
- if (add_row) {
- e_table_subset_variable_increment (etssv, row, 1);
- e_table_subset_variable_add (etssv, row);
+ if (add_row) {
+ ETableSubsetVariable *etssv;
+
+ etssv = E_TABLE_SUBSET_VARIABLE (cal_table->subset_model);
+
+ e_table_subset_variable_increment (etssv, row, 1);
+ e_table_subset_variable_add (etssv, row);
+ }
}
}
static void
-e_calendar_table_on_row_deleted (ETableModel *model,
- gint row,
+e_calendar_table_on_rows_deleted (ETableModel *model,
+ int row,
+ int count,
ECalendarTable *cal_table)
{
/* We just reapply the filter since we aren't too bothered about