diff options
-rw-r--r-- | calendar/ChangeLog | 5 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 10 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.h | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 7cd4719fa2..7592665f36 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,10 @@ 2001-07-27 Federico Mena Quintero <federico@ximian.com> + * gui/gnome-cal.c (gnome_calendar_set_query): Constify and set the + query sexp on the task pad's model as well. + +2001-07-27 Federico Mena Quintero <federico@ximian.com> + * gui/cal-search-bar.[ch]: New files with a derivative of ESearchBar that generates sexps for calendar queries directly. diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 9aaaefb396..7a50df5389 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -208,9 +208,10 @@ gnome_calendar_class_init (GnomeCalendarClass *class) * Sets the query sexp for all the views in a calendar. **/ void -gnome_calendar_set_query (GnomeCalendar *gcal, char *sexp) +gnome_calendar_set_query (GnomeCalendar *gcal, const char *sexp) { GnomeCalendarPrivate *priv; + CalendarModel *model; g_return_if_fail (gcal != NULL); g_return_if_fail (GNOME_IS_CALENDAR (gcal)); @@ -218,6 +219,8 @@ gnome_calendar_set_query (GnomeCalendar *gcal, char *sexp) priv = gcal->priv; + /* Set the query on the main view */ + switch (priv->current_view_type) { case GNOME_CAL_DAY_VIEW: e_day_view_set_query (E_DAY_VIEW (priv->day_view), sexp); @@ -239,6 +242,11 @@ gnome_calendar_set_query (GnomeCalendar *gcal, char *sexp) g_warning ("A penguin bit my hand!"); g_assert_not_reached (); } + + /* Set the query on the task pad */ + + model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)); + calendar_model_set_query (model, sexp); } /* Returns the current time, for the ECalendarItem. */ diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h index 4b0dca84e3..492d6bcfd1 100644 --- a/calendar/gui/gnome-cal.h +++ b/calendar/gui/gnome-cal.h @@ -78,7 +78,7 @@ CalClient *gnome_calendar_get_task_pad_cal_client(GnomeCalendar *gcal); gboolean gnome_calendar_open (GnomeCalendar *gcal, const char *str_uri); -void gnome_calendar_set_query (GnomeCalendar *gcal, char *sexp); +void gnome_calendar_set_query (GnomeCalendar *gcal, const char *sexp); void gnome_calendar_next (GnomeCalendar *gcal); void gnome_calendar_previous (GnomeCalendar *gcal); |