diff options
author | Chenthill Palanisamy <pchenthill@novell.com> | 2010-09-08 22:03:39 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchenthill@novell.com> | 2010-09-08 22:04:31 +0800 |
commit | 4124ba378b3128ee5f0cb85925559f5fb42cff67 (patch) | |
tree | ca11d4786412d86d07c06a2dab855bd68afa7e6d /calendar/gui/gnome-cal.c | |
parent | 86bd41c9c374b8b80ed4924d4cc1c3f6e196731a (diff) | |
download | gsoc2013-evolution-4124ba378b3128ee5f0cb85925559f5fb42cff67.tar.gz gsoc2013-evolution-4124ba378b3128ee5f0cb85925559f5fb42cff67.tar.zst gsoc2013-evolution-4124ba378b3128ee5f0cb85925559f5fb42cff67.zip |
Use the and operator only if there are two conditions
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r-- | calendar/gui/gnome-cal.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 089167e3a5..e05442255f 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1009,11 +1009,18 @@ adjust_e_cal_view_sexp (GnomeCalendar *gcal, const gchar *sexp) start = isodate_from_time_t (start_time); end = isodate_from_time_t (end_time); - new_sexp = g_strdup_printf ("(and (occur-in-time-range? (make-time \"%s\")" - " (make-time \"%s\"))" - " %s)", - start, end, - sexp); + if (sexp) { + new_sexp = g_strdup_printf ("(and (occur-in-time-range? (make-time \"%s\")" + " (make-time \"%s\"))" + " %s)", + start, end, + sexp); + } else { + new_sexp = g_strdup_printf ("(occur-in-time-range? (make-time \"%s\")" + " (make-time \"%s\"))", + start, end); + } + g_free (start); g_free (end); |