diff options
Diffstat (limited to 'modules/calendar')
-rw-r--r-- | modules/calendar/e-cal-shell-sidebar.c | 6 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view-private.c | 4 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view.c | 9 |
3 files changed, 14 insertions, 5 deletions
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index 9491d3fee2..f5f87618e1 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -637,7 +637,7 @@ cal_shell_sidebar_constructed (GObject *object) GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); - if (!e_shell_get_express_mode(e_shell_get_default())) { + if (!e_shell_get_express_mode (shell)) { gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE); } else { GtkWidget *button; @@ -647,7 +647,9 @@ cal_shell_sidebar_constructed (GObject *object) button = gtk_button_new_with_label (_("New Calendar...")); gtk_box_pack_start (GTK_BOX(container), button, FALSE, FALSE, 0); - g_signal_connect (button, "clicked", G_CALLBACK(new_calendar_clicked), shell_sidebar); + g_signal_connect ( + button, "clicked", + G_CALLBACK (new_calendar_clicked), shell_sidebar); gtk_paned_pack1 (GTK_PANED (priv->paned), container, TRUE, TRUE); gtk_widget_show_all (container); diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c index 11b6ec243d..aa1008558a 100644 --- a/modules/calendar/e-cal-shell-view-private.c +++ b/modules/calendar/e-cal-shell-view-private.c @@ -464,7 +464,9 @@ system_timezone_monitor_changed (GFileMonitor *handle, current_zone = e_cal_model_get_timezone (model); timezone = e_cal_util_get_system_timezone (); - if (!g_strcmp0 (icaltimezone_get_tzid (timezone), icaltimezone_get_tzid (current_zone))) + if (!g_strcmp0 ( + icaltimezone_get_tzid (timezone), + icaltimezone_get_tzid (current_zone))) return; shell_backend = e_shell_view_get_shell_backend ((EShellView *) view); diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index 218bd7d4da..8833be75d0 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -277,6 +277,7 @@ cal_shell_view_update_actions (EShellView *shell_view) ECalShellContent *cal_shell_content; EShellSidebar *shell_sidebar; EShellWindow *shell_window; + EShell *shell; GnomeCalendarViewType view_type; GnomeCalendar *calendar; ECalendarView *view; @@ -303,8 +304,9 @@ cal_shell_view_update_actions (EShellView *shell_view) priv = E_CAL_SHELL_VIEW_GET_PRIVATE (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); + shell = e_shell_window_get_shell (shell_window); - if (e_shell_get_express_mode(e_shell_get_default())) { + if (e_shell_get_express_mode (shell)) { GtkWidget *widget, *item; /* Hack: Get rid of New and Send/Receive in toolbar @@ -498,7 +500,10 @@ cal_shell_view_class_init (ECalShellViewClass *class, shell_view_class->execute_search = cal_shell_view_execute_search; shell_view_class->update_actions = cal_shell_view_update_actions; - if (e_shell_get_express_mode(e_shell_get_default())) + /* XXX This is an unusual place to need an EShell instance. + * Would be cleaner to implement a method that either + * chains up or does nothing based on express mode. */ + if (e_shell_get_express_mode (e_shell_get_default ())) shell_view_class->construct_searchbar = NULL; } |