Bug 227703 - Add option to Hide cancelled tasks
Closes https://bugzilla.gnome.org/show_bug.cgi?id=227703
This commit is contained in:
@ -219,6 +219,11 @@
|
||||
<_summary>Hide task value</_summary>
|
||||
<_description>Number of units for determining when to hide tasks</_description>
|
||||
</key>
|
||||
<key name="hide-cancelled-tasks" type="b">
|
||||
<default>false</default>
|
||||
<_summary>Hide cancelled tasks</_summary>
|
||||
<_description>Whether to hide cancelled tasks in the tasks view</_description>
|
||||
</key>
|
||||
<key name="hpane-position" type="i">
|
||||
<default>400</default>
|
||||
<_summary>Horizontal pane position</_summary>
|
||||
|
||||
@ -271,6 +271,14 @@ calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed)
|
||||
return sexp;
|
||||
}
|
||||
|
||||
gboolean
|
||||
calendar_config_get_hide_cancelled_tasks (void)
|
||||
{
|
||||
calendar_config_init ();
|
||||
|
||||
return g_settings_get_boolean (config, "hide-cancelled-tasks");
|
||||
}
|
||||
|
||||
void
|
||||
calendar_config_set_dir_path (const gchar *path)
|
||||
{
|
||||
|
||||
@ -33,6 +33,9 @@
|
||||
|
||||
#include <e-util/e-util.h>
|
||||
|
||||
#define CALENDAR_CONFIG_CANCELLED_TASKS_SEXP "(contains? \"status\" \"CANCELLED\")"
|
||||
#define CALENDAR_CONFIG_NOT_CANCELLED_TASKS_SEXP "(not " CALENDAR_CONFIG_CANCELLED_TASKS_SEXP ")"
|
||||
|
||||
typedef void (* CalendarConfigChangedFunc) (GSettings *settings,
|
||||
const gchar *key,
|
||||
gpointer user_data);
|
||||
@ -54,6 +57,9 @@ gboolean calendar_config_get_hide_completed_tasks (void);
|
||||
|
||||
gchar * calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed);
|
||||
|
||||
gboolean calendar_config_get_hide_cancelled_tasks (void);
|
||||
|
||||
|
||||
/* Returns TRUE if the locale has 'am' and 'pm' strings defined, i.e. it
|
||||
* supports 12-hour time format. */
|
||||
gboolean calendar_config_locale_supports_12_hour_format (void);
|
||||
|
||||
@ -2242,6 +2242,66 @@ cal_shell_content_update_model_filter (ECalDataModel *data_model,
|
||||
e_cal_data_model_thaw_views_update (data_model);
|
||||
}
|
||||
|
||||
void
|
||||
e_cal_shell_content_update_tasks_filter (ECalShellContent *cal_shell_content,
|
||||
const gchar *cal_filter)
|
||||
{
|
||||
g_return_if_fail (E_IS_CAL_SHELL_CONTENT (cal_shell_content));
|
||||
|
||||
if (cal_shell_content->priv->task_table) {
|
||||
ETaskTable *task_table;
|
||||
ECalDataModel *data_model;
|
||||
ECalModel *model;
|
||||
gchar *hide_completed_tasks_sexp;
|
||||
gboolean hide_cancelled_tasks;
|
||||
|
||||
/* Set the query on the task pad. */
|
||||
|
||||
task_table = E_TASK_TABLE (cal_shell_content->priv->task_table);
|
||||
model = e_task_table_get_model (task_table);
|
||||
data_model = e_cal_model_get_data_model (model);
|
||||
|
||||
hide_completed_tasks_sexp = calendar_config_get_hide_completed_tasks_sexp (FALSE);
|
||||
hide_cancelled_tasks = calendar_config_get_hide_cancelled_tasks ();
|
||||
|
||||
if (hide_completed_tasks_sexp != NULL) {
|
||||
if (cal_filter && *cal_filter) {
|
||||
gchar *filter;
|
||||
|
||||
filter = g_strdup_printf ("(and %s %s%s%s)", hide_completed_tasks_sexp,
|
||||
hide_cancelled_tasks ? CALENDAR_CONFIG_NOT_CANCELLED_TASKS_SEXP : "",
|
||||
hide_cancelled_tasks ? " " : "",
|
||||
cal_filter);
|
||||
cal_shell_content_update_model_filter (data_model, model, filter, 0, 0);
|
||||
g_free (filter);
|
||||
} else if (hide_cancelled_tasks) {
|
||||
gchar *filter;
|
||||
|
||||
filter = g_strdup_printf ("(and %s %s)", hide_completed_tasks_sexp,
|
||||
CALENDAR_CONFIG_NOT_CANCELLED_TASKS_SEXP);
|
||||
cal_shell_content_update_model_filter (data_model, model, filter, 0, 0);
|
||||
g_free (filter);
|
||||
} else {
|
||||
cal_shell_content_update_model_filter (data_model, model, hide_completed_tasks_sexp, 0, 0);
|
||||
}
|
||||
} else if (hide_cancelled_tasks) {
|
||||
if (cal_filter && *cal_filter) {
|
||||
gchar *filter;
|
||||
|
||||
filter = g_strdup_printf ("(and %s %s)", CALENDAR_CONFIG_NOT_CANCELLED_TASKS_SEXP, cal_filter);
|
||||
cal_shell_content_update_model_filter (data_model, model, filter, 0, 0);
|
||||
g_free (filter);
|
||||
} else {
|
||||
cal_shell_content_update_model_filter (data_model, model, CALENDAR_CONFIG_NOT_CANCELLED_TASKS_SEXP, 0, 0);
|
||||
}
|
||||
} else {
|
||||
cal_shell_content_update_model_filter (data_model, model, (cal_filter && *cal_filter) ? cal_filter : "#t", 0, 0);
|
||||
}
|
||||
|
||||
g_free (hide_completed_tasks_sexp);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
e_cal_shell_content_update_filters (ECalShellContent *cal_shell_content,
|
||||
const gchar *cal_filter,
|
||||
@ -2260,35 +2320,7 @@ e_cal_shell_content_update_filters (ECalShellContent *cal_shell_content,
|
||||
model = e_cal_base_shell_content_get_model (E_CAL_BASE_SHELL_CONTENT (cal_shell_content));
|
||||
|
||||
cal_shell_content_update_model_filter (data_model, model, cal_filter, start_range, end_range);
|
||||
|
||||
if (cal_shell_content->priv->task_table) {
|
||||
ETaskTable *task_table;
|
||||
gchar *hide_completed_tasks_sexp;
|
||||
|
||||
/* Set the query on the task pad. */
|
||||
|
||||
task_table = E_TASK_TABLE (cal_shell_content->priv->task_table);
|
||||
model = e_task_table_get_model (task_table);
|
||||
data_model = e_cal_model_get_data_model (model);
|
||||
|
||||
hide_completed_tasks_sexp = calendar_config_get_hide_completed_tasks_sexp (FALSE);
|
||||
|
||||
if (hide_completed_tasks_sexp != NULL) {
|
||||
if (*cal_filter) {
|
||||
gchar *filter;
|
||||
|
||||
filter = g_strdup_printf ("(and %s %s)", hide_completed_tasks_sexp, cal_filter);
|
||||
cal_shell_content_update_model_filter (data_model, model, filter, 0, 0);
|
||||
g_free (filter);
|
||||
} else {
|
||||
cal_shell_content_update_model_filter (data_model, model, hide_completed_tasks_sexp, 0, 0);
|
||||
}
|
||||
} else {
|
||||
cal_shell_content_update_model_filter (data_model, model, *cal_filter ? cal_filter : "#t", 0, 0);
|
||||
}
|
||||
|
||||
g_free (hide_completed_tasks_sexp);
|
||||
}
|
||||
e_cal_shell_content_update_tasks_filter (cal_shell_content, cal_filter);
|
||||
|
||||
if (cal_shell_content->priv->memo_table) {
|
||||
EMemoTable *memo_table;
|
||||
|
||||
@ -103,6 +103,8 @@ void e_cal_shell_content_update_filters (ECalShellContent *cal_shell_content,
|
||||
const gchar *cal_filter,
|
||||
time_t start_range,
|
||||
time_t end_range);
|
||||
void e_cal_shell_content_update_tasks_filter (ECalShellContent *cal_shell_content,
|
||||
const gchar *cal_filter);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
@ -161,9 +161,48 @@ cal_shell_view_notify_view_id_cb (EShellView *shell_view)
|
||||
gal_view_instance_set_current_view_id (view_instance, view_id);
|
||||
}
|
||||
|
||||
static void
|
||||
cal_shell_view_taskpad_settings_changed_cb (GSettings *settings,
|
||||
const gchar *key,
|
||||
ECalShellView *cal_shell_view)
|
||||
{
|
||||
GVariant *new_value, *old_value;
|
||||
|
||||
new_value = g_settings_get_value (settings, key);
|
||||
old_value = g_hash_table_lookup (cal_shell_view->priv->old_settings, key);
|
||||
|
||||
if (!new_value || !old_value || !g_variant_equal (new_value, old_value)) {
|
||||
if (new_value)
|
||||
g_hash_table_insert (cal_shell_view->priv->old_settings, g_strdup (key), new_value);
|
||||
else
|
||||
g_hash_table_remove (cal_shell_view->priv->old_settings, key);
|
||||
|
||||
if ((g_strcmp0 (key, "hide-completed-tasks-units") == 0 ||
|
||||
g_strcmp0 (key, "hide-completed-tasks-value") == 0) &&
|
||||
!calendar_config_get_hide_completed_tasks ())
|
||||
return;
|
||||
|
||||
if (cal_shell_view->priv->cal_shell_content) {
|
||||
ECalModel *model;
|
||||
gchar *cal_filter;
|
||||
|
||||
model = e_cal_base_shell_content_get_model (E_CAL_BASE_SHELL_CONTENT (cal_shell_view->priv->cal_shell_content));
|
||||
cal_filter = e_cal_data_model_dup_filter (e_cal_model_get_data_model (model));
|
||||
|
||||
e_cal_shell_content_update_tasks_filter (cal_shell_view->priv->cal_shell_content, cal_filter);
|
||||
|
||||
g_free (cal_filter);
|
||||
}
|
||||
} else if (new_value) {
|
||||
g_variant_unref (new_value);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
e_cal_shell_view_private_init (ECalShellView *cal_shell_view)
|
||||
{
|
||||
cal_shell_view->priv->old_settings = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
|
||||
|
||||
e_signal_connect_notify (
|
||||
cal_shell_view, "notify::view-id",
|
||||
G_CALLBACK (cal_shell_view_notify_view_id_cb), NULL);
|
||||
@ -342,6 +381,20 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view)
|
||||
e_calendar_get_item (calendar), (ECalendarItemGetTimeCallback)
|
||||
cal_shell_view_get_current_time, cal_shell_view, NULL);
|
||||
|
||||
priv->settings = e_util_ref_settings ("org.gnome.evolution.calendar");
|
||||
priv->settings_hide_completed_tasks_handler_id =
|
||||
g_signal_connect (priv->settings, "changed::hide-completed-tasks",
|
||||
G_CALLBACK (cal_shell_view_taskpad_settings_changed_cb), cal_shell_view);
|
||||
priv->settings_hide_completed_tasks_units_handler_id =
|
||||
g_signal_connect (priv->settings, "changed::hide-completed-tasks-units",
|
||||
G_CALLBACK (cal_shell_view_taskpad_settings_changed_cb), cal_shell_view);
|
||||
priv->settings_hide_completed_tasks_value_handler_id =
|
||||
g_signal_connect (priv->settings, "changed::hide-completed-tasks-value",
|
||||
G_CALLBACK (cal_shell_view_taskpad_settings_changed_cb), cal_shell_view);
|
||||
priv->settings_hide_cancelled_tasks_handler_id =
|
||||
g_signal_connect (priv->settings, "changed::hide-cancelled-tasks",
|
||||
G_CALLBACK (cal_shell_view_taskpad_settings_changed_cb), cal_shell_view);
|
||||
|
||||
init_timezone_monitors (cal_shell_view);
|
||||
e_cal_shell_view_actions_init (cal_shell_view);
|
||||
e_cal_shell_view_update_sidebar (cal_shell_view);
|
||||
@ -410,6 +463,34 @@ e_cal_shell_view_private_dispose (ECalShellView *cal_shell_view)
|
||||
priv->task_table_selection_change_handler_id = 0;
|
||||
}
|
||||
|
||||
if (priv->settings_hide_completed_tasks_handler_id > 0) {
|
||||
g_signal_handler_disconnect (
|
||||
priv->settings,
|
||||
priv->settings_hide_completed_tasks_handler_id);
|
||||
priv->settings_hide_completed_tasks_handler_id = 0;
|
||||
}
|
||||
|
||||
if (priv->settings_hide_completed_tasks_units_handler_id > 0) {
|
||||
g_signal_handler_disconnect (
|
||||
priv->settings,
|
||||
priv->settings_hide_completed_tasks_units_handler_id);
|
||||
priv->settings_hide_completed_tasks_units_handler_id = 0;
|
||||
}
|
||||
|
||||
if (priv->settings_hide_completed_tasks_value_handler_id > 0) {
|
||||
g_signal_handler_disconnect (
|
||||
priv->settings,
|
||||
priv->settings_hide_completed_tasks_value_handler_id);
|
||||
priv->settings_hide_completed_tasks_value_handler_id = 0;
|
||||
}
|
||||
|
||||
if (priv->settings_hide_cancelled_tasks_handler_id > 0) {
|
||||
g_signal_handler_disconnect (
|
||||
priv->settings,
|
||||
priv->settings_hide_cancelled_tasks_handler_id);
|
||||
priv->settings_hide_cancelled_tasks_handler_id = 0;
|
||||
}
|
||||
|
||||
for (ii = 0; ii < E_CAL_VIEW_KIND_LAST; ii++) {
|
||||
if (priv->views[ii].popup_event_handler_id > 0) {
|
||||
g_signal_handler_disconnect (
|
||||
@ -436,6 +517,7 @@ e_cal_shell_view_private_dispose (ECalShellView *cal_shell_view)
|
||||
g_clear_object (&priv->client_cache);
|
||||
g_clear_object (&priv->model);
|
||||
g_clear_object (&priv->selector);
|
||||
g_clear_object (&priv->settings);
|
||||
g_clear_object (&priv->memo_table);
|
||||
g_clear_object (&priv->task_table);
|
||||
|
||||
@ -446,7 +528,10 @@ e_cal_shell_view_private_dispose (ECalShellView *cal_shell_view)
|
||||
void
|
||||
e_cal_shell_view_private_finalize (ECalShellView *cal_shell_view)
|
||||
{
|
||||
/* XXX Nothing to do? */
|
||||
if (cal_shell_view->priv->old_settings) {
|
||||
g_hash_table_destroy (cal_shell_view->priv->old_settings);
|
||||
cal_shell_view->priv->old_settings = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@ -125,6 +125,15 @@ struct _ECalShellViewPrivate {
|
||||
gpointer transfer_alert; /* weak pointer to EAlert * */
|
||||
|
||||
GFileMonitor *monitors[CHECK_NB];
|
||||
|
||||
/* org.gnome.evolution.calendar */
|
||||
GSettings *settings;
|
||||
GHashTable *old_settings;
|
||||
gulong settings_hide_completed_tasks_handler_id;
|
||||
gulong settings_hide_completed_tasks_units_handler_id;
|
||||
gulong settings_hide_completed_tasks_value_handler_id;
|
||||
gulong settings_hide_cancelled_tasks_handler_id;
|
||||
|
||||
};
|
||||
|
||||
void e_cal_shell_view_private_init
|
||||
|
||||
@ -1070,6 +1070,12 @@ calendar_preferences_construct (ECalendarPreferences *prefs,
|
||||
widget, "sensitive",
|
||||
G_SETTINGS_BIND_GET);
|
||||
|
||||
widget = e_builder_get_widget (prefs->priv->builder, "tasks_hide_cancelled");
|
||||
g_settings_bind (
|
||||
settings, "hide-cancelled-tasks",
|
||||
widget, "active",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
|
||||
widget = e_builder_get_widget (prefs->priv->builder, "to_do_bar_show_no_duedate_tasks");
|
||||
g_settings_bind (
|
||||
mail_settings, "to-do-bar-show-no-duedate-tasks",
|
||||
|
||||
@ -1296,6 +1296,21 @@
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="tasks_hide_cancelled">
|
||||
<property name="label" translatable="yes">Hid_e cancelled tasks</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
||||
@ -960,6 +960,13 @@ static GtkRadioActionEntry task_filter_entries[] = {
|
||||
NULL, /* XXX Add a tooltip! */
|
||||
TASK_FILTER_ANY_CATEGORY },
|
||||
|
||||
{ "task-filter-cancelled-tasks",
|
||||
NULL,
|
||||
N_("Cancelled Tasks"),
|
||||
NULL,
|
||||
NULL, /* XXX Add a tooltip! */
|
||||
TASK_FILTER_CANCELLED_TASKS },
|
||||
|
||||
{ "task-filter-completed-tasks",
|
||||
NULL,
|
||||
N_("Completed Tasks"),
|
||||
|
||||
@ -84,6 +84,8 @@
|
||||
E_SHELL_WINDOW_ACTION ((window), "task-filter-active-tasks")
|
||||
#define E_SHELL_WINDOW_ACTION_TASK_FILTER_ANY_CATEGORY(window) \
|
||||
E_SHELL_WINDOW_ACTION ((window), "task-filter-any-category")
|
||||
#define E_SHELL_WINDOW_ACTION_TASK_FILTER_CANCELLED_TASKS(window) \
|
||||
E_SHELL_WINDOW_ACTION ((window), "task-filter-cancelled-tasks")
|
||||
#define E_SHELL_WINDOW_ACTION_TASK_FILTER_COMPLETED_TASKS(window) \
|
||||
E_SHELL_WINDOW_ACTION ((window), "task-filter-completed-tasks")
|
||||
#define E_SHELL_WINDOW_ACTION_TASK_FILTER_NEXT_7_DAYS_TASKS(window) \
|
||||
|
||||
@ -87,6 +87,28 @@ task_shell_view_hide_completed_tasks_changed_cb (GSettings *settings,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
task_shell_view_hide_cancelled_tasks_changed_cb (GSettings *settings,
|
||||
const gchar *key,
|
||||
ETaskShellView *task_shell_view)
|
||||
{
|
||||
GVariant *new_value, *old_value;
|
||||
|
||||
new_value = g_settings_get_value (settings, key);
|
||||
old_value = g_hash_table_lookup (task_shell_view->priv->old_settings, key);
|
||||
|
||||
if (!new_value || !old_value || !g_variant_equal (new_value, old_value)) {
|
||||
if (new_value)
|
||||
g_hash_table_insert (task_shell_view->priv->old_settings, g_strdup (key), new_value);
|
||||
else
|
||||
g_hash_table_remove (task_shell_view->priv->old_settings, key);
|
||||
|
||||
e_shell_view_execute_search (E_SHELL_VIEW (task_shell_view));
|
||||
} else if (new_value) {
|
||||
g_variant_unref (new_value);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
task_shell_view_table_open_component_cb (ETaskShellView *task_shell_view,
|
||||
ECalModelComponent *comp_data)
|
||||
@ -331,6 +353,13 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view)
|
||||
task_shell_view);
|
||||
priv->settings_hide_completed_tasks_value_handler_id = handler_id;
|
||||
|
||||
/* Hide/show cancelled tasks */
|
||||
handler_id = g_signal_connect (
|
||||
priv->settings, "changed::hide-cancelled-tasks",
|
||||
G_CALLBACK (task_shell_view_hide_cancelled_tasks_changed_cb),
|
||||
task_shell_view);
|
||||
priv->settings_hide_cancelled_tasks_handler_id = handler_id;
|
||||
|
||||
e_task_shell_view_actions_init (task_shell_view);
|
||||
e_task_shell_view_update_sidebar (task_shell_view);
|
||||
e_task_shell_view_update_search_filter (task_shell_view);
|
||||
@ -447,6 +476,13 @@ e_task_shell_view_private_dispose (ETaskShellView *task_shell_view)
|
||||
priv->settings_hide_completed_tasks_value_handler_id = 0;
|
||||
}
|
||||
|
||||
if (priv->settings_hide_cancelled_tasks_handler_id > 0) {
|
||||
g_signal_handler_disconnect (
|
||||
priv->settings,
|
||||
priv->settings_hide_cancelled_tasks_handler_id);
|
||||
priv->settings_hide_cancelled_tasks_handler_id = 0;
|
||||
}
|
||||
|
||||
g_clear_object (&priv->task_shell_backend);
|
||||
g_clear_object (&priv->task_shell_content);
|
||||
g_clear_object (&priv->task_shell_sidebar);
|
||||
@ -475,7 +511,6 @@ e_task_shell_view_private_finalize (ETaskShellView *task_shell_view)
|
||||
g_hash_table_destroy (task_shell_view->priv->old_settings);
|
||||
task_shell_view->priv->old_settings = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@ -56,12 +56,13 @@ G_BEGIN_DECLS
|
||||
/* Filter items are displayed in ascending order.
|
||||
* Non-negative values are reserved for categories. */
|
||||
enum {
|
||||
TASK_FILTER_ANY_CATEGORY = -7,
|
||||
TASK_FILTER_UNMATCHED = -6,
|
||||
TASK_FILTER_NEXT_7_DAYS_TASKS = -5,
|
||||
TASK_FILTER_ACTIVE_TASKS = -4,
|
||||
TASK_FILTER_OVERDUE_TASKS = -3,
|
||||
TASK_FILTER_COMPLETED_TASKS = -2,
|
||||
TASK_FILTER_ANY_CATEGORY = -8,
|
||||
TASK_FILTER_UNMATCHED = -7,
|
||||
TASK_FILTER_NEXT_7_DAYS_TASKS = -6,
|
||||
TASK_FILTER_ACTIVE_TASKS = -5,
|
||||
TASK_FILTER_OVERDUE_TASKS = -4,
|
||||
TASK_FILTER_COMPLETED_TASKS = -3,
|
||||
TASK_FILTER_CANCELLED_TASKS = -2,
|
||||
TASK_FILTER_TASKS_WITH_ATTACHMENTS = -1
|
||||
};
|
||||
|
||||
@ -104,6 +105,7 @@ struct _ETaskShellViewPrivate {
|
||||
gulong settings_hide_completed_tasks_handler_id;
|
||||
gulong settings_hide_completed_tasks_units_handler_id;
|
||||
gulong settings_hide_completed_tasks_value_handler_id;
|
||||
gulong settings_hide_cancelled_tasks_handler_id;
|
||||
|
||||
guint update_timeout;
|
||||
guint update_completed_timeout;
|
||||
|
||||
@ -178,6 +178,13 @@ task_shell_view_execute_search (EShellView *shell_view)
|
||||
query = temp;
|
||||
break;
|
||||
|
||||
case TASK_FILTER_CANCELLED_TASKS:
|
||||
temp = g_strdup_printf (
|
||||
"(and " CALENDAR_CONFIG_CANCELLED_TASKS_SEXP " %s)", query);
|
||||
g_free (query);
|
||||
query = temp;
|
||||
break;
|
||||
|
||||
case TASK_FILTER_COMPLETED_TASKS:
|
||||
temp = g_strdup_printf (
|
||||
"(and (is-completed?) %s)", query);
|
||||
@ -211,6 +218,13 @@ task_shell_view_execute_search (EShellView *shell_view)
|
||||
}
|
||||
}
|
||||
|
||||
if (value != TASK_FILTER_CANCELLED_TASKS &&
|
||||
calendar_config_get_hide_cancelled_tasks ()) {
|
||||
temp = g_strdup_printf ("(and " CALENDAR_CONFIG_NOT_CANCELLED_TASKS_SEXP " %s)", query);
|
||||
g_free (query);
|
||||
query = temp;
|
||||
}
|
||||
|
||||
/* Honor the user's preference to hide completed tasks. */
|
||||
temp = calendar_config_get_hide_completed_tasks_sexp (FALSE);
|
||||
if (temp != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user