aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-table.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-calendar-table.c')
-rw-r--r--calendar/gui/e-calendar-table.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index 500b6ef262..3ce9cee4bd 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -941,7 +941,8 @@ delete_cb (GtkWidget *menuitem, gpointer data)
enum {
MASK_SINGLE = 1 << 0, /* For commands that work on 1 task. */
MASK_MULTIPLE = 1 << 1, /* For commands for multiple tasks. */
- MASK_EDITABLE = 1 << 2 /* For commands disabled in read-only folders */
+ MASK_EDITABLE = 1 << 2, /* For commands disabled in read-only folders */
+ MASK_ASSIGNABLE = 1 << 3 /* For non-task assignable backends */
};
@@ -958,7 +959,7 @@ static EPopupMenu tasks_popup_menu [] = {
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("_Assign Task"), GTK_SIGNAL_FUNC (e_calendar_table_on_assign), MASK_SINGLE | MASK_EDITABLE),
+ E_POPUP_ITEM (N_("_Assign Task"), GTK_SIGNAL_FUNC (e_calendar_table_on_assign), MASK_SINGLE | MASK_EDITABLE | MASK_ASSIGNABLE),
E_POPUP_ITEM (N_("_Forward as iCalendar"), GTK_SIGNAL_FUNC (e_calendar_table_on_forward), MASK_SINGLE),
E_POPUP_ITEM (N_("_Mark as Complete"), GTK_SIGNAL_FUNC (mark_as_complete_cb), MASK_SINGLE | MASK_EDITABLE),
E_POPUP_ITEM (N_("_Mark Selected Tasks as Complete"), GTK_SIGNAL_FUNC (mark_as_complete_cb), MASK_MULTIPLE | MASK_EDITABLE),
@@ -994,6 +995,9 @@ e_calendar_table_on_right_click (ETable *table,
if (cal_client_is_read_only (calendar_model_get_cal_client (e_calendar_table_get_model (cal_table))))
disable_mask |= MASK_EDITABLE;
+ if (cal_client_get_static_capability (calendar_model_get_cal_client (e_calendar_table_get_model (cal_table)), "no-task-assignment"))
+ disable_mask |= MASK_ASSIGNABLE;
+
e_popup_menu_run (tasks_popup_menu, (GdkEvent *) event,
disable_mask, hide_mask, cal_table);