From 39ee1b7890e06779b47f0fc11925d12caa206c39 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 17 Jan 2010 17:47:08 -0500 Subject: Give all preview panes a search bar. Use Shift+Ctrl+F as the accelerator for consistency with the mailer. --- modules/calendar/e-memo-shell-view-actions.c | 37 ++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'modules/calendar/e-memo-shell-view-actions.c') 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 @@ -55,6 +55,19 @@ action_memo_delete_cb (GtkAction *action, e_selectable_delete_selection (E_SELECTABLE (memo_table)); } +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..."), + "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 -- cgit v1.2.3