aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-11-14 20:08:57 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-11-14 20:08:57 +0800
commit7ab5ae3fc72516cceeb09a48bc5a39f7b57933de (patch)
treef1d1afbfa9d8c97dc691a2d241c9ec368fdf67d3 /shell
parentcda52538315c481bc3b11ff2db40f7165113d1ab (diff)
parentc4308051159a37f16521b881f59259861998f4ae (diff)
downloadgsoc2013-evolution-7ab5ae3fc72516cceeb09a48bc5a39f7b57933de.tar
gsoc2013-evolution-7ab5ae3fc72516cceeb09a48bc5a39f7b57933de.tar.gz
gsoc2013-evolution-7ab5ae3fc72516cceeb09a48bc5a39f7b57933de.tar.bz2
gsoc2013-evolution-7ab5ae3fc72516cceeb09a48bc5a39f7b57933de.tar.lz
gsoc2013-evolution-7ab5ae3fc72516cceeb09a48bc5a39f7b57933de.tar.xz
gsoc2013-evolution-7ab5ae3fc72516cceeb09a48bc5a39f7b57933de.tar.zst
gsoc2013-evolution-7ab5ae3fc72516cceeb09a48bc5a39f7b57933de.zip
Merge branch 'master' into wip/gsettings
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-view.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 370aa90403..a2fc00e3b5 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -73,6 +73,9 @@ struct _EShellViewPrivate {
guint update_actions_blocked;
gboolean update_actions_called;
+
+ GtkWidget *preferences_window;
+ gulong preferences_hide_id;
};
enum {
@@ -547,6 +550,15 @@ shell_view_dispose (GObject *object)
priv->search_rule = NULL;
}
+ if (priv->preferences_window != NULL) {
+ g_signal_handler_disconnect (
+ priv->preferences_window,
+ priv->preferences_hide_id);
+ g_object_unref (priv->preferences_window);
+ priv->preferences_window = NULL;
+ priv->preferences_hide_id = 0;
+ }
+
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -570,13 +582,18 @@ shell_view_finalize (GObject *object)
static void
shell_view_constructed (GObject *object)
{
- EShellViewClass *shell_view_class;
+ EShell *shell;
EShellView *shell_view;
+ EShellBackend *shell_backend;
+ EShellViewClass *shell_view_class;
GtkWidget *widget;
shell_view = E_SHELL_VIEW (object);
shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
+ shell_backend = e_shell_view_get_shell_backend (shell_view);
+ shell = e_shell_backend_get_shell (shell_backend);
+
shell_view_load_state (shell_view);
/* Invoke factory methods. */
@@ -604,6 +621,13 @@ shell_view_constructed (GObject *object)
g_object_unref (shell_view->priv->size_group);
shell_view->priv->size_group = NULL;
+ /* Update actions whenever the Preferences window is closed. */
+ widget = e_shell_get_preferences_window (shell);
+ shell_view->priv->preferences_window = g_object_ref (widget);
+ shell_view->priv->preferences_hide_id = g_signal_connect_swapped (
+ shell_view->priv->preferences_window, "hide",
+ G_CALLBACK (e_shell_view_update_actions), shell_view);
+
e_extensible_load_extensions (E_EXTENSIBLE (object));
/* Chain up to parent's constructed() method. */