diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2008-08-18 12:37:15 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-08-18 12:37:15 +0800 |
commit | f19618ac7f06b7f9e4bb2d7ce2e75de6e8554737 (patch) | |
tree | d6481a36d0a743a7b7ccbd249c94f76cd707d6ae /mail | |
parent | fce40453c9aece0fcdd523fe80ff1cc573747844 (diff) | |
download | gsoc2013-evolution-f19618ac7f06b7f9e4bb2d7ce2e75de6e8554737.tar gsoc2013-evolution-f19618ac7f06b7f9e4bb2d7ce2e75de6e8554737.tar.gz gsoc2013-evolution-f19618ac7f06b7f9e4bb2d7ce2e75de6e8554737.tar.bz2 gsoc2013-evolution-f19618ac7f06b7f9e4bb2d7ce2e75de6e8554737.tar.lz gsoc2013-evolution-f19618ac7f06b7f9e4bb2d7ce2e75de6e8554737.tar.xz gsoc2013-evolution-f19618ac7f06b7f9e4bb2d7ce2e75de6e8554737.tar.zst gsoc2013-evolution-f19618ac7f06b7f9e4bb2d7ce2e75de6e8554737.zip |
** Fixes bug #508732
2008-08-18 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #508732
* shell/e-shell.c:
Add a "crash_recovery" flag, with accessor functions for it.
* shell/e-shell-window (init_view):
Check and reset the "crash_recovery" flag before creating a
new shell view. The components can use this flag to take
steps to recover from the previous crash.
* shell/apps_evolution_shell.schemas.in:
Remove the "skip_recovery_dialog" and "recovery" keys.
* shell/Evolution-Component.idl (createView):
Add a "select_item" boolean parameter.
* shell/main.c:
Kill the crash recovery dialog. Instead just set the crash
recovery flag in e-shell appropriately.
* mail/mail-component.c (impl_createView):
Add a "select_item" argument for crash recovery, which we forward
to EMFolderBrowser as a "suppress_message_selection" flag.
* mail/em-folder-browser.c (emfb_set_folder):
Suppress automatic message selection if we are recovering from a
crash.
* addressbook/gui/component/addressbook-component.c (impl_createView):
* calendar/gui/calendar-component.c (impl_createView):
* calendar/gui/memos-component.c (impl_createView):
* calendar/gui/tasks-component.c (impl_createView):
Add a "select_item" argument for crash recovery, which these
components do not use.
* help/C/evolution.xml:
Remove the bit about crash recovery.
svn path=/trunk/; revision=36009
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 12 | ||||
-rw-r--r-- | mail/em-folder-browser.c | 33 | ||||
-rw-r--r-- | mail/em-folder-browser.h | 2 | ||||
-rw-r--r-- | mail/mail-component.c | 5 |
4 files changed, 44 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index f6e9d55495..64a817c749 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,15 @@ +2008-08-18 Matthew Barnes <mbarnes@redhat.com> + + ** Fixes part of bug #508732 + + * mail-component.c (impl_createView): + Add a "select_item" argument for crash recovery, which we forward + to EMFolderBrowser as a "suppress_message_selection" flag. + + * em-folder-browser.c (emfb_set_folder): + Suppress automatic message selection if we are recovering from a + crash. + 2008-08-16 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #513363 diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index fff9fa7c98..9bbf061cc8 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -122,6 +122,7 @@ struct _EMFolderBrowserPrivate { guint folder_changed_id; guint show_wide:1; + guint suppress_message_selection:1; gboolean scope_restricted; EMMenu *menu; /* toplevel menu manager */ @@ -2007,6 +2008,7 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) { EMFolderBrowser *emfb = (EMFolderBrowser *) emfv; struct _EMFolderBrowserPrivate *p = emfb->priv; + gboolean different_folder; message_list_freeze(emfv->list); @@ -2025,6 +2027,10 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) emfb->priv->folder_changed_id = 0; } + different_folder = + emfb->view.folder != NULL && + folder != emfb->view.folder; + emfb_parent->set_folder(emfv, folder, uri); /* This is required since we get activated the first time @@ -2108,15 +2114,20 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) e_search_bar_paint ((ESearchBar *)emfb->search); } - /* set the query manually, so we dont pop up advanced or saved search stuff */ + /* This function gets triggered several times at startup, + * so we don't want to reset the message suppression state + * unless we're actually switching to a different folder. */ + if (different_folder) + p->suppress_message_selection = FALSE; - if ((sstate = camel_object_meta_get (folder, "evolution:selected_uid"))) { - g_free (emfb->priv->select_uid); - emfb->priv->select_uid = sstate; - } else { - g_free(p->select_uid); - p->select_uid = NULL; - } + if (!p->suppress_message_selection) + sstate = camel_object_meta_get ( + folder, "evolution:selected_uid"); + else + sstate = NULL; + + g_free (p->select_uid); + p->select_uid = sstate; if (emfv->list->cursor_uid == NULL && emfb->priv->list_built_id == 0) p->list_built_id = g_signal_connect(emfv->list, "message_list_built", G_CALLBACK (emfb_list_built), emfv); @@ -2228,3 +2239,9 @@ emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act) emfb_parent->activate(emfv, uic, act); } } + +void +em_folder_browser_suppress_message_selection (EMFolderBrowser *emfb) +{ + emfb->priv->suppress_message_selection = TRUE; +} diff --git a/mail/em-folder-browser.h b/mail/em-folder-browser.h index 4d501b04b6..0af0355799 100644 --- a/mail/em-folder-browser.h +++ b/mail/em-folder-browser.h @@ -57,6 +57,8 @@ GtkWidget *em_folder_browser_new(void); void em_folder_browser_show_preview(EMFolderBrowser *emfv, gboolean state); void em_folder_browser_show_wide(EMFolderBrowser *emfv, gboolean state); gboolean em_folder_browser_get_wide(EMFolderBrowser *emfv); +void em_folder_browser_suppress_message_selection(EMFolderBrowser *emfb); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/mail/mail-component.c b/mail/mail-component.c index f18ccb08d0..86a3388b1f 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -711,6 +711,7 @@ enable_folder_tree (GtkWidget *emfb, GtkWidget *emft) static GNOME_Evolution_ComponentView impl_createView (PortableServer_Servant servant, GNOME_Evolution_ShellView parent, + CORBA_boolean select_item, CORBA_Environment *ev) { MailComponent *mail_component = MAIL_COMPONENT (bonobo_object_from_servant (servant)); @@ -726,6 +727,10 @@ impl_createView (PortableServer_Servant servant, view_widget = em_folder_browser_new (); + if (!select_item) + em_folder_browser_suppress_message_selection ( + (EMFolderBrowser *) view_widget); + tree_widget = (GtkWidget *) em_folder_tree_new_with_model (priv->model); em_folder_tree_set_excluded ((EMFolderTree *) tree_widget, 0); em_folder_tree_enable_drag_and_drop ((EMFolderTree *) tree_widget); |