aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar')
-rw-r--r--modules/calendar/e-memo-shell-content.c59
-rw-r--r--modules/calendar/e-memo-shell-content.h7
-rw-r--r--modules/calendar/e-memo-shell-view-actions.c37
-rw-r--r--modules/calendar/e-memo-shell-view-actions.h2
-rw-r--r--modules/calendar/e-memo-shell-view-private.c7
-rw-r--r--modules/calendar/e-memo-shell-view.c13
-rw-r--r--modules/calendar/e-task-shell-content.c59
-rw-r--r--modules/calendar/e-task-shell-content.h7
-rw-r--r--modules/calendar/e-task-shell-view-actions.c37
-rw-r--r--modules/calendar/e-task-shell-view-actions.h2
-rw-r--r--modules/calendar/e-task-shell-view-private.c7
-rw-r--r--modules/calendar/e-task-shell-view.c13
12 files changed, 160 insertions, 90 deletions
diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c
index 852c0bbf42..e34af1fbf8 100644
--- a/modules/calendar/e-memo-shell-content.c
+++ b/modules/calendar/e-memo-shell-content.c
@@ -29,8 +29,10 @@
#include "shell/e-shell-utils.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/misc/e-paned.h"
+#include "widgets/misc/e-preview-pane.h"
#include "calendar/gui/comp-util.h"
+#include "calendar/gui/e-cal-component-preview.h"
#include "calendar/gui/e-cal-model-memos.h"
#include "calendar/gui/e-memo-table.h"
@@ -50,7 +52,7 @@
struct _EMemoShellContentPrivate {
GtkWidget *paned;
GtkWidget *memo_table;
- GtkWidget *memo_preview;
+ GtkWidget *preview_pane;
ECalModel *memo_model;
GalViewInstance *view_instance;
@@ -192,10 +194,15 @@ memo_shell_content_cursor_change_cb (EMemoShellContent *memo_shell_content,
ECalModel *memo_model;
ECalModelComponent *comp_data;
ECalComponent *comp;
+ EPreviewPane *preview_pane;
+ EWebView *web_view;
const gchar *uid;
memo_model = e_memo_shell_content_get_memo_model (memo_shell_content);
- memo_preview = e_memo_shell_content_get_memo_preview (memo_shell_content);
+ preview_pane = e_memo_shell_content_get_preview_pane (memo_shell_content);
+
+ web_view = e_preview_pane_get_web_view (preview_pane);
+ memo_preview = E_CAL_COMPONENT_PREVIEW (web_view);
if (e_table_selected_count (table) != 1) {
e_cal_component_preview_clear (memo_preview);
@@ -223,8 +230,13 @@ memo_shell_content_selection_change_cb (EMemoShellContent *memo_shell_content,
ETable *table)
{
ECalComponentPreview *memo_preview;
+ EPreviewPane *preview_pane;
+ EWebView *web_view;
+
+ preview_pane = e_memo_shell_content_get_preview_pane (memo_shell_content);
- memo_preview = e_memo_shell_content_get_memo_preview (memo_shell_content);
+ web_view = e_preview_pane_get_web_view (preview_pane);
+ memo_preview = E_CAL_COMPONENT_PREVIEW (web_view);
/* XXX Old code emits a "selection-changed" signal here. */
@@ -347,9 +359,9 @@ memo_shell_content_dispose (GObject *object)
priv->memo_table = NULL;
}
- if (priv->memo_preview != NULL) {
- g_object_unref (priv->memo_preview);
- priv->memo_preview = NULL;
+ if (priv->preview_pane != NULL) {
+ g_object_unref (priv->preview_pane);
+ priv->preview_pane = NULL;
}
if (priv->memo_model != NULL) {
@@ -445,25 +457,10 @@ memo_shell_content_constructed (GObject *object)
container = priv->paned;
- 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_paned_pack2 (GTK_PANED (container), widget, FALSE, FALSE);
- gtk_widget_show (widget);
-
- e_binding_new (object, "preview-visible", widget, "visible");
-
- container = widget;
-
widget = e_cal_component_preview_new ();
e_cal_component_preview_set_default_timezone (
E_CAL_COMPONENT_PREVIEW (widget), timezone);
e_shell_configure_web_view (shell, E_WEB_VIEW (widget));
- gtk_container_add (GTK_CONTAINER (container), widget);
- priv->memo_preview = g_object_ref (widget);
gtk_widget_show (widget);
g_signal_connect_swapped (
@@ -471,6 +468,13 @@ memo_shell_content_constructed (GObject *object)
G_CALLBACK (e_shell_taskbar_set_message),
shell_taskbar);
+ widget = e_preview_pane_new (E_WEB_VIEW (widget));
+ gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, FALSE);
+ priv->preview_pane = g_object_ref (widget);
+ gtk_widget_show (widget);
+
+ e_binding_new (object, "preview-visible", widget, "visible");
+
/* Configure the memo table. */
e_table_set_state (
@@ -681,23 +685,22 @@ e_memo_shell_content_get_memo_model (EMemoShellContent *memo_shell_content)
return memo_shell_content->priv->memo_model;
}
-ECalComponentPreview *
-e_memo_shell_content_get_memo_preview (EMemoShellContent *memo_shell_content)
+EMemoTable *
+e_memo_shell_content_get_memo_table (EMemoShellContent *memo_shell_content)
{
g_return_val_if_fail (
E_IS_MEMO_SHELL_CONTENT (memo_shell_content), NULL);
- return E_CAL_COMPONENT_PREVIEW (
- memo_shell_content->priv->memo_preview);
+ return E_MEMO_TABLE (memo_shell_content->priv->memo_table);
}
-EMemoTable *
-e_memo_shell_content_get_memo_table (EMemoShellContent *memo_shell_content)
+EPreviewPane *
+e_memo_shell_content_get_preview_pane (EMemoShellContent *memo_shell_content)
{
g_return_val_if_fail (
E_IS_MEMO_SHELL_CONTENT (memo_shell_content), NULL);
- return E_MEMO_TABLE (memo_shell_content->priv->memo_table);
+ return E_PREVIEW_PANE (memo_shell_content->priv->preview_pane);
}
gboolean
diff --git a/modules/calendar/e-memo-shell-content.h b/modules/calendar/e-memo-shell-content.h
index 16aae229b2..4567a94aa9 100644
--- a/modules/calendar/e-memo-shell-content.h
+++ b/modules/calendar/e-memo-shell-content.h
@@ -27,9 +27,9 @@
#include <shell/e-shell-view.h>
#include <calendar/gui/e-memo-table.h>
-#include <calendar/gui/e-cal-component-preview.h>
#include <menus/gal-view-instance.h>
+#include <misc/e-preview-pane.h>
/* Standard GObject macros */
#define E_TYPE_MEMO_SHELL_CONTENT \
@@ -78,11 +78,10 @@ void e_memo_shell_content_register_type
GtkWidget * e_memo_shell_content_new(EShellView *shell_view);
ECalModel * e_memo_shell_content_get_memo_model
(EMemoShellContent *memo_shell_conent);
-ECalComponentPreview *
- e_memo_shell_content_get_memo_preview
- (EMemoShellContent *memo_shell_content);
EMemoTable * e_memo_shell_content_get_memo_table
(EMemoShellContent *memo_shell_content);
+EPreviewPane * e_memo_shell_content_get_preview_pane
+ (EMemoShellContent *memo_shell_content);
gboolean e_memo_shell_content_get_preview_visible
(EMemoShellContent *memo_shell_content);
void e_memo_shell_content_set_preview_visible
diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c
index 1c0a7ef9ef..24aced8528 100644
--- a/modules/calendar/e-memo-shell-view-actions.c
+++ b/modules/calendar/e-memo-shell-view-actions.c
@@ -56,6 +56,19 @@ action_memo_delete_cb (GtkAction *action,
}
static void
+action_memo_find_cb (GtkAction *action,
+ EMemoShellView *memo_shell_view)
+{
+ EMemoShellContent *memo_shell_content;
+ EPreviewPane *preview_pane;
+
+ memo_shell_content = memo_shell_view->priv->memo_shell_content;
+ preview_pane = e_memo_shell_content_get_preview_pane (memo_shell_content);
+
+ e_preview_pane_show_search_bar (preview_pane);
+}
+
+static void
action_memo_forward_cb (GtkAction *action,
EMemoShellView *memo_shell_view)
{
@@ -564,6 +577,13 @@ static GtkActionEntry memo_entries[] = {
N_("Delete selected memos"),
G_CALLBACK (action_memo_delete_cb) },
+ { "memo-find",
+ GTK_STOCK_FIND,
+ N_("_Find in Memo..."),
+ "<Shift><Control>f",
+ N_("Search for text in the displayed memo"),
+ G_CALLBACK (action_memo_find_cb) },
+
{ "memo-forward",
"mail-forward",
N_("_Forward as iCalendar..."),
@@ -831,7 +851,8 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view)
EShellView *shell_view;
EShellWindow *shell_window;
EShellSearchbar *searchbar;
- ECalComponentPreview *memo_preview;
+ EPreviewPane *preview_pane;
+ EWebView *web_view;
GtkActionGroup *action_group;
GConfBridge *bridge;
GtkAction *action;
@@ -843,7 +864,8 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view)
memo_shell_content = memo_shell_view->priv->memo_shell_content;
searchbar = e_memo_shell_content_get_searchbar (memo_shell_content);
- memo_preview = e_memo_shell_content_get_memo_preview (memo_shell_content);
+ preview_pane = e_memo_shell_content_get_preview_pane (memo_shell_content);
+ web_view = e_preview_pane_get_web_view (preview_pane);
/* Memo Actions */
action_group = ACTION_GROUP (MEMOS);
@@ -920,14 +942,9 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view)
ACTION (MEMO_PREVIEW), "active",
ACTION (MEMO_VIEW_VERTICAL), "sensitive");
- e_web_view_set_open_proxy (
- E_WEB_VIEW (memo_preview), ACTION (MEMO_OPEN));
-
- e_web_view_set_print_proxy (
- E_WEB_VIEW (memo_preview), ACTION (MEMO_PRINT));
-
- e_web_view_set_save_as_proxy (
- E_WEB_VIEW (memo_preview), ACTION (MEMO_SAVE_AS));
+ e_web_view_set_open_proxy (web_view, ACTION (MEMO_OPEN));
+ e_web_view_set_print_proxy (web_view, ACTION (MEMO_PRINT));
+ e_web_view_set_save_as_proxy (web_view, ACTION (MEMO_SAVE_AS));
}
void
diff --git a/modules/calendar/e-memo-shell-view-actions.h b/modules/calendar/e-memo-shell-view-actions.h
index 5b49ca06b1..c9d144b5d4 100644
--- a/modules/calendar/e-memo-shell-view-actions.h
+++ b/modules/calendar/e-memo-shell-view-actions.h
@@ -27,6 +27,8 @@
/* Memo Actions */
#define E_SHELL_WINDOW_ACTION_MEMO_DELETE(window) \
E_SHELL_WINDOW_ACTION ((window), "memo-delete")
+#define E_SHELL_WINDOW_ACTION_MEMO_FIND(window) \
+ E_SHELL_WINDOW_ACTION ((window), "memo-find")
#define E_SHELL_WINDOW_ACTION_MEMO_FORWARD(window) \
E_SHELL_WINDOW_ACTION ((window), "memo-forward")
#define E_SHELL_WINDOW_ACTION_MEMO_NEW(window) \
diff --git a/modules/calendar/e-memo-shell-view-private.c b/modules/calendar/e-memo-shell-view-private.c
index 583af2af17..9e2be0fe7d 100644
--- a/modules/calendar/e-memo-shell-view-private.c
+++ b/modules/calendar/e-memo-shell-view-private.c
@@ -430,18 +430,23 @@ e_memo_shell_view_update_timezone (EMemoShellView *memo_shell_view)
EMemoShellContent *memo_shell_content;
EMemoShellSidebar *memo_shell_sidebar;
ECalComponentPreview *memo_preview;
+ EPreviewPane *preview_pane;
+ EWebView *web_view;
icaltimezone *timezone;
ECalModel *model;
GList *clients, *iter;
memo_shell_content = memo_shell_view->priv->memo_shell_content;
- memo_preview = e_memo_shell_content_get_memo_preview (memo_shell_content);
+ preview_pane = e_memo_shell_content_get_preview_pane (memo_shell_content);
model = e_memo_shell_content_get_memo_model (memo_shell_content);
timezone = e_cal_model_get_timezone (model);
memo_shell_sidebar = memo_shell_view->priv->memo_shell_sidebar;
clients = e_memo_shell_sidebar_get_clients (memo_shell_sidebar);
+ web_view = e_preview_pane_get_web_view (preview_pane);
+ memo_preview = E_CAL_COMPONENT_PREVIEW (web_view);
+
for (iter = clients; iter != NULL; iter = iter->next) {
ECal *client = iter->data;
diff --git a/modules/calendar/e-memo-shell-view.c b/modules/calendar/e-memo-shell-view.c
index 07a58aa1c9..870d5aedc8 100644
--- a/modules/calendar/e-memo-shell-view.c
+++ b/modules/calendar/e-memo-shell-view.c
@@ -61,7 +61,9 @@ memo_shell_view_execute_search (EShellView *shell_view)
EActionComboBox *combo_box;
GtkRadioAction *action;
ECalComponentPreview *memo_preview;
+ EPreviewPane *preview_pane;
EMemoTable *memo_table;
+ EWebView *web_view;
ECalModel *model;
gchar *query;
gchar *temp;
@@ -155,8 +157,11 @@ memo_shell_view_execute_search (EShellView *shell_view)
e_cal_model_set_search_query (model, query);
g_free (query);
- memo_preview =
- e_memo_shell_content_get_memo_preview (memo_shell_content);
+ preview_pane =
+ e_memo_shell_content_get_preview_pane (memo_shell_content);
+
+ web_view = e_preview_pane_get_web_view (preview_pane);
+ memo_preview = E_CAL_COMPONENT_PREVIEW (web_view);
e_cal_component_preview_clear (memo_preview);
}
@@ -220,6 +225,10 @@ memo_shell_view_update_actions (EShellView *shell_view)
label = _("Delete Memo");
g_object_set (action, "label", label, NULL);
+ action = ACTION (MEMO_FIND);
+ sensitive = single_memo_selected;
+ gtk_action_set_sensitive (action, sensitive);
+
action = ACTION (MEMO_FORWARD);
sensitive = single_memo_selected;
gtk_action_set_sensitive (action, sensitive);
diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c
index 11bc28af62..fd76fe7513 100644
--- a/modules/calendar/e-task-shell-content.c
+++ b/modules/calendar/e-task-shell-content.c
@@ -29,8 +29,10 @@
#include "shell/e-shell-utils.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/misc/e-paned.h"
+#include "widgets/misc/e-preview-pane.h"
#include "calendar/gui/comp-util.h"
+#include "calendar/gui/e-cal-component-preview.h"
#include "calendar/gui/e-cal-model-tasks.h"
#define E_TASK_SHELL_CONTENT_GET_PRIVATE(obj) \
@@ -50,7 +52,7 @@
struct _ETaskShellContentPrivate {
GtkWidget *paned;
GtkWidget *task_table;
- GtkWidget *task_preview;
+ GtkWidget *preview_pane;
ECalModel *task_model;
GalViewInstance *view_instance;
@@ -192,10 +194,15 @@ task_shell_content_cursor_change_cb (ETaskShellContent *task_shell_content,
ECalModel *task_model;
ECalModelComponent *comp_data;
ECalComponent *comp;
+ EPreviewPane *preview_pane;
+ EWebView *web_view;
const gchar *uid;
task_model = e_task_shell_content_get_task_model (task_shell_content);
- task_preview = e_task_shell_content_get_task_preview (task_shell_content);
+ preview_pane = e_task_shell_content_get_preview_pane (task_shell_content);
+
+ web_view = e_preview_pane_get_web_view (preview_pane);
+ task_preview = E_CAL_COMPONENT_PREVIEW (web_view);
if (e_table_selected_count (table) != 1) {
e_cal_component_preview_clear (task_preview);
@@ -223,8 +230,13 @@ task_shell_content_selection_change_cb (ETaskShellContent *task_shell_content,
ETable *table)
{
ECalComponentPreview *task_preview;
+ EPreviewPane *preview_pane;
+ EWebView *web_view;
+
+ preview_pane = e_task_shell_content_get_preview_pane (task_shell_content);
- task_preview = e_task_shell_content_get_task_preview (task_shell_content);
+ web_view = e_preview_pane_get_web_view (preview_pane);
+ task_preview = E_CAL_COMPONENT_PREVIEW (web_view);
if (e_table_selected_count (table) != 1)
e_cal_component_preview_clear (task_preview);
@@ -345,9 +357,9 @@ task_shell_content_dispose (GObject *object)
priv->task_table = NULL;
}
- if (priv->task_preview != NULL) {
- g_object_unref (priv->task_preview);
- priv->task_preview = NULL;
+ if (priv->preview_pane != NULL) {
+ g_object_unref (priv->preview_pane);
+ priv->preview_pane = NULL;
}
if (priv->task_model != NULL) {
@@ -442,25 +454,10 @@ task_shell_content_constructed (GObject *object)
container = priv->paned;
- 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_paned_pack2 (GTK_PANED (container), widget, FALSE, FALSE);
- gtk_widget_show (widget);
-
- e_binding_new (object, "preview-visible", widget, "visible");
-
- container = widget;
-
widget = e_cal_component_preview_new ();
e_cal_component_preview_set_default_timezone (
E_CAL_COMPONENT_PREVIEW (widget), timezone);
e_shell_configure_web_view (shell, E_WEB_VIEW (widget));
- gtk_container_add (GTK_CONTAINER (container), widget);
- priv->task_preview = g_object_ref (widget);
gtk_widget_show (widget);
g_signal_connect_swapped (
@@ -468,6 +465,13 @@ task_shell_content_constructed (GObject *object)
G_CALLBACK (e_shell_taskbar_set_message),
shell_taskbar);
+ widget = e_preview_pane_new (E_WEB_VIEW (widget));
+ gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, FALSE);
+ priv->preview_pane = g_object_ref (widget);
+ gtk_widget_show (widget);
+
+ e_binding_new (object, "preview-visible", widget, "visible");
+
/* Configure the task table. */
e_table_set_state (
@@ -703,23 +707,22 @@ e_task_shell_content_get_task_model (ETaskShellContent *task_shell_content)
return task_shell_content->priv->task_model;
}
-ECalComponentPreview *
-e_task_shell_content_get_task_preview (ETaskShellContent *task_shell_content)
+ETaskTable *
+e_task_shell_content_get_task_table (ETaskShellContent *task_shell_content)
{
g_return_val_if_fail (
E_IS_TASK_SHELL_CONTENT (task_shell_content), NULL);
- return E_CAL_COMPONENT_PREVIEW (
- task_shell_content->priv->task_preview);
+ return E_TASK_TABLE (task_shell_content->priv->task_table);
}
-ETaskTable *
-e_task_shell_content_get_task_table (ETaskShellContent *task_shell_content)
+EPreviewPane *
+e_task_shell_content_get_preview_pane (ETaskShellContent *task_shell_content)
{
g_return_val_if_fail (
E_IS_TASK_SHELL_CONTENT (task_shell_content), NULL);
- return E_TASK_TABLE (task_shell_content->priv->task_table);
+ return E_PREVIEW_PANE (task_shell_content->priv->preview_pane);
}
gboolean
diff --git a/modules/calendar/e-task-shell-content.h b/modules/calendar/e-task-shell-content.h
index dd39f8c6ce..d4e67d1b95 100644
--- a/modules/calendar/e-task-shell-content.h
+++ b/modules/calendar/e-task-shell-content.h
@@ -27,10 +27,10 @@
#include <shell/e-shell-view.h>
#include <calendar/gui/e-cal-model.h>
-#include <calendar/gui/e-cal-component-preview.h>
#include <calendar/gui/e-task-table.h>
#include <menus/gal-view-instance.h>
+#include <misc/e-preview-pane.h>
/* Standard GObject macros */
#define E_TYPE_TASK_SHELL_CONTENT \
@@ -82,11 +82,10 @@ void e_task_shell_content_register_type
GtkWidget * e_task_shell_content_new(EShellView *shell_view);
ECalModel * e_task_shell_content_get_task_model
(ETaskShellContent *task_shell_content);
-ECalComponentPreview *
- e_task_shell_content_get_task_preview
- (ETaskShellContent *task_shell_content);
ETaskTable * e_task_shell_content_get_task_table
(ETaskShellContent *task_shell_content);
+EPreviewPane * e_task_shell_content_get_preview_pane
+ (ETaskShellContent *task_shell_content);
gboolean e_task_shell_content_get_preview_visible
(ETaskShellContent *task_shell_content);
void e_task_shell_content_set_preview_visible
diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c
index bd3d0627ff..c18882dd2b 100644
--- a/modules/calendar/e-task-shell-view-actions.c
+++ b/modules/calendar/e-task-shell-view-actions.c
@@ -87,6 +87,19 @@ action_task_delete_cb (GtkAction *action,
}
static void
+action_task_find_cb (GtkAction *action,
+ ETaskShellView *task_shell_view)
+{
+ ETaskShellContent *task_shell_content;
+ EPreviewPane *preview_pane;
+
+ task_shell_content = task_shell_view->priv->task_shell_content;
+ preview_pane = e_task_shell_content_get_preview_pane (task_shell_content);
+
+ e_preview_pane_show_search_bar (preview_pane);
+}
+
+static void
action_task_forward_cb (GtkAction *action,
ETaskShellView *task_shell_view)
{
@@ -688,6 +701,13 @@ static GtkActionEntry task_entries[] = {
N_("Delete selected tasks"),
G_CALLBACK (action_task_delete_cb) },
+ { "task-find",
+ GTK_STOCK_FIND,
+ N_("_Find in Task..."),
+ "<Shift><Control>f",
+ N_("Search for text in the displayed task"),
+ G_CALLBACK (action_task_find_cb) },
+
{ "task-forward",
"mail-forward",
N_("_Forward as iCalendar..."),
@@ -1030,7 +1050,8 @@ e_task_shell_view_actions_init (ETaskShellView *task_shell_view)
EShellView *shell_view;
EShellWindow *shell_window;
EShellSearchbar *searchbar;
- ECalComponentPreview *task_preview;
+ EPreviewPane *preview_pane;
+ EWebView *web_view;
GtkActionGroup *action_group;
GConfBridge *bridge;
GtkAction *action;
@@ -1042,7 +1063,8 @@ e_task_shell_view_actions_init (ETaskShellView *task_shell_view)
task_shell_content = task_shell_view->priv->task_shell_content;
searchbar = e_task_shell_content_get_searchbar (task_shell_content);
- task_preview = e_task_shell_content_get_task_preview (task_shell_content);
+ preview_pane = e_task_shell_content_get_preview_pane (task_shell_content);
+ web_view = e_preview_pane_get_web_view (preview_pane);
/* Task Actions */
action_group = ACTION_GROUP (TASKS);
@@ -1119,14 +1141,9 @@ e_task_shell_view_actions_init (ETaskShellView *task_shell_view)
ACTION (TASK_PREVIEW), "active",
ACTION (TASK_VIEW_VERTICAL), "sensitive");
- e_web_view_set_open_proxy (
- E_WEB_VIEW (task_preview), ACTION (TASK_OPEN));
-
- e_web_view_set_print_proxy (
- E_WEB_VIEW (task_preview), ACTION (TASK_PRINT));
-
- e_web_view_set_save_as_proxy (
- E_WEB_VIEW (task_preview), ACTION (TASK_SAVE_AS));
+ e_web_view_set_open_proxy (web_view, ACTION (TASK_OPEN));
+ e_web_view_set_print_proxy (web_view, ACTION (TASK_PRINT));
+ e_web_view_set_save_as_proxy (web_view, ACTION (TASK_SAVE_AS));
}
void
diff --git a/modules/calendar/e-task-shell-view-actions.h b/modules/calendar/e-task-shell-view-actions.h
index f323fb38f9..afa9fe3e1b 100644
--- a/modules/calendar/e-task-shell-view-actions.h
+++ b/modules/calendar/e-task-shell-view-actions.h
@@ -29,6 +29,8 @@
E_SHELL_WINDOW_ACTION ((window), "task-assign")
#define E_SHELL_WINDOW_ACTION_TASK_DELETE(window) \
E_SHELL_WINDOW_ACTION ((window), "task-delete")
+#define E_SHELL_WINDOW_ACTION_TASK_FIND(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-find")
#define E_SHELL_WINDOW_ACTION_TASK_FORWARD(window) \
E_SHELL_WINDOW_ACTION ((window), "task-forward")
#define E_SHELL_WINDOW_ACTION_TASK_MARK_COMPLETE(window) \
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c
index 6704a3b4c0..4b04185d0d 100644
--- a/modules/calendar/e-task-shell-view-private.c
+++ b/modules/calendar/e-task-shell-view-private.c
@@ -580,18 +580,23 @@ e_task_shell_view_update_timezone (ETaskShellView *task_shell_view)
ETaskShellContent *task_shell_content;
ETaskShellSidebar *task_shell_sidebar;
ECalComponentPreview *task_preview;
+ EPreviewPane *preview_pane;
+ EWebView *web_view;
icaltimezone *timezone;
ECalModel *model;
GList *clients, *iter;
task_shell_content = task_shell_view->priv->task_shell_content;
- task_preview = e_task_shell_content_get_task_preview (task_shell_content);
+ preview_pane = e_task_shell_content_get_preview_pane (task_shell_content);
model = e_task_shell_content_get_task_model (task_shell_content);
timezone = e_cal_model_get_timezone (model);
task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
clients = e_task_shell_sidebar_get_clients (task_shell_sidebar);
+ web_view = e_preview_pane_get_web_view (preview_pane);
+ task_preview = E_CAL_COMPONENT_PREVIEW (web_view);
+
for (iter = clients; iter != NULL; iter = iter->next) {
ECal *client = iter->data;
diff --git a/modules/calendar/e-task-shell-view.c b/modules/calendar/e-task-shell-view.c
index 36b9db5b56..b2146f5e59 100644
--- a/modules/calendar/e-task-shell-view.c
+++ b/modules/calendar/e-task-shell-view.c
@@ -100,7 +100,9 @@ task_shell_view_execute_search (EShellView *shell_view)
EActionComboBox *combo_box;
GtkRadioAction *action;
ECalComponentPreview *task_preview;
+ EPreviewPane *preview_pane;
ETaskTable *task_table;
+ EWebView *web_view;
ECalModel *model;
time_t start_range;
time_t end_range;
@@ -268,8 +270,11 @@ task_shell_view_execute_search (EShellView *shell_view)
e_cal_model_set_search_query (model, query);
g_free (query);
- task_preview =
- e_task_shell_content_get_task_preview (task_shell_content);
+ preview_pane =
+ e_task_shell_content_get_preview_pane (task_shell_content);
+
+ web_view = e_preview_pane_get_web_view (preview_pane);
+ task_preview = E_CAL_COMPONENT_PREVIEW (web_view);
e_cal_component_preview_clear (task_preview);
}
@@ -348,6 +353,10 @@ task_shell_view_update_actions (EShellView *shell_view)
label = _("Delete Task");
g_object_set (action, "label", label, NULL);
+ action = ACTION (TASK_FIND);
+ sensitive = single_task_selected;
+ gtk_action_set_sensitive (action, sensitive);
+
action = ACTION (TASK_FORWARD);
sensitive = single_task_selected;
gtk_action_set_sensitive (action, sensitive);