aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar')
-rw-r--r--modules/calendar/e-cal-shell-content.c237
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c26
-rw-r--r--modules/calendar/e-cal-shell-sidebar.h2
-rw-r--r--modules/calendar/e-cal-shell-view-private.c8
-rw-r--r--modules/calendar/e-cal-shell-view.c27
5 files changed, 112 insertions, 188 deletions
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index 638fa3c72f..545287dc29 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -350,48 +350,39 @@ cal_shell_content_constructed (GObject *object)
/* We borrow the memopad and taskpad models from the memo
* and task views, loading the views if necessary. */
- if (!e_shell_get_express_mode (shell)) {
- foreign_view = e_shell_window_get_shell_view (shell_window, "memos");
- foreign_content = e_shell_view_get_shell_content (foreign_view);
- g_object_get (foreign_content, "model", &memo_model, NULL);
-
- foreign_view = e_shell_window_get_shell_view (shell_window, "tasks");
- foreign_content = e_shell_view_get_shell_content (foreign_view);
- g_object_get (foreign_content, "model", &task_model, NULL);
- }
+ foreign_view = e_shell_window_get_shell_view (shell_window, "memos");
+ foreign_content = e_shell_view_get_shell_content (foreign_view);
+ g_object_get (foreign_content, "model", &memo_model, NULL);
+
+ foreign_view = e_shell_window_get_shell_view (shell_window, "tasks");
+ foreign_content = e_shell_view_get_shell_content (foreign_view);
+ g_object_get (foreign_content, "model", &task_model, NULL);
/* Build content widgets. */
container = GTK_WIDGET (object);
- if (!e_shell_get_express_mode (shell)) {
- widget = e_paned_new (GTK_ORIENTATION_HORIZONTAL);
- gtk_container_add (GTK_CONTAINER (container), widget);
- priv->hpaned = g_object_ref (widget);
- gtk_widget_show (widget);
+ widget = e_paned_new (GTK_ORIENTATION_HORIZONTAL);
+ gtk_container_add (GTK_CONTAINER (container), widget);
+ priv->hpaned = g_object_ref (widget);
+ gtk_widget_show (widget);
- container = priv->hpaned;
- }
+ container = priv->hpaned;
widget = gtk_notebook_new ();
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE);
gtk_notebook_set_show_border (GTK_NOTEBOOK (widget), FALSE);
- if (!e_shell_get_express_mode (shell))
- gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE);
- else
- gtk_container_add (GTK_CONTAINER (container), widget);
+ gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE);
priv->notebook = g_object_ref (widget);
gtk_widget_show (widget);
- if (!e_shell_get_express_mode (shell)) {
- /* FIXME Need to deal with saving and restoring the position.
- * Month view has its own position. */
- widget = e_paned_new (GTK_ORIENTATION_VERTICAL);
- e_paned_set_fixed_resize (E_PANED (widget), FALSE);
- gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, TRUE);
- priv->vpaned = g_object_ref (widget);
- gtk_widget_show (widget);
- }
+ /* FIXME Need to deal with saving and restoring the position.
+ * Month view has its own position. */
+ widget = e_paned_new (GTK_ORIENTATION_VERTICAL);
+ e_paned_set_fixed_resize (E_PANED (widget), FALSE);
+ gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, TRUE);
+ priv->vpaned = g_object_ref (widget);
+ gtk_widget_show (widget);
container = priv->notebook;
@@ -418,90 +409,88 @@ cal_shell_content_constructed (GObject *object)
container = priv->vpaned;
- if (!e_shell_get_express_mode (shell)) {
- widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE);
- gtk_widget_show (widget);
-
- container = widget;
-
- widget = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0);
- gtk_widget_show (widget);
-
- widget = gtk_label_new (NULL);
- markup = g_strdup_printf ("<b>%s</b>", _("Tasks"));
- gtk_label_set_markup (GTK_LABEL (widget), markup);
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0);
- gtk_widget_show (widget);
- g_free (markup);
-
- widget = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (
- GTK_SCROLLED_WINDOW (widget),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type (
- GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
- gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
- gtk_widget_show (widget);
-
- container = widget;
-
- widget = e_task_table_new (shell_view, task_model);
- gtk_container_add (GTK_CONTAINER (container), widget);
- priv->task_table = g_object_ref (widget);
- gtk_widget_show (widget);
-
- cal_shell_content_load_table_state (
- shell_content, E_TABLE (widget));
-
- g_signal_connect_swapped (
- widget, "open-component",
- G_CALLBACK (e_cal_shell_view_taskpad_open_task),
- shell_view);
-
- container = priv->vpaned;
-
- widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- gtk_paned_pack2 (GTK_PANED (container), widget, TRUE, TRUE);
- gtk_widget_show (widget);
-
- container = widget;
-
- widget = gtk_label_new (NULL);
- markup = g_strdup_printf ("<b>%s</b>", _("Memos"));
- gtk_label_set_markup (GTK_LABEL (widget), markup);
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0);
- gtk_widget_show (widget);
- g_free (markup);
-
- widget = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (
- GTK_SCROLLED_WINDOW (widget),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type (
- GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
- gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
- gtk_widget_show (widget);
-
- container = widget;
-
- widget = e_memo_table_new (shell_view, memo_model);
- gtk_container_add (GTK_CONTAINER (container), widget);
- priv->memo_table = g_object_ref (widget);
- gtk_widget_show (widget);
-
- cal_shell_content_load_table_state (
- shell_content, E_TABLE (widget));
-
- e_cal_model_set_default_time_func (
- memo_model, gc_get_default_time, calendar);
-
- g_signal_connect_swapped (
- widget, "open-component",
- G_CALLBACK (e_cal_shell_view_memopad_open_memo),
- shell_view);
- }
+ widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE);
+ gtk_widget_show (widget);
+
+ container = widget;
+
+ widget = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
+ gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0);
+ gtk_widget_show (widget);
+
+ widget = gtk_label_new (NULL);
+ markup = g_strdup_printf ("<b>%s</b>", _("Tasks"));
+ gtk_label_set_markup (GTK_LABEL (widget), markup);
+ gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0);
+ gtk_widget_show (widget);
+ g_free (markup);
+
+ widget = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (
+ GTK_SCROLLED_WINDOW (widget),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type (
+ GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
+ gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
+ gtk_widget_show (widget);
+
+ container = widget;
+
+ widget = e_task_table_new (shell_view, task_model);
+ gtk_container_add (GTK_CONTAINER (container), widget);
+ priv->task_table = g_object_ref (widget);
+ gtk_widget_show (widget);
+
+ cal_shell_content_load_table_state (
+ shell_content, E_TABLE (widget));
+
+ g_signal_connect_swapped (
+ widget, "open-component",
+ G_CALLBACK (e_cal_shell_view_taskpad_open_task),
+ shell_view);
+
+ container = priv->vpaned;
+
+ widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_paned_pack2 (GTK_PANED (container), widget, TRUE, TRUE);
+ gtk_widget_show (widget);
+
+ container = widget;
+
+ widget = gtk_label_new (NULL);
+ markup = g_strdup_printf ("<b>%s</b>", _("Memos"));
+ gtk_label_set_markup (GTK_LABEL (widget), markup);
+ gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0);
+ gtk_widget_show (widget);
+ g_free (markup);
+
+ widget = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (
+ GTK_SCROLLED_WINDOW (widget),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type (
+ GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
+ gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
+ gtk_widget_show (widget);
+
+ container = widget;
+
+ widget = e_memo_table_new (shell_view, memo_model);
+ gtk_container_add (GTK_CONTAINER (container), widget);
+ priv->memo_table = g_object_ref (widget);
+ gtk_widget_show (widget);
+
+ cal_shell_content_load_table_state (
+ shell_content, E_TABLE (widget));
+
+ e_cal_model_set_default_time_func (
+ memo_model, gc_get_default_time, calendar);
+
+ g_signal_connect_swapped (
+ widget, "open-component",
+ G_CALLBACK (e_cal_shell_view_memopad_open_memo),
+ shell_view);
/* Load the view instance. */
@@ -514,21 +503,19 @@ cal_shell_content_constructed (GObject *object)
* The GtkWidget::map() callback below explains why. */
priv->view_instance = view_instance;
- if (!e_shell_get_express_mode (shell)) {
- g_signal_connect_swapped (
- shell_view, "notify::view-id",
- G_CALLBACK (cal_shell_content_notify_view_id_cb),
- object);
+ g_signal_connect_swapped (
+ shell_view, "notify::view-id",
+ G_CALLBACK (cal_shell_content_notify_view_id_cb),
+ object);
- settings = g_settings_new ("org.gnome.evolution.calendar");
+ settings = g_settings_new ("org.gnome.evolution.calendar");
- g_settings_bind (
- settings, "tag-vpane-position",
- priv->vpaned, "proportion",
- G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ settings, "tag-vpane-position",
+ priv->vpaned, "proportion",
+ G_SETTINGS_BIND_DEFAULT);
- g_object_unref (settings);
- }
+ g_object_unref (settings);
if (memo_model)
g_object_unref (memo_model);
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index cc4765ce15..ec87187356 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -45,7 +45,6 @@ struct _ECalShellSidebarPrivate {
GtkWidget *paned;
GtkWidget *selector;
GtkWidget *date_navigator;
- GtkWidget *new_calendar_button;
/* The default client is for ECalModel. It follows the
* sidebar's primary selection, even if the highlighted
@@ -495,11 +494,6 @@ cal_shell_sidebar_dispose (GObject *object)
priv->date_navigator = NULL;
}
- if (priv->new_calendar_button != NULL) {
- g_object_unref (priv->new_calendar_button);
- priv->new_calendar_button = NULL;
- }
-
if (priv->default_client != NULL) {
g_object_unref (priv->default_client);
priv->default_client = NULL;
@@ -562,17 +556,6 @@ cal_shell_sidebar_constructed (GObject *object)
container = widget;
- /* "New Calendar" button is only shown in express mode.
- * ECalShellView will bind the button to an appropriate
- * GtkAction so we don't have to reimplement it here. */
- if (e_shell_get_express_mode (shell)) {
- widget = gtk_button_new ();
- gtk_box_pack_end (
- GTK_BOX (container), widget, FALSE, FALSE, 0);
- priv->new_calendar_button = g_object_ref (widget);
- gtk_widget_show (widget);
- }
-
widget = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (
GTK_SCROLLED_WINDOW (widget),
@@ -826,15 +809,6 @@ e_cal_shell_sidebar_get_default_client (ECalShellSidebar *cal_shell_sidebar)
return (ECalClient *) cal_shell_sidebar->priv->default_client;
}
-GtkWidget *
-e_cal_shell_sidebar_get_new_calendar_button (ECalShellSidebar *cal_shell_sidebar)
-{
- g_return_val_if_fail (
- E_IS_CAL_SHELL_SIDEBAR (cal_shell_sidebar), NULL);
-
- return cal_shell_sidebar->priv->new_calendar_button;
-}
-
ESourceSelector *
e_cal_shell_sidebar_get_selector (ECalShellSidebar *cal_shell_sidebar)
{
diff --git a/modules/calendar/e-cal-shell-sidebar.h b/modules/calendar/e-cal-shell-sidebar.h
index c9be5f64a7..17ccb48df4 100644
--- a/modules/calendar/e-cal-shell-sidebar.h
+++ b/modules/calendar/e-cal-shell-sidebar.h
@@ -89,8 +89,6 @@ ECalendar * e_cal_shell_sidebar_get_date_navigator
(ECalShellSidebar *cal_shell_sidebar);
ECalClient * e_cal_shell_sidebar_get_default_client
(ECalShellSidebar *cal_shell_sidebar);
-GtkWidget * e_cal_shell_sidebar_get_new_calendar_button
- (ECalShellSidebar *cal_shell_sidebar);
ESourceSelector *
e_cal_shell_sidebar_get_selector
(ECalShellSidebar *cal_shell_sidebar);
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index 144245514d..68b26942ce 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -555,7 +555,6 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view)
EMemoTable *memo_table;
ETaskTable *task_table;
ESourceSelector *selector;
- GtkWidget *widget;
ECalModel *model;
gulong handler_id;
gint ii;
@@ -713,13 +712,6 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view)
e_cal_shell_view_update_sidebar (cal_shell_view);
e_cal_shell_view_update_search_filter (cal_shell_view);
- /* Express mode only: Bind the "New Calendar"
- * sidebar button to the appropriate action. */
- widget = e_cal_shell_sidebar_get_new_calendar_button (cal_shell_sidebar);
- if (widget != NULL)
- gtk_activatable_set_related_action (
- GTK_ACTIVATABLE (widget), ACTION (CALENDAR_NEW));
-
/* Keep the ECalModel in sync with the sidebar. */
g_object_bind_property (
shell_sidebar, "default-client",
diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c
index f17a1386b4..312f28f8ab 100644
--- a/modules/calendar/e-cal-shell-view.c
+++ b/modules/calendar/e-cal-shell-view.c
@@ -93,10 +93,6 @@ cal_shell_view_constructed (GObject *object)
e_cal_shell_view_private_constructed (E_CAL_SHELL_VIEW (object));
- /* no search bar in express mode */
- if (e_shell_get_express_mode (e_shell_get_default ()))
- return;
-
shell_window = e_shell_view_get_shell_window (E_SHELL_VIEW (object));
shell_content = e_shell_view_get_shell_content (E_SHELL_VIEW (object));
searchbar = e_cal_shell_content_get_searchbar (E_CAL_SHELL_CONTENT (shell_content));
@@ -347,22 +343,6 @@ cal_shell_view_update_actions (EShellView *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 (shell)) {
- GtkWidget *widget;
-
- /* 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);
-
- /* Hide the main menu. */
- widget = e_shell_window_get_managed_widget (
- shell_window, "/main-menu");
- gtk_widget_hide (widget);
- }
-
registry = e_shell_get_registry (shell);
source = e_source_registry_ref_default_mail_identity (registry);
has_mail_identity = (source != NULL);
@@ -555,13 +535,6 @@ cal_shell_view_class_init (ECalShellViewClass *class,
shell_view_class->new_shell_sidebar = e_cal_shell_sidebar_new;
shell_view_class->execute_search = cal_shell_view_execute_search;
shell_view_class->update_actions = cal_shell_view_update_actions;
-
- /* 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;
-
}
static void