aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-07-28 03:53:35 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-07-28 03:53:35 +0800
commit2cd65ea07f54971a789b0058ace767a77170f3a5 (patch)
treef7d228067e9a4b50614ae4a24469b54ad4d9ab8a
parent55dc4bd9020002d8abc210957120802fc5757fcf (diff)
downloadgsoc2013-evolution-2cd65ea07f54971a789b0058ace767a77170f3a5.tar
gsoc2013-evolution-2cd65ea07f54971a789b0058ace767a77170f3a5.tar.gz
gsoc2013-evolution-2cd65ea07f54971a789b0058ace767a77170f3a5.tar.bz2
gsoc2013-evolution-2cd65ea07f54971a789b0058ace767a77170f3a5.tar.lz
gsoc2013-evolution-2cd65ea07f54971a789b0058ace767a77170f3a5.tar.xz
gsoc2013-evolution-2cd65ea07f54971a789b0058ace767a77170f3a5.tar.zst
gsoc2013-evolution-2cd65ea07f54971a789b0058ace767a77170f3a5.zip
Constify and set the query sexp on the task pad's model as well.
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. svn path=/trunk/; revision=11457
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/gnome-cal.c10
-rw-r--r--calendar/gui/gnome-cal.h2
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);