aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-task-shell-content.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-05-29 03:57:44 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-05-29 03:57:44 +0800
commit732e7096a18a2e2bb9074bdf8026af037d9f8685 (patch)
tree5fe2132433d9d733861b350fe640ff69bfa7eeff /modules/calendar/e-task-shell-content.c
parentdb89f125033c70a3043be9b0a3061ef1e66d9428 (diff)
downloadgsoc2013-evolution-732e7096a18a2e2bb9074bdf8026af037d9f8685.tar
gsoc2013-evolution-732e7096a18a2e2bb9074bdf8026af037d9f8685.tar.gz
gsoc2013-evolution-732e7096a18a2e2bb9074bdf8026af037d9f8685.tar.bz2
gsoc2013-evolution-732e7096a18a2e2bb9074bdf8026af037d9f8685.tar.lz
gsoc2013-evolution-732e7096a18a2e2bb9074bdf8026af037d9f8685.tar.xz
gsoc2013-evolution-732e7096a18a2e2bb9074bdf8026af037d9f8685.tar.zst
gsoc2013-evolution-732e7096a18a2e2bb9074bdf8026af037d9f8685.zip
Bug 613038 - Preview pane size not remembered
Converted size restoration of all preview panes to be triggered by EShellWindow::shell-view-created signal. The signal is emitted when the view is fully initialized and visible. Shell views can use that as a trigger for restoring pane sizes from GConf.
Diffstat (limited to 'modules/calendar/e-task-shell-content.c')
-rw-r--r--modules/calendar/e-task-shell-content.c44
1 files changed, 31 insertions, 13 deletions
diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c
index fdbfa758a4..b2744a883e 100644
--- a/modules/calendar/e-task-shell-content.c
+++ b/modules/calendar/e-task-shell-content.c
@@ -264,6 +264,31 @@ task_shell_content_model_row_changed_cb (ETaskShellContent *task_shell_content,
task_shell_content, 0, E_TABLE (task_table));
}
+static void
+task_shell_content_restore_state_cb (EShellWindow *shell_window,
+ EShellView *shell_view,
+ EShellContent *shell_content)
+{
+ ETaskShellContentPrivate *priv;
+ GConfBridge *bridge;
+ GObject *object;
+ const gchar *key;
+
+ priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (shell_content);
+
+ /* Bind GObject properties to GConf keys. */
+
+ bridge = gconf_bridge_get ();
+
+ object = G_OBJECT (priv->paned);
+ key = "/apps/evolution/calendar/display/task_hpane_position";
+ gconf_bridge_bind_property_delayed (bridge, key, object, "hposition");
+
+ object = G_OBJECT (priv->paned);
+ key = "/apps/evolution/calendar/display/task_vpane_position";
+ gconf_bridge_bind_property_delayed (bridge, key, object, "vposition");
+}
+
static GtkOrientation
task_shell_content_get_orientation (ETaskShellContent *task_shell_content)
{
@@ -395,12 +420,10 @@ task_shell_content_constructed (GObject *object)
EShellView *shell_view;
GalViewInstance *view_instance;
icaltimezone *timezone;
- GConfBridge *bridge;
GtkTargetList *target_list;
GtkTargetEntry *targets;
GtkWidget *container;
GtkWidget *widget;
- const gchar *key;
gint n_targets;
priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object);
@@ -521,17 +544,12 @@ task_shell_content_constructed (GObject *object)
gal_view_instance_load (view_instance);
priv->view_instance = view_instance;
- /* Bind GObject properties to GConf keys. */
-
- bridge = gconf_bridge_get ();
-
- object = G_OBJECT (priv->paned);
- key = "/apps/evolution/calendar/display/task_hpane_position";
- gconf_bridge_bind_property_delayed (bridge, key, object, "hposition");
-
- object = G_OBJECT (priv->paned);
- key = "/apps/evolution/calendar/display/task_vpane_position";
- gconf_bridge_bind_property_delayed (bridge, key, object, "vposition");
+ /* Restore pane positions from the last session once
+ * the shell view is fully initialized and visible. */
+ g_signal_connect (
+ shell_window, "shell-view-created::tasks",
+ G_CALLBACK (task_shell_content_restore_state_cb),
+ shell_content);
}
static guint32