aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-01-04 03:03:00 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-01-04 03:03:00 +0800
commit6d4da19b136aa627cea16ecc4f7f6154aad19933 (patch)
tree63a28a5d82daf2a9d917f7840ffec8b06f3fd4c2 /calendar
parent0fe2d5201603163b11341cb3719500fa762bc532 (diff)
downloadgsoc2013-evolution-6d4da19b136aa627cea16ecc4f7f6154aad19933.tar
gsoc2013-evolution-6d4da19b136aa627cea16ecc4f7f6154aad19933.tar.gz
gsoc2013-evolution-6d4da19b136aa627cea16ecc4f7f6154aad19933.tar.bz2
gsoc2013-evolution-6d4da19b136aa627cea16ecc4f7f6154aad19933.tar.lz
gsoc2013-evolution-6d4da19b136aa627cea16ecc4f7f6154aad19933.tar.xz
gsoc2013-evolution-6d4da19b136aa627cea16ecc4f7f6154aad19933.tar.zst
gsoc2013-evolution-6d4da19b136aa627cea16ecc4f7f6154aad19933.zip
only need one warning message now
002-01-03 JP Rosevear <jpr@ximian.com> * gui/tasks-control.c (confirm_expunge): only need one warning message now * gui/e-tasks.c (create_sexp): change the logic to expunge all completed tasks not just hidden ones svn path=/trunk/; revision=15236
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/gui/e-tasks.c16
-rw-r--r--calendar/gui/tasks-control.c36
3 files changed, 14 insertions, 46 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 7ddb5be15b..65f7caab76 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,13 @@
2002-01-03 JP Rosevear <jpr@ximian.com>
+ * gui/tasks-control.c (confirm_expunge): only need one warning
+ message now
+
+ * gui/e-tasks.c (create_sexp): change the logic to expunge all
+ completed tasks not just hidden ones
+
+2002-01-03 JP Rosevear <jpr@ximian.com>
+
* gui/tasks-control.c (confirm_expunge): confirm expunging of the
tasks
(tasks_control_expunge_cmd): verb callback
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 026f8e5708..54e8ea3c45 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -520,22 +520,14 @@ e_tasks_delete_selected (ETasks *tasks)
static char *
create_sexp (void)
{
- char *completed_sexp;
- char *new_sexp;
-
- /* Create a sub-expression for filtering out completed tasks, based on
- the config settings. */
- completed_sexp = calendar_config_get_hide_completed_tasks_sexp ();
-
- new_sexp = g_strdup_printf ("(and (= (get-vtype) \"VTODO\") (not %s))",
- completed_sexp ? completed_sexp : "");
- g_free (completed_sexp);
+ char *sexp;
+ sexp = g_strdup ("(and (= (get-vtype) \"VTODO\") (is-completed?))");
#if 0
- g_print ("Calendar model sexp:\n%s\n", new_sexp);
+ g_print ("Calendar model sexp:\n%s\n", sexp);
#endif
- return new_sexp;
+ return sexp;
}
/* Callback used when a component is updated in the live query */
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index 504342fa88..4631b35467 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -401,7 +401,6 @@ confirm_expunge (ETasks *tasks)
{
GtkWidget *dialog, *label, *checkbox;
int button, val;
- char *text = NULL;
if (!calendar_config_get_confirm_expunge ())
return TRUE;
@@ -414,36 +413,7 @@ confirm_expunge (ETasks *tasks)
GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (tasks),
GTK_TYPE_WINDOW)));
- val = calendar_config_get_hide_completed_tasks_value ();
- if (val == 0) {
- text = g_strdup (_("This operation will permanently erase all tasks marked as completed. If you continue, you will not be able to recover these tasks.\n\nReally erase these tasks?"));
- } else {
- int units;
-
- units = calendar_config_get_hide_completed_tasks_units ();
- switch (units) {
- case CAL_DAYS:
- if (val == 1)
- text = g_strdup (_("This operation will permanently erase all tasks marked as completed on or before 1 day ago. If you continue, you will not be able to recover these tasks.\n\nReally erase these tasks?"));
- else
- text = g_strdup_printf (_("This operation will permanently erase all tasks marked as completed on or before %d days ago. If you continue, you will not be able to recover these tasks.\n\nReally erase these tasks?"), val);
- break;
- case CAL_HOURS:
- if (val == 1)
- text = g_strdup (_("This operation will permanently erase all tasks marked as completed on or before 1 hour ago. If you continue, you will not be able to recover these tasks.\n\nReally erase these tasks?"));
- else
- text = g_strdup_printf (_("This operation will permanently erase all tasks marked as completed on or before %d hours ago. If you continue, you will not be able to recover these tasks.\n\nReally erase these tasks?"), val);
- break;
- case CAL_MINUTES:
- if (val == 1)
- text = g_strdup (_("This operation will permanently erase all tasks marked as completed on or before 1 minute ago. If you continue, you will not be able to recover these tasks.\n\nReally erase these tasks?"));
- else
- text = g_strdup_printf (_("This operation will permanently erase all tasks marked as completed on or before %d minutes ago. If you continue, you will not be able to recover these tasks.\n\nReally erase these tasks?"), val);
- break;
- }
- }
- label = gtk_label_new (text);
- g_free (text);
+ label = gtk_label_new (_("This operation will permanently erase all tasks marked as completed. If you continue, you will not be able to recover these tasks.\n\nReally erase these tasks?"));
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
@@ -454,11 +424,9 @@ confirm_expunge (ETasks *tasks)
gtk_widget_show (checkbox);
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), checkbox, TRUE, TRUE, 4);
- button = gnome_dialog_run (GNOME_DIALOG (dialog));
-
+ button = gnome_dialog_run (GNOME_DIALOG (dialog));
if (button == 0 && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)))
calendar_config_set_confirm_expunge (FALSE);
-
gnome_dialog_close (GNOME_DIALOG (dialog));
if (button == 0)