From 2566a8549d7fd878226aeb9269f2d5871a5eddc2 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Wed, 19 May 2010 15:21:29 +0100 Subject: hide meeting creation if we have no accounts configured, for Evo calendar in standalone mode --- modules/calendar/e-cal-shell-view-actions.h | 2 ++ modules/calendar/e-cal-shell-view.c | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'modules') diff --git a/modules/calendar/e-cal-shell-view-actions.h b/modules/calendar/e-cal-shell-view-actions.h index a69b82f645..b79bc6baaf 100644 --- a/modules/calendar/e-cal-shell-view-actions.h +++ b/modules/calendar/e-cal-shell-view-actions.h @@ -89,6 +89,8 @@ E_SHELL_WINDOW_ACTION ((window), "event-reply-all") #define E_SHELL_WINDOW_ACTION_EVENT_OCCURRENCE_MOVABLE(window) \ E_SHELL_WINDOW_ACTION ((window), "event-occurrence-movable") +#define E_SHELL_WINDOW_ACTION_EVENT_MEETING_NEW(window) \ + E_SHELL_WINDOW_ACTION ((window), "event-meeting-new") /* Memo Pad Actions */ #define E_SHELL_WINDOW_ACTION_CALENDAR_MEMOPAD_FORWARD(window) \ diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index cf356cbc6d..1f719e82c5 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -283,6 +283,7 @@ cal_shell_view_update_actions (EShellView *shell_view) GtkAction *action; GList *list, *iter; gboolean sensitive; + gboolean visible; guint32 state; gint n_selected; @@ -464,6 +465,10 @@ cal_shell_view_update_actions (EShellView *shell_view) action = ACTION (EVENT_REPLY_ALL); sensitive = (n_selected == 1) && is_meeting; gtk_action_set_sensitive (action, sensitive); + + action = ACTION (EVENT_MEETING_NEW); + visible = itip_addresses_get_default() != NULL; + gtk_action_set_visible (action, visible); } static void -- cgit v1.2.3