aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/tasks-control.c
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/gui/tasks-control.c
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/gui/tasks-control.c')
-rw-r--r--calendar/gui/tasks-control.c36
1 files changed, 2 insertions, 34 deletions
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)