aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/tasks-control.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-01-04 03:43:32 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-01-04 03:43:32 +0800
commit51adfb0876b2eebc737e5d8c42b76ce5b39fc1b8 (patch)
treef38a7a7081a996578d554d4d97b1506b79ee8261 /calendar/gui/tasks-control.c
parent239be43f7734bcbfdb69cfe9396b6b5d2f933d3f (diff)
downloadgsoc2013-evolution-51adfb0876b2eebc737e5d8c42b76ce5b39fc1b8.tar.gz
gsoc2013-evolution-51adfb0876b2eebc737e5d8c42b76ce5b39fc1b8.tar.zst
gsoc2013-evolution-51adfb0876b2eebc737e5d8c42b76ce5b39fc1b8.zip
new verb callback (sensitize_commands): set sensitivity of mark complete
2002-01-03 JP Rosevear <jpr@ximian.com> * gui/tasks-control.c (tasks_control_complete_cmd): new verb callback (sensitize_commands): set sensitivity of mark complete command * gui/e-tasks.h: new proto * gui/e-tasks.c (e_tasks_complete_selected): mark selected tasks in the table as complete * gui/e-calendar-table.h: new proto * gui/e-calendar-table.c (e_calendar_table_complete_selected): mark selected rows as complete svn path=/trunk/; revision=15239
Diffstat (limited to 'calendar/gui/tasks-control.c')
-rw-r--r--calendar/gui/tasks-control.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index 4631b35467..0edc2723e7 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -79,6 +79,9 @@ static void tasks_control_paste_cmd (BonoboUIComponent *uic,
static void tasks_control_delete_cmd (BonoboUIComponent *uic,
gpointer data,
const char *path);
+static void tasks_control_complete_cmd (BonoboUIComponent *uic,
+ gpointer data,
+ const char *path);
static void tasks_control_expunge_cmd (BonoboUIComponent *uic,
gpointer data,
const char *path);
@@ -227,6 +230,9 @@ sensitize_commands (ETasks *tasks, BonoboControl *control, int n_selected)
bonobo_ui_component_set_prop (uic, "/commands/TasksDelete", "sensitive",
n_selected == 0 ? "0" : "1",
NULL);
+ bonobo_ui_component_set_prop (uic, "/commands/TasksMarkComplete", "sensitive",
+ n_selected == 0 ? "0" : "1",
+ NULL);
}
/* Callback used when the selection in the table changes */
@@ -246,6 +252,7 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("TasksCopy", tasks_control_copy_cmd),
BONOBO_UI_VERB ("TasksPaste", tasks_control_paste_cmd),
BONOBO_UI_VERB ("TasksDelete", tasks_control_delete_cmd),
+ BONOBO_UI_VERB ("TasksMarkComplete", tasks_control_complete_cmd),
BONOBO_UI_VERB ("TasksExpunge", tasks_control_expunge_cmd),
BONOBO_UI_VERB ("TasksSettings", tasks_control_settings_cmd),
@@ -396,6 +403,17 @@ tasks_control_delete_cmd (BonoboUIComponent *uic,
e_tasks_delete_selected (tasks);
}
+static void
+tasks_control_complete_cmd (BonoboUIComponent *uic,
+ gpointer data,
+ const char *path)
+{
+ ETasks *tasks;
+
+ tasks = E_TASKS (data);
+ e_tasks_complete_selected (tasks);
+}
+
static gboolean
confirm_expunge (ETasks *tasks)
{