aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-11-03 05:25:27 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-11-03 05:25:27 +0800
commit50c162fd760d94328183dbd91dab69b742f21f79 (patch)
tree34ec981f4cc6bf0b564b309762306240b1173b2f
parente89232e97e2e4a1e7e084ea32f9a078754e8ebfc (diff)
downloadgsoc2013-evolution-50c162fd760d94328183dbd91dab69b742f21f79.tar
gsoc2013-evolution-50c162fd760d94328183dbd91dab69b742f21f79.tar.gz
gsoc2013-evolution-50c162fd760d94328183dbd91dab69b742f21f79.tar.bz2
gsoc2013-evolution-50c162fd760d94328183dbd91dab69b742f21f79.tar.lz
gsoc2013-evolution-50c162fd760d94328183dbd91dab69b742f21f79.tar.xz
gsoc2013-evolution-50c162fd760d94328183dbd91dab69b742f21f79.tar.zst
gsoc2013-evolution-50c162fd760d94328183dbd91dab69b742f21f79.zip
Fix a pane resizing issue on the main window that's been driving me crazy.
Also manage the calendar's vertical pane, switching between different GConf keys depending on whether we're in month view. svn path=/branches/kill-bonobo/; revision=36717
-rw-r--r--Makefile.am2
-rw-r--r--calendar/gui/apps_evolution_calendar.schemas.in8
-rw-r--r--calendar/modules/e-cal-shell-content.c48
-rw-r--r--shell/e-shell-window-private.c2
4 files changed, 54 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index 041a0dd2c5..a5aa96fc79 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -65,10 +65,10 @@ SUBDIRS = \
widgets \
shell \
$(SMIME_DIR) \
+ composer \
addressbook \
calendar \
art \
- composer \
plugins \
doc \
ui \
diff --git a/calendar/gui/apps_evolution_calendar.schemas.in b/calendar/gui/apps_evolution_calendar.schemas.in
index 51ae955741..96bcf173f1 100644
--- a/calendar/gui/apps_evolution_calendar.schemas.in
+++ b/calendar/gui/apps_evolution_calendar.schemas.in
@@ -231,11 +231,11 @@
</locale>
</schema>
<schema>
- <key>/schemas/apps/evolution/calendar/display/tag_vpane_position</key>
- <applyto>/apps/evolution/calendar/display/tag_vpane_position</applyto>
+ <key>/schemas/apps/evolution/calendar/display/date_navigator_pane_position</key>
+ <applyto>/apps/evolution/calendar/display/date_navigator_pane_position</applyto>
<owner>evolution-calendar</owner>
- <type>float</type>
- <default>0.5</default>
+ <type>int</type>
+ <default>150</default>
<locale name="C">
<short>Month view vertical pane position </short>
<long>Position of the vertical pane, between the calendar lists and the date navigator calendar.</long>
diff --git a/calendar/modules/e-cal-shell-content.c b/calendar/modules/e-cal-shell-content.c
index 865ae7de5a..8356b2e679 100644
--- a/calendar/modules/e-cal-shell-content.c
+++ b/calendar/modules/e-cal-shell-content.c
@@ -101,6 +101,39 @@ cal_shell_content_display_view_cb (ECalShellContent *cal_shell_content,
{
}
+static void
+cal_shell_content_notify_view_id_cb (ECalShellContent *cal_shell_content)
+{
+ EShellContent *shell_content;
+ EShellView *shell_view;
+ GConfBridge *bridge;
+ GtkWidget *paned;
+ guint binding_id;
+ const gchar *key;
+ const gchar *view_id;
+
+ bridge = gconf_bridge_get ();
+ paned = cal_shell_content->priv->hpaned;
+ binding_id = cal_shell_content->priv->paned_binding_id;
+
+ shell_content = E_SHELL_CONTENT (cal_shell_content);
+ shell_view = e_shell_content_get_shell_view (shell_content);
+ view_id = e_shell_view_get_view_id (shell_view);
+
+ if (binding_id > 0)
+ gconf_bridge_unbind (bridge, binding_id);
+
+ if (view_id != NULL && strcmp (view_id, "Month_View") == 0)
+ key = "/apps/evolution/calendar/display/month_hpane_position";
+ else
+ key = "/apps/evolution/calendar/display/hpane_position";
+
+ binding_id = gconf_bridge_bind_property_delayed (
+ bridge, key, G_OBJECT (paned), "position");
+
+ cal_shell_content->priv->paned_binding_id = binding_id;
+}
+
static FocusLocation
cal_shell_content_get_focus_location (ECalShellContent *cal_shell_content)
{
@@ -315,9 +348,11 @@ cal_shell_content_constructed (GObject *object)
EShellView *foreign_view;
GalViewCollection *view_collection;
GalViewInstance *view_instance;
+ GConfBridge *bridge;
GtkWidget *container;
GtkWidget *widget;
const gchar *config_dir;
+ const gchar *key;
gchar *filename;
gchar *markup;
gint page_num;
@@ -534,6 +569,19 @@ cal_shell_content_constructed (GObject *object)
gal_view_instance_load (view_instance);
priv->view_instance = view_instance;
+ g_signal_connect_swapped (
+ shell_view, "notify::view-id",
+ G_CALLBACK (cal_shell_content_notify_view_id_cb),
+ object);
+
+ /* Bind GObject properties to GConf keys. */
+
+ bridge = gconf_bridge_get ();
+
+ object = G_OBJECT (priv->vpaned);
+ key = "/apps/evolution/calendar/display/vpane_position";
+ gconf_bridge_bind_property_delayed (bridge, key, object, "position");
+
g_object_unref (memo_model);
g_object_unref (task_model);
}
diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c
index 9432014a88..58a1970bc7 100644
--- a/shell/e-shell-window-private.c
+++ b/shell/e-shell-window-private.c
@@ -271,7 +271,7 @@ e_shell_window_private_init (EShellWindow *shell_window)
container = priv->content_pane;
widget = e_shell_switcher_new ();
- gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE);
+ gtk_paned_pack1 (GTK_PANED (container), widget, FALSE, FALSE);
priv->switcher = g_object_ref (widget);
gtk_widget_show (widget);