evolution r36717 - in branches/kill-bonobo: . calendar/gui calendar/modules shell



Author: mbarnes
Date: Sun Nov  2 21:25:27 2008
New Revision: 36717
URL: http://svn.gnome.org/viewvc/evolution?rev=36717&view=rev

Log:
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.


Modified:
   branches/kill-bonobo/Makefile.am
   branches/kill-bonobo/calendar/gui/apps_evolution_calendar.schemas.in
   branches/kill-bonobo/calendar/modules/e-cal-shell-content.c
   branches/kill-bonobo/shell/e-shell-window-private.c

Modified: branches/kill-bonobo/Makefile.am
==============================================================================
--- branches/kill-bonobo/Makefile.am	(original)
+++ branches/kill-bonobo/Makefile.am	Sun Nov  2 21:25:27 2008
@@ -65,10 +65,10 @@
         widgets                 \
         shell                   \
 	$(SMIME_DIR)		\
+	composer		\
 	addressbook		\
 	calendar		\
         art                     \
-	composer		\
 	plugins			\
 	doc			\
 	ui			\

Modified: branches/kill-bonobo/calendar/gui/apps_evolution_calendar.schemas.in
==============================================================================
--- branches/kill-bonobo/calendar/gui/apps_evolution_calendar.schemas.in	(original)
+++ branches/kill-bonobo/calendar/gui/apps_evolution_calendar.schemas.in	Sun Nov  2 21:25:27 2008
@@ -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>

Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-content.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-content.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-content.c	Sun Nov  2 21:25:27 2008
@@ -101,6 +101,39 @@
 {
 }
 
+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 @@
 	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 @@
 	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);
 }

Modified: branches/kill-bonobo/shell/e-shell-window-private.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-window-private.c	(original)
+++ branches/kill-bonobo/shell/e-shell-window-private.c	Sun Nov  2 21:25:27 2008
@@ -271,7 +271,7 @@
 	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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]