evolution r36691 - in branches/kill-bonobo: calendar/modules shell



Author: mbarnes
Date: Mon Oct 27 22:47:50 2008
New Revision: 36691
URL: http://svn.gnome.org/viewvc/evolution?rev=36691&view=rev

Log:
Fix a couple minor UI bugs.
Populate the calendar's filter combo.


Modified:
   branches/kill-bonobo/calendar/modules/e-cal-shell-sidebar.c
   branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.c
   branches/kill-bonobo/shell/e-shell-window-actions.c
   branches/kill-bonobo/shell/e-shell-window.c

Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-sidebar.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-sidebar.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-sidebar.c	Mon Oct 27 22:47:50 2008
@@ -25,6 +25,7 @@
 #include <glib/gi18n.h>
 
 #include "e-util/e-error.h"
+#include "e-util/gconf-bridge.h"
 #include "calendar/common/authentication.h"
 #include "calendar/gui/calendar-config.h"
 #include "calendar/gui/e-calendar-selector.h"
@@ -357,11 +358,13 @@
 	ESourceList *source_list;
 	ESource *source;
 	ECalendarItem *calitem;
+	GConfBridge *bridge;
 	GtkTreeModel *model;
 	GtkWidget *container;
 	GtkWidget *widget;
 	AtkObject *a11y;
 	GSList *list, *iter;
+	const gchar *key;
 	gchar *uid;
 
 	priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (object);
@@ -435,7 +438,7 @@
 		e_source_selector_set_primary_selection (selector, source);
 	g_free (uid);
 
-	list = calendar_config_get_tasks_selected ();
+	list = calendar_config_get_calendars_selected ();
 	for (iter = list; iter != NULL; iter = iter->next) {
 		uid = iter->data;
 		source = e_source_list_peek_source_by_uid (source_list, uid);
@@ -451,14 +454,22 @@
 	/* Listen for subsequent changes to the selector. */
 
 	g_signal_connect_swapped (
-		widget, "selection-changed",
+		selector, "selection-changed",
 		G_CALLBACK (cal_shell_sidebar_selection_changed_cb),
 		object);
 
 	g_signal_connect_swapped (
-		widget, "primary-selection-changed",
+		selector, "primary-selection-changed",
 		G_CALLBACK (cal_shell_sidebar_primary_selection_changed_cb),
 		object);
+
+	/* Bind GObject properties to GConf keys. */
+
+	bridge = gconf_bridge_get ();
+
+	object = G_OBJECT (priv->paned);
+	key = "/apps/evolution/calendar/display/date_navigator_vpane_position";
+	gconf_bridge_bind_property_delayed (bridge, key, object, "position");
 }
 
 static void

Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.c	Mon Oct 27 22:47:50 2008
@@ -275,8 +275,13 @@
 	cal_shell_view_update_timezone (cal_shell_view);
 #endif
 
+	e_categories_register_change_listener (
+		G_CALLBACK (e_cal_shell_view_update_search_filter),
+		cal_shell_view);
+
 	e_cal_shell_view_actions_init (shell_view);
 	e_cal_shell_view_update_sidebar (cal_shell_view);
+        e_cal_shell_view_update_search_filter (cal_shell_view);
 }
 
 void

Modified: branches/kill-bonobo/shell/e-shell-window-actions.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-window-actions.c	(original)
+++ branches/kill-bonobo/shell/e-shell-window-actions.c	Mon Oct 27 22:47:50 2008
@@ -1781,6 +1781,7 @@
 {
 	const gchar *current_view;
 	GList *match_list = NULL;
+	GList *primary = NULL;
 	GList *iter;
 
 	/* Pick out the actions from the source list that are tagged
@@ -1809,7 +1810,10 @@
 		if (strcmp (module_name, current_view) != 0)
 			continue;
 
-		match_list = g_list_append (match_list, iter);
+		if (g_object_get_data (G_OBJECT (action), "primary"))
+			match_list = g_list_prepend (match_list, iter);
+		else
+			match_list = g_list_append (match_list, iter);
 	}
 
 	/* source_list = [B]   match_list = [A] -> [C] */

Modified: branches/kill-bonobo/shell/e-shell-window.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-window.c	(original)
+++ branches/kill-bonobo/shell/e-shell-window.c	Mon Oct 27 22:47:50 2008
@@ -742,6 +742,16 @@
 		g_object_set_data (
 			G_OBJECT (action),
 			"module-name", (gpointer) module_name);
+
+		/* The first action becomes the first item in the "New"
+		 * menu, and consequently its icon is shown in the "New"
+		 * button when the shell module's view is active.  This
+		 * is all sorted out in shell_window_extract_actions().
+		 * Note, the data value just needs to be non-zero. */
+		if (ii == 0)
+			g_object_set_data (
+				G_OBJECT (action),
+				"primary", GINT_TO_POINTER (TRUE));
 	}
 
 	e_shell_window_update_new_menu (shell_window);



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