aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-config.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-10-03 14:16:51 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-10-03 14:16:51 +0800
commit7a102381acf224110cfe32fcc0905a103268abde (patch)
tree3797369272088bdacc8706e1abff2eca92e1bdfe /calendar/gui/calendar-config.c
parent263e728c125f4312867084d9b85b41caabec6a4f (diff)
downloadgsoc2013-evolution-7a102381acf224110cfe32fcc0905a103268abde.tar.gz
gsoc2013-evolution-7a102381acf224110cfe32fcc0905a103268abde.tar.zst
gsoc2013-evolution-7a102381acf224110cfe32fcc0905a103268abde.zip
fixes #264449.
svn path=/trunk/; revision=30467
Diffstat (limited to 'calendar/gui/calendar-config.c')
-rw-r--r--calendar/gui/calendar-config.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index aa2b565b52..db57821c56 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -1077,11 +1077,13 @@ calendar_config_set_default_reminder_units (CalUnits units)
/**
* calendar_config_get_hide_completed_tasks_sexp:
*
+ * @get_completed: Whether to form subexpression that
+ * gets completed or not completed tasks.
* Returns the subexpression to use to filter out completed tasks according
* to the config settings. The returned sexp should be freed.
**/
char*
-calendar_config_get_hide_completed_tasks_sexp (void)
+calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed)
{
char *sexp = NULL;
@@ -1094,8 +1096,11 @@ calendar_config_get_hide_completed_tasks_sexp (void)
if (value == 0) {
/* If the value is 0, we want to hide completed tasks
- immediately, so we filter out all completed tasks.*/
- sexp = g_strdup ("(not is-completed?)");
+ immediately, so we filter out all complete/incomplete tasks.*/
+ if (!get_completed)
+ sexp = g_strdup ("(not is-completed?)");
+ else
+ sexp = g_strdup ("(is-completed?)");
} else {
char *isodate;
icaltimezone *zone;
@@ -1126,7 +1131,10 @@ calendar_config_get_hide_completed_tasks_sexp (void)
/* Convert the time to an ISO date string, and build
the query sub-expression. */
isodate = isodate_from_time_t (t);
- sexp = g_strdup_printf ("(not (completed-before? (make-time \"%s\")))", isodate);
+ if (!get_completed)
+ sexp = g_strdup_printf ("(not (completed-before? (make-time \"%s\")))", isodate);
+ else
+ sexp = g_strdup_printf ("(completed-before? (make-time \"%s\"))", isodate);
}
}