aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/tasks-control.c
diff options
context:
space:
mode:
authorKidd Wang <kidd.wang@sun.com>2004-01-06 14:04:11 +0800
committerHarry Lu <haip@src.gnome.org>2004-01-06 14:04:11 +0800
commit6f2710f8e6ffd7e354da7262d63f6f234dee70e9 (patch)
tree8fd49cb07c551df84c9ec7df9dbe5e45fcadd00f /calendar/gui/tasks-control.c
parente409aaa013689b2fc165b63dc2a237deafebc279 (diff)
downloadgsoc2013-evolution-6f2710f8e6ffd7e354da7262d63f6f234dee70e9.tar.gz
gsoc2013-evolution-6f2710f8e6ffd7e354da7262d63f6f234dee70e9.tar.zst
gsoc2013-evolution-6f2710f8e6ffd7e354da7262d63f6f234dee70e9.zip
open a dialog for the selected task. ditto. add a menu item for "Open
2004-01-06 Kidd Wang <kidd.wang@sun.com> * gui/e-calendar-table.[ch] (e_calendar_table_open_selected): open a dialog for the selected task. * gui/e-tasks.[ch] (e_tasks_open_task): ditto. * gui/tasks-control.c (tasks_control_sensitize_commands), (tasks_control_open_task_cmd): add a menu item for "Open Task". svn path=/trunk/; revision=24064
Diffstat (limited to 'calendar/gui/tasks-control.c')
-rw-r--r--calendar/gui/tasks-control.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index fc4b560f76..aa63f91519 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -71,6 +71,9 @@ static void tasks_control_set_property (BonoboPropertyBag *bag,
static void tasks_control_activate_cb (BonoboControl *control,
gboolean activate,
gpointer user_data);
+static void tasks_control_open_task_cmd (BonoboUIComponent *uic,
+ gpointer data,
+ const char *path);
static void tasks_control_new_task_cmd (BonoboUIComponent *uic,
gpointer data,
const char *path);
@@ -246,6 +249,9 @@ tasks_control_sensitize_commands (BonoboControl *control, ETasks *tasks, int n_s
model = e_calendar_table_get_model (e_tasks_get_calendar_table (tasks));
e_cal_is_read_only (e_cal_model_get_default_client (model), &read_only, NULL);
+ bonobo_ui_component_set_prop (uic, "/commands/TasksOpenTask", "sensitive",
+ n_selected != 1 ? "0" : "1",
+ NULL);
bonobo_ui_component_set_prop (uic, "/commands/TasksCut", "sensitive",
n_selected == 0 || read_only ? "0" : "1",
NULL);
@@ -278,6 +284,7 @@ selection_changed_cb (ETasks *tasks, int n_selected, gpointer data)
}
static BonoboUIVerb verbs [] = {
+ BONOBO_UI_VERB ("TasksOpenTask", tasks_control_open_task_cmd),
BONOBO_UI_VERB ("TasksNewTask", tasks_control_new_task_cmd),
BONOBO_UI_VERB ("TasksCut", tasks_control_cut_cmd),
BONOBO_UI_VERB ("TasksCopy", tasks_control_copy_cmd),
@@ -359,6 +366,15 @@ tasks_control_deactivate (BonoboControl *control, ETasks *tasks)
bonobo_ui_component_unset_container (uic, NULL);
}
+static void tasks_control_open_task_cmd (BonoboUIComponent *uic,
+ gpointer data,
+ const char *path)
+{
+ ETasks *tasks;
+
+ tasks = E_TASKS (data);
+ e_tasks_open_task (tasks);
+}
static void
tasks_control_new_task_cmd (BonoboUIComponent *uic,