[evolution] Bug 625624 - Customizations of contacts views forgotten
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 625624 - Customizations of contacts views forgotten
- Date: Fri, 30 Jul 2010 03:34:56 +0000 (UTC)
commit 71eff23a1d4f6d06b7bdd6a8fc38878d3bfeeb6a
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Jul 29 22:05:27 2010 -0400
Bug 625624 - Customizations of contacts views forgotten
Found similar bugs in EShellMemoContent and EShellTaskContent.
addressbook/gui/widgets/e-addressbook-view.c | 6 +++++-
modules/addressbook/e-book-shell-view-private.c | 5 +++++
modules/calendar/e-memo-shell-content.c | 5 ++++-
modules/calendar/e-task-shell-content.c | 5 ++++-
4 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index db9917f..ca767ec 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -577,9 +577,13 @@ addressbook_view_constructed (GObject *object)
g_signal_connect_swapped (
view_instance, "display-view",
G_CALLBACK (addressbook_view_display_view_cb), view);
- gal_view_instance_load (view_instance);
view->priv->view_instance = view_instance;
+ /* Do not call gal_view_instance_load() here. EBookShellContent
+ * must first obtain a reference to this EAddressbookView so that
+ * e_book_shell_content_get_current_view() returns the correct
+ * view in GalViewInstance::loaded signal handlers. */
+
g_free (uri);
}
diff --git a/modules/addressbook/e-book-shell-view-private.c b/modules/addressbook/e-book-shell-view-private.c
index 4482383..746a11c 100644
--- a/modules/addressbook/e-book-shell-view-private.c
+++ b/modules/addressbook/e-book-shell-view-private.c
@@ -303,6 +303,11 @@ book_shell_view_activate_selected_source (EBookShellView *book_shell_view,
E_ADDRESSBOOK_VIEW (widget));
view_instance = e_addressbook_view_get_view_instance (view);
+
+ /* This must come after e_book_shell_content_set_current_view()
+ * because book_shell_view_notify_view_id_cb() relies on it. */
+ gal_view_instance_load (view_instance);
+
view_id = gal_view_instance_get_current_view_id (view_instance);
e_shell_view_set_view_id (shell_view, view_id);
g_free (view_id);
diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c
index 6639200..cc17964 100644
--- a/modules/calendar/e-memo-shell-content.c
+++ b/modules/calendar/e-memo-shell-content.c
@@ -546,9 +546,12 @@ memo_shell_content_constructed (GObject *object)
view_instance, "display-view",
G_CALLBACK (memo_shell_content_display_view_cb),
object);
- gal_view_instance_load (view_instance);
priv->view_instance = view_instance;
+ /* Do this last so e_memo_shell_content_get_view_instance() returns
+ * the correct instance in GalViewInstance::loaded signal handlers. */
+ gal_view_instance_load (view_instance);
+
/* Restore pane positions from the last session once
* the shell view is fully initialized and visible. */
g_signal_connect (
diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c
index bb2017f..6b3f23e 100644
--- a/modules/calendar/e-task-shell-content.c
+++ b/modules/calendar/e-task-shell-content.c
@@ -541,9 +541,12 @@ task_shell_content_constructed (GObject *object)
view_instance, "display-view",
G_CALLBACK (task_shell_content_display_view_cb),
object);
- gal_view_instance_load (view_instance);
priv->view_instance = view_instance;
+ /* Do this last so e_task_shell_content_get_view_instance() returns
+ * the correct instance in GalViewInstance::loaded signal handlers. */
+ gal_view_instance_load (view_instance);
+
/* Restore pane positions from the last session once
* the shell view is fully initialized and visible. */
g_signal_connect (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]