aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-05-05 20:40:55 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-05-05 20:40:55 +0800
commite4e1b710ddcc8b2189ff08ad8e4d91ec4b44fe9a (patch)
tree4cc7fb63b1a9c8a4faeb67e552f56226e0f79e0d /calendar
parentffdf0418892ce8051b35113b05f62047823ba363 (diff)
downloadgsoc2013-evolution-e4e1b710ddcc8b2189ff08ad8e4d91ec4b44fe9a.tar
gsoc2013-evolution-e4e1b710ddcc8b2189ff08ad8e4d91ec4b44fe9a.tar.gz
gsoc2013-evolution-e4e1b710ddcc8b2189ff08ad8e4d91ec4b44fe9a.tar.bz2
gsoc2013-evolution-e4e1b710ddcc8b2189ff08ad8e4d91ec4b44fe9a.tar.lz
gsoc2013-evolution-e4e1b710ddcc8b2189ff08ad8e4d91ec4b44fe9a.tar.xz
gsoc2013-evolution-e4e1b710ddcc8b2189ff08ad8e4d91ec4b44fe9a.tar.zst
gsoc2013-evolution-e4e1b710ddcc8b2189ff08ad8e4d91ec4b44fe9a.zip
Fixes #58025
2004-05-05 JP Rosevear <jpr@ximian.com> Fixes #58025 * gui/gnome-cal.c (set_search_query): kill warning (setup_config): don't set time out here (setup_widgets): set it here (gnome_calendar_destroy): clear the time out * gui/e-tasks.c (search_bar_sexp_changed_cb): kill warning (setup_config): don't set time out here (setup_widgets): set it here and remember the time out id (e_tasks_destroy): clear the time out svn path=/trunk/; revision=25803
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog14
-rw-r--r--calendar/gui/e-tasks.c20
-rw-r--r--calendar/gui/gnome-cal.c17
3 files changed, 32 insertions, 19 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index fd910be7cb..869515a665 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,17 @@
+2004-05-05 JP Rosevear <jpr@ximian.com>
+
+ Fixes #58025
+
+ * gui/gnome-cal.c (set_search_query): kill warning
+ (setup_config): don't set time out here
+ (setup_widgets): set it here
+ (gnome_calendar_destroy): clear the time out
+
+ * gui/e-tasks.c (search_bar_sexp_changed_cb): kill warning
+ (setup_config): don't set time out here
+ (setup_widgets): set it here and remember the time out id
+ (e_tasks_destroy): clear the time out
+
2004-05-05 Larry Ewing <lewing@ximian.com>
* gui/dialogs/calendar-setup.c: make sure that we don't crash if
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 872b6fe3ed..8669bb5c2c 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -75,7 +75,8 @@ struct _ETasksPrivate {
gchar *current_uid;
char *sexp;
-
+ guint update_timeout;
+
/* View instance and the view menus handler */
GalViewInstance *view_instance;
GalViewMenus *view_menus;
@@ -169,9 +170,6 @@ search_bar_sexp_changed_cb (CalSearchBar *cal_search, const char *sexp, gpointer
{
ETasks *tasks;
ETasksPrivate *priv;
- ECalModel *model;
- char *new_sexp = NULL;
- char *real_sexp = NULL;
tasks = E_TASKS (data);
priv = tasks->priv;
@@ -304,7 +302,6 @@ setup_config (ETasks *tasks)
{
ETasksPrivate *priv;
guint not;
- guint timeout_id = 0;
priv = tasks->priv;
@@ -324,10 +321,7 @@ setup_config (ETasks *tasks)
not = calendar_config_add_notification_hide_completed_tasks_value (config_hide_completed_tasks_changed_cb,
tasks);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- /* Timeout check to hide completed items */
- timeout_id = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_view_cb, tasks, NULL);
+ priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
}
#define E_TASKS_TABLE_DEFAULT_STATE \
@@ -382,6 +376,9 @@ setup_widgets (ETasks *tasks)
g_signal_connect (etable, "cursor_change", G_CALLBACK (table_cursor_change_cb), tasks);
g_signal_connect (etable, "selection_change", G_CALLBACK (table_selection_change_cb), tasks);
+ /* Timeout check to hide completed items */
+ priv->update_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_view_cb, tasks, NULL);
+
/* create the task detail */
priv->preview = e_cal_component_preview_new ();
e_cal_component_preview_set_default_timezone (E_CAL_COMPONENT_PREVIEW (priv->preview), calendar_config_get_icaltimezone ());
@@ -532,6 +529,11 @@ e_tasks_destroy (GtkObject *object)
g_free (priv->sexp);
priv->sexp = NULL;
}
+
+ if (priv->update_timeout) {
+ g_source_remove (priv->update_timeout);
+ priv->update_timeout = 0;
+ }
if (priv->tasks_view_config) {
g_object_unref (priv->tasks_view_config);
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 800fa966df..df5002f65e 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -122,7 +122,7 @@ struct _GnomeCalendarPrivate {
GList *dn_queries; /* list of CalQueries */
char *sexp;
char *todo_sexp;
- guint e_cal_view_timeout;
+ guint update_timeout;
/* This is the view currently shown. We use it to keep track of the
positions of the panes. range_selected is TRUE if a range of dates
@@ -708,9 +708,7 @@ static void
set_search_query (GnomeCalendar *gcal, const char *sexp)
{
GnomeCalendarPrivate *priv;
- ECalModel *model;
int i;
- char *new_sexp = NULL;
g_return_if_fail (gcal != NULL);
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
@@ -971,7 +969,6 @@ setup_config (GnomeCalendar *calendar)
{
GnomeCalendarPrivate *priv;
guint not;
- guint timeout_id = 0;
priv = calendar->priv;
@@ -998,9 +995,6 @@ setup_config (GnomeCalendar *calendar)
calendar);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
- /* Timeout check to hide completed items */
- timeout_id = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_todo_view_cb, calendar, NULL);
-
/* Pane positions */
priv->hpane_pos = calendar_config_get_hpane_pos ();
priv->vpane_pos = calendar_config_get_vpane_pos ();
@@ -1094,6 +1088,9 @@ setup_widgets (GnomeCalendar *gcal)
g_signal_connect (etable, "selection_change",
G_CALLBACK (table_selection_change_cb), gcal);
+ /* Timeout check to hide completed items */
+ priv->update_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_todo_view_cb, gcal, NULL);
+
/* The Day View. */
priv->day_view = e_day_view_new ();
e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->day_view), gcal);
@@ -1278,9 +1275,9 @@ gnome_calendar_destroy (GtkObject *object)
priv->todo_sexp = NULL;
}
- if (priv->e_cal_view_timeout) {
- g_source_remove (priv->e_cal_view_timeout);
- priv->e_cal_view_timeout = 0;
+ if (priv->update_timeout) {
+ g_source_remove (priv->update_timeout);
+ priv->update_timeout = 0;
}
if (priv->view_instance) {