diff options
author | jacob berkman <jacob@ximian.com> | 2001-06-26 05:12:10 +0800 |
---|---|---|
committer | Jacob Berkman <jberkman@src.gnome.org> | 2001-06-26 05:12:10 +0800 |
commit | 57db15334b2ea42d619024a48bda764af46d0e2a (patch) | |
tree | bcedce63814055decf0206e29deb9fec968148b6 /mail/folder-browser-factory.c | |
parent | 4d5ccfcb23509552645597c073fd0fa311701ded (diff) | |
download | gsoc2013-evolution-57db15334b2ea42d619024a48bda764af46d0e2a.tar.gz gsoc2013-evolution-57db15334b2ea42d619024a48bda764af46d0e2a.tar.zst gsoc2013-evolution-57db15334b2ea42d619024a48bda764af46d0e2a.zip |
sync folders after we've gotten mail
2001-06-25 jacob berkman <jacob@ximian.com>
* mail-send-recv.c (free_send_data): sync folders after we've
gotten mail
* folder-browser-factory.c (control_activate): set the ui
component on the folder browser
(control_activate): update the view preview item
(control_deactivate): don't sync the folder here
(control_deactivate): unset the ui component of the folder browser
* mail-callbacks.c (toggle_flags): stuff from jleach to add an
importance keybinding
(mark_as_important): ditto
(toggle_as_important): again
* mail-config.c (mail_config_get_show_preview):
(mail_config_set_show_preview): basically a copy of
get_thread_list() but for the preview pane
* folder-browser.c (folder_browser_destroy): unref the our ui
component
(folder_browser_set_ui_component): new function for setting the ui
component
(save_cursor_pos):
(set_cursor_pos): try to show the selected row when the preview
pane is shown
(folder_browser_set_message_preview): implement
(folder_browser_toggle_preview): toggle the preview (duh)
(on_key_press): add keybindings for marking as important (!), and
hiding the preview pane (q)
(etree_key): clean up a little bit, and make enter either show the
preview pane or open the message
(fb_resize_cb): only save the paned size if the preview is alread
shown
(folder_browser_gui_init): pass ourselves to fb_resize_cb
(on_message_selected): only add the timeout if the preview is
shown
svn path=/trunk/; revision=10491
Diffstat (limited to 'mail/folder-browser-factory.c')
-rw-r--r-- | mail/folder-browser-factory.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c index 5f959cdc50..70e149a6bd 100644 --- a/mail/folder-browser-factory.c +++ b/mail/folder-browser-factory.c @@ -76,6 +76,7 @@ BonoboUIVerb verbs [] = { BONOBO_UI_UNSAFE_VERB ("MessageMarkAllAsRead", mark_all_as_seen), BONOBO_UI_UNSAFE_VERB ("MessageMarkAsRead", mark_as_seen), BONOBO_UI_UNSAFE_VERB ("MessageMarkAsUnRead", mark_as_unseen), + BONOBO_UI_UNSAFE_VERB ("MessageMarkAsImportant", mark_as_important), BONOBO_UI_UNSAFE_VERB ("MessageMove", move_msg), BONOBO_UI_UNSAFE_VERB ("MessageOpen", open_message), BONOBO_UI_UNSAFE_VERB ("MessageReplyAll", reply_to_all), @@ -245,6 +246,7 @@ control_activate (BonoboControl *control, g_return_if_fail (container != CORBA_OBJECT_NIL); folder_browser = bonobo_control_get_widget (control); + folder_browser_set_ui_component (FOLDER_BROWSER (folder_browser), uic); bonobo_ui_component_add_verb_list_with_data ( uic, verbs, folder_browser); @@ -254,6 +256,12 @@ control_activate (BonoboControl *control, bonobo_ui_util_set_ui ( uic, EVOLUTION_DATADIR, "evolution-mail.xml", "evolution-mail"); + + state = mail_config_get_show_preview (FOLDER_BROWSER (folder_browser)->uri); + bonobo_ui_component_set_prop (uic, "/commands/ViewPreview", "state", state ? "1" : "0", NULL); + bonobo_ui_component_add_listener (uic, "ViewPreview", folder_browser_toggle_preview, folder_browser); + /* FIXME: this kind of bypasses bonobo but seems the only way when we change components */ + folder_browser_toggle_preview (uic, "", Bonobo_UIComponent_STATE_CHANGED, state ? "1" : "0", folder_browser); state = mail_config_get_thread_list (FOLDER_BROWSER (folder_browser)->uri); bonobo_ui_component_set_prop (uic, "/commands/ViewThreaded", "state", state ? "1" : "0", NULL); @@ -307,9 +315,15 @@ control_deactivate (BonoboControl *control, bonobo_ui_component_rm (uic, "/", NULL); bonobo_ui_component_unset_container (uic); + /* turn this back on to get the old (broken) behaviour of + * synching when leaving a folder + */ +#if 0 if (fb->folder) mail_sync_folder (fb->folder, NULL, NULL); +#endif + folder_browser_set_ui_component (fb, NULL); folder_browser_discard_view_menus (fb); } |