diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-05-28 22:40:52 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-05-28 22:40:52 +0800 |
commit | df0ce831108a5304beba90c00454f7e2f182d5fc (patch) | |
tree | 6eab064e909ad6d69221ccdd6c7e0c5c2de204ec | |
parent | d300128480b4415d85aa7511599ffc9164bfe382 (diff) | |
download | gsoc2013-evolution-df0ce831108a5304beba90c00454f7e2f182d5fc.tar.gz gsoc2013-evolution-df0ce831108a5304beba90c00454f7e2f182d5fc.tar.zst gsoc2013-evolution-df0ce831108a5304beba90c00454f7e2f182d5fc.zip |
Fix critical warning in calendar express mode.
-rw-r--r-- | modules/calendar/e-cal-shell-view.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index 8833be75d0..19c804204c 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -307,25 +307,21 @@ cal_shell_view_update_actions (EShellView *shell_view) shell = e_shell_window_get_shell (shell_window); if (e_shell_get_express_mode (shell)) { - GtkWidget *widget, *item; + GtkWidget *widget; - /* Hack: Get rid of New and Send/Receive in toolbar - * while in express mode */ + /* Hide the New button on the toolbar. */ widget = e_shell_window_get_managed_widget ( shell_window, "/main-toolbar"); + widget = (GtkWidget *)gtk_toolbar_get_nth_item ( + GTK_TOOLBAR (widget), 0); + gtk_widget_hide (widget); - item = (GtkWidget *)gtk_toolbar_get_nth_item ((GtkToolbar *)widget, 0); - gtk_widget_hide(item); - + /* Hide the main menu. */ widget = e_shell_window_get_managed_widget ( shell_window, "/main-menu"); - gtk_widget_hide(widget); - - item = e_shell_window_get_managed_widget ( - shell_window, "/main-toolbar/send-receive"); - if (item) - gtk_widget_hide(item); + gtk_widget_hide (widget); } + cal_shell_content = priv->cal_shell_content; calendar = e_cal_shell_content_get_calendar (cal_shell_content); view_type = gnome_calendar_get_view (calendar); @@ -469,7 +465,7 @@ cal_shell_view_update_actions (EShellView *shell_view) gtk_action_set_sensitive (action, sensitive); action = ACTION (EVENT_MEETING_NEW); - visible = itip_addresses_get_default() != NULL; + visible = itip_addresses_get_default () != NULL; gtk_action_set_visible (action, visible); } |