diff options
author | Damon Chaplin <damon@ximian.com> | 2001-08-22 03:06:17 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-08-22 03:06:17 +0800 |
commit | c8905eabfcb6120fbf7f4ba67043d1780396dc01 (patch) | |
tree | 2642e85770860b956abd09c6728e1e11cc9517cb /calendar/pcs | |
parent | a70082de9ea4f4558d6494efc5e130250ed99448 (diff) | |
download | gsoc2013-evolution-c8905eabfcb6120fbf7f4ba67043d1780396dc01.tar gsoc2013-evolution-c8905eabfcb6120fbf7f4ba67043d1780396dc01.tar.gz gsoc2013-evolution-c8905eabfcb6120fbf7f4ba67043d1780396dc01.tar.bz2 gsoc2013-evolution-c8905eabfcb6120fbf7f4ba67043d1780396dc01.tar.lz gsoc2013-evolution-c8905eabfcb6120fbf7f4ba67043d1780396dc01.tar.xz gsoc2013-evolution-c8905eabfcb6120fbf7f4ba67043d1780396dc01.tar.zst gsoc2013-evolution-c8905eabfcb6120fbf7f4ba67043d1780396dc01.zip |
added new e-sexp operator. We don't currently use it though.
2001-08-21 Damon Chaplin <damon@ximian.com>
* pcs/query.c (func_is_completed): added new e-sexp operator. We
don't currently use it though.
* gui/dialogs/cal-prefs-dialog.glade: Changed '_Overdue' to 'O_verdue'
since we have an '_Other' notebook tab. Added '_Hide' accel.
* gui/dialogs/cal-prefs-dialog.c: hooked up config options to dialog.
* gui/calendar-config.c: added config options for hiding completed
tasks.
* gui/e-week-view-event-item.c (e_week_view_event_item_draw):
* gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
* gui/e-day-view.c (e_day_view_reshape_long_event): added 2 pixels
extra space between icons and text for long events, and 1 pixel space
between icons in all events.
(e_day_view_realize): changed the background color to match the
EGrayBar in the shell.
svn path=/trunk/; revision=12347
Diffstat (limited to 'calendar/pcs')
-rw-r--r-- | calendar/pcs/query.c | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/calendar/pcs/query.c b/calendar/pcs/query.c index 7e9a712825..ae76ec9795 100644 --- a/calendar/pcs/query.c +++ b/calendar/pcs/query.c @@ -778,6 +778,46 @@ func_has_categories (ESExp *esexp, int argc, ESExpResult **argv, void *data) return result; } +/* (is-completed?) + * + * Returns a boolean indicating whether the component is completed (i.e. has + * a COMPLETED property. This is really only useful for TODO components. + */ +static ESExpResult * +func_is_completed (ESExp *esexp, int argc, ESExpResult **argv, void *data) +{ + Query *query; + QueryPrivate *priv; + CalComponent *comp; + ESExpResult *result; + struct icaltimetype *t; + gboolean complete = FALSE; + + query = QUERY (data); + priv = query->priv; + + g_assert (priv->next_comp != NULL); + comp = priv->next_comp; + + /* Check argument types */ + + if (argc != 0) { + e_sexp_fatal_error (esexp, _("is-completed? expects 0 arguments")); + return NULL; + } + + cal_component_get_completed (comp, &t); + if (t) { + complete = TRUE; + cal_component_free_icaltimetype (t); + } + + result = e_sexp_result_new (esexp, ESEXP_RES_BOOL); + result->value.bool = complete; + + return result; +} + /* Adds a component to our the UIDs hash table and notifies the client */ @@ -895,7 +935,8 @@ static struct { { "get-vtype", func_get_vtype }, { "occur-in-time-range?", func_occur_in_time_range }, { "contains?", func_contains }, - { "has-categories?", func_has_categories } + { "has-categories?", func_has_categories }, + { "is-completed?", func_is_completed } }; /* Initializes a sexp by interning our own symbols */ |