diff options
author | Not Zed <NotZed@Ximian.com> | 2003-12-01 13:52:38 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-12-01 13:52:38 +0800 |
commit | 6d9d9416e2dc01ac873ef1af274c56b2e00aa4ca (patch) | |
tree | 26a58c4b574ef20e83e8dea8e1c6387a81b67db3 /mail/em-folder-browser.c | |
parent | acf708333955aa2c7ff8ac1839011c091750879a (diff) | |
download | gsoc2013-evolution-6d9d9416e2dc01ac873ef1af274c56b2e00aa4ca.tar.gz gsoc2013-evolution-6d9d9416e2dc01ac873ef1af274c56b2e00aa4ca.tar.zst gsoc2013-evolution-6d9d9416e2dc01ac873ef1af274c56b2e00aa4ca.zip |
override the em-folder-view impl, and handle the search bar properly. For
2003-12-01 Not Zed <NotZed@Ximian.com>
* em-folder-browser.c (emfb_edit_cut, emfb_edit_copy)
(emfb_edit_paste): override the em-folder-view impl, and handle
the search bar properly. For #48746.
* mail-security.glade: added some padding to the security details
frames.
svn path=/trunk/; revision=23514
Diffstat (limited to 'mail/em-folder-browser.c')
-rw-r--r-- | mail/em-folder-browser.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index 37682c298c..3a1bae2f16 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -440,6 +440,45 @@ emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, /* ********************************************************************** */ static void +emfb_edit_cut(BonoboUIComponent *uid, void *data, const char *path) +{ + EMFolderBrowser *emfb = data; + + /* TODO: pity we can't sucblass this method, ugh, virtualise it? */ + + if (GTK_WIDGET_HAS_FOCUS(((ESearchBar *)emfb->search)->entry)) + gtk_editable_cut_clipboard((GtkEditable *)((ESearchBar *)emfb->search)->entry); + else if (message_list_has_primary_selection(emfb->view.list)) + message_list_copy(emfb->view.list, TRUE); + else if (emfb->view.preview_active) + em_format_html_display_cut(emfb->view.preview); +} + +static void +emfb_edit_copy(BonoboUIComponent *uid, void *data, const char *path) +{ + EMFolderBrowser *emfb = data; + + if (GTK_WIDGET_HAS_FOCUS(((ESearchBar *)emfb->search)->entry)) + gtk_editable_copy_clipboard((GtkEditable *)((ESearchBar *)emfb->search)->entry); + else if (message_list_has_primary_selection(emfb->view.list)) + message_list_copy(emfb->view.list, FALSE); + else if (emfb->view.preview_active) + em_format_html_display_copy(emfb->view.preview); +} + +static void +emfb_edit_paste(BonoboUIComponent *uid, void *data, const char *path) +{ + EMFolderBrowser *emfb = data; + + if (GTK_WIDGET_HAS_FOCUS(((ESearchBar *)emfb->search)->entry)) + gtk_editable_paste_clipboard((GtkEditable *)((ESearchBar *)emfb->search)->entry); + else + message_list_paste(emfb->view.list); +} + +static void emfb_edit_invert_selection(BonoboUIComponent *uid, void *data, const char *path) { EMFolderView *emfv = data; @@ -600,6 +639,10 @@ emfb_tools_vfolders(BonoboUIComponent *uid, void *data, const char *path) } static BonoboUIVerb emfb_verbs[] = { + BONOBO_UI_UNSAFE_VERB ("EditCut", emfb_edit_cut), + BONOBO_UI_UNSAFE_VERB ("EditCopy", emfb_edit_copy), + BONOBO_UI_UNSAFE_VERB ("EditPaste", emfb_edit_paste), + BONOBO_UI_UNSAFE_VERB ("EditInvertSelection", emfb_edit_invert_selection), BONOBO_UI_UNSAFE_VERB ("EditSelectAll", emfb_edit_select_all), BONOBO_UI_UNSAFE_VERB ("EditSelectThread", emfb_edit_select_thread), |