evolution r36551 - in branches/kill-bonobo: addressbook/gui/component calendar/gui calendar/modules doc/reference/shell/tmpl e-util shell ui



Author: mbarnes
Date: Fri Oct  3 19:24:59 2008
New Revision: 36551
URL: http://svn.gnome.org/viewvc/evolution?rev=36551&view=rev

Log:
Tasks is working.  Still need to deal with some loose ends and test it all.


Modified:
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c
   branches/kill-bonobo/calendar/gui/e-calendar-table.c
   branches/kill-bonobo/calendar/gui/e-calendar-table.h
   branches/kill-bonobo/calendar/gui/e-memo-table.c
   branches/kill-bonobo/calendar/gui/e-memo-table.h
   branches/kill-bonobo/calendar/modules/e-memo-shell-content.c
   branches/kill-bonobo/calendar/modules/e-memo-shell-sidebar.c
   branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.c
   branches/kill-bonobo/calendar/modules/e-memo-shell-view-private.c
   branches/kill-bonobo/calendar/modules/e-task-shell-content.c
   branches/kill-bonobo/calendar/modules/e-task-shell-content.h
   branches/kill-bonobo/calendar/modules/e-task-shell-module.c
   branches/kill-bonobo/calendar/modules/e-task-shell-sidebar.c
   branches/kill-bonobo/calendar/modules/e-task-shell-sidebar.h
   branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.c
   branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.h
   branches/kill-bonobo/calendar/modules/e-task-shell-view-private.c
   branches/kill-bonobo/calendar/modules/e-task-shell-view-private.h
   branches/kill-bonobo/calendar/modules/e-task-shell-view.c
   branches/kill-bonobo/doc/reference/shell/tmpl/action-groups.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-content.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-importer.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-module.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-switcher.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-taskbar.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-view.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-window.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/shell-actions.sgml
   branches/kill-bonobo/e-util/e-util.c
   branches/kill-bonobo/shell/e-shell-content.h
   branches/kill-bonobo/shell/e-shell-module.h
   branches/kill-bonobo/shell/e-shell-sidebar.h
   branches/kill-bonobo/shell/e-shell-taskbar.h
   branches/kill-bonobo/shell/e-shell-window-actions.c
   branches/kill-bonobo/shell/e-shell-window.c
   branches/kill-bonobo/shell/e-shell-window.h
   branches/kill-bonobo/ui/evolution-tasks.ui

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c	Fri Oct  3 19:24:59 2008
@@ -517,7 +517,7 @@
 	query = g_strdup_printf (format, string->str);
 	g_string_free (string, TRUE);
 
-	/* Filter by category. */
+	/* Apply selected filter. */
 	value = e_shell_content_get_filter_value (shell_content);
 	if (value > CONTACT_FILTER_ANY_CATEGORY) {
 		GList *categories;

Modified: branches/kill-bonobo/calendar/gui/e-calendar-table.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-calendar-table.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-calendar-table.c	Fri Oct  3 19:24:59 2008
@@ -533,6 +533,17 @@
 	object_class->get_property = calendar_table_get_property;
 	object_class->dispose = calendar_table_dispose;
 
+	g_object_class_install_property (
+		object_class,
+		PROP_SHELL_VIEW,
+		g_param_spec_object (
+			"shell-view",
+			_("Shell View"),
+			NULL,
+			E_TYPE_SHELL_VIEW,
+			G_PARAM_READWRITE |
+			G_PARAM_CONSTRUCT_ONLY));
+
 	signals[OPEN_COMPONENT] = g_signal_new (
 		"open-component",
 		G_TYPE_FROM_CLASS (class),
@@ -917,11 +928,12 @@
 	*row = model_row;
 }
 
-/* Returns the component that is selected in the table; only works if there is
+/*
+ * Returns the component that is selected in the table; only works if there is
  * one and only one selected row.
  */
-ECalModelComponent *
-e_calendar_table_get_selected_comp (ECalendarTable *cal_table)
+static ECalModelComponent *
+get_selected_comp (ECalendarTable *cal_table)
 {
 	ETable *etable;
 	int row;
@@ -1051,7 +1063,7 @@
 		return;
 
 	if (n_selected == 1)
-		comp_data = e_calendar_table_get_selected_comp (cal_table);
+		comp_data = get_selected_comp (cal_table);
 	else
 		comp_data = NULL;
 

Modified: branches/kill-bonobo/calendar/gui/e-calendar-table.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-calendar-table.h	(original)
+++ branches/kill-bonobo/calendar/gui/e-calendar-table.h	Fri Oct  3 19:24:59 2008
@@ -72,11 +72,6 @@
 	/* Fields used for cut/copy/paste */
 	icalcomponent *tmp_vcal;
 
-	/* We should know which calendar has been used to create object,
-	 * so store it here before emitting "user_created" signal and make
-	 * it NULL just after the emit. */
-	ECal *user_created_cal;
-
 	ECalendarTablePrivate *priv;
 };
 

Modified: branches/kill-bonobo/calendar/gui/e-memo-table.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-memo-table.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-memo-table.c	Fri Oct  3 19:24:59 2008
@@ -986,6 +986,8 @@
 	/* check the type of the component */
 	kind = icalcomponent_isa (icalcomp);
 	if (kind != ICAL_VCALENDAR_COMPONENT &&
+	    kind != ICAL_VEVENT_COMPONENT &&
+	    kind != ICAL_VTODO_COMPONENT &&
 	    kind != ICAL_VJOURNAL_COMPONENT) {
 		return;
 	}
@@ -1005,7 +1007,9 @@
 			vcal_comp, ICAL_ANY_COMPONENT);
 		while (subcomp) {
 			child_kind = icalcomponent_isa (subcomp);
-			if (child_kind == ICAL_VJOURNAL_COMPONENT) {
+			if (child_kind == ICAL_VEVENT_COMPONENT ||
+			    child_kind == ICAL_VTODO_COMPONENT ||
+			    child_kind == ICAL_VJOURNAL_COMPONENT) {
 				ECalComponent *tmp_comp;
 
 				uid = e_cal_component_gen_uid ();

Modified: branches/kill-bonobo/calendar/gui/e-memo-table.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-memo-table.h	(original)
+++ branches/kill-bonobo/calendar/gui/e-memo-table.h	Fri Oct  3 19:24:59 2008
@@ -33,6 +33,10 @@
 /*
  * EMemoTable - displays the iCalendar objects in a table (an ETable).
  * Used for memo events and tasks.
+ *
+ * XXX We should look at merging this back into ECalendarTable, or at
+ *     least making ECalendarTable subclassable so we don't have so
+ *     much duplicate code.
  */
 
 /* Standard GObject macros */

Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-content.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-content.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-content.c	Fri Oct  3 19:24:59 2008
@@ -1,5 +1,5 @@
 /*
- * e-memo-shell-content.h
+ * e-memo-shell-content.c
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public

Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-sidebar.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-sidebar.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-sidebar.c	Fri Oct  3 19:24:59 2008
@@ -91,23 +91,23 @@
 {
 	GHashTable *client_table;
 	icaltimezone *zone;
-	GList *keys;
+	GList *values;
 
 	zone = calendar_config_get_icaltimezone ();
 	client_table = memo_shell_sidebar->priv->client_table;
-	keys = g_hash_table_get_values (client_table);
+	values = g_hash_table_get_values (client_table);
 
-	while (keys != NULL) {
-		ECal *client = keys->data;
+	while (values != NULL) {
+		ECal *client = values->data;
 
 		if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED)
 			e_cal_set_default_timezone (client, zone, NULL);
 
-		keys = g_list_delete_link (keys, keys);
+		values = g_list_delete_link (values, values);
 	}
 
-	/* XXX Need to call e_memo_preview_set_default_timezone() here
-	 *     but the sidebar is not really supposed to access content
+	/* XXX Need to call e_cal_component_preview_set_default_timezone()
+	 *     here but the sidebar is not really supposed to access content
 	 *     stuff.  I guess we could emit an "update-timezone" signal
 	 *     here, but that feels wrong.  Maybe this whole thing should
 	 *     be in EMemoShellView instead. */
@@ -454,8 +454,8 @@
 	ESource *source;
 	const gchar *uid;
 
-	selector = E_SOURCE_SELECTOR (memo_shell_sidebar->priv->selector);
 	client_table = memo_shell_sidebar->priv->client_table;
+	selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar);
 
 	g_signal_handlers_disconnect_matched (
 		client, G_SIGNAL_MATCH_DATA, 0, 0,
@@ -607,7 +607,7 @@
 	g_return_if_fail (E_IS_SOURCE (source));
 
 	client_table = memo_shell_sidebar->priv->client_table;
-	selector = E_SOURCE_SELECTOR (memo_shell_sidebar->priv->selector);
+	selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar);
 
 	uid = e_source_peek_uid (source);
 	client = g_hash_table_lookup (client_table, uid);
@@ -657,7 +657,7 @@
 	g_return_if_fail (E_IS_SOURCE (source));
 
 	client_table = memo_shell_sidebar->priv->client_table;
-	selector = E_SOURCE_SELECTOR (memo_shell_sidebar->priv->selector);
+	selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar);
 
 	uid = e_source_peek_uid (source);
 	client = g_hash_table_lookup (client_table, uid);

Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.c	Fri Oct  3 19:24:59 2008
@@ -530,7 +530,7 @@
 
 	{ "memo-forward",
 	  "mail-forward",
-	  N_("_Forward as iCalendar"),
+	  N_("_Forward as iCalendar..."),
 	  "<Control>f",
 	  NULL,  /* XXX Add a tooltip! */
 	  G_CALLBACK (action_memo_forward_cb) },
@@ -614,7 +614,7 @@
 
 	{ "memo-save-as",
 	  GTK_STOCK_SAVE_AS,
-	  NULL,
+	  N_("_Save as iCalendar..."),
 	  NULL,
 	  NULL,  /* XXX Add a tooltip! */
 	  G_CALLBACK (action_memo_save_as_cb) }

Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-view-private.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-view-private.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-view-private.c	Fri Oct  3 19:24:59 2008
@@ -362,7 +362,7 @@
 	query = g_strdup_printf (format, string->str);
 	g_string_free (string, TRUE);
 
-	/* Filter by category. */
+	/* Apply selected filter. */
 	value = e_shell_content_get_filter_value (shell_content);
 	if (value == MEMO_FILTER_UNMATCHED) {
 		gchar *temp;

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-content.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-content.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-content.c	Fri Oct  3 19:24:59 2008
@@ -1,5 +1,5 @@
 /*
- * e-task-shell-content.h
+ * e-task-shell-content.c
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -25,6 +25,7 @@
 
 #include "e-util/gconf-bridge.h"
 
+#include "calendar/gui/calendar-config.h"
 #include "calendar/gui/e-calendar-table.h"
 #include "calendar/gui/e-calendar-table-config.h"
 
@@ -34,14 +35,14 @@
 	(G_TYPE_INSTANCE_GET_PRIVATE \
 	((obj), E_TYPE_TASK_SHELL_CONTENT, ETaskShellContentPrivate))
 
-#define E_TASK_TABLE_DEFAULT_STATE \
+#define E_CALENDAR_TABLE_DEFAULT_STATE \
 	"<?xml version=\"1.0\"?>" \
 	"<ETableState>" \
 	"  <column source=\"13\"/>" \
 	"  <column source=\"14\"/>" \
 	"  <column source=\"9\"/>" \
 	"  <column source=\"5\"/>" \
-	"  <grouping/>
+	"  <grouping/>" \
 	"</ETableState>"
 
 struct _ETaskShellContentPrivate {
@@ -49,7 +50,7 @@
 	GtkWidget *task_table;
 	GtkWidget *task_preview;
 
-	ETaskTableConfig *table_config;
+	ECalendarTableConfig *table_config;
 	GalViewInstance *view_instance;
 
 	gchar *current_uid;
@@ -97,7 +98,7 @@
 		return;
 
 	task_table = E_CALENDAR_TABLE (task_shell_content->priv->task_table);
-	table = e_task_table_get_table (task_table);
+	table = e_calendar_table_get_table (task_table);
 
 	gal_view_etable_attach_table (GAL_VIEW_ETABLE (gal_view), table);
 }
@@ -132,7 +133,7 @@
                                      ETable *table)
 {
 	ECalComponentPreview *task_preview;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModel *model;
 	ECalModelComponent *comp_data;
 	ECalComponent *comp;
@@ -140,14 +141,14 @@
 
 	task_preview = E_CAL_COMPONENT_PREVIEW (
 		task_shell_content->priv->task_preview);
-	task_table = E_TASK_TABLE (task_shell_content->priv->task_table);
+	task_table = E_CALENDAR_TABLE (task_shell_content->priv->task_table);
 
 	if (e_table_selected_count (table) != 1) {
 		e_cal_component_preview_clear (task_preview);
 		return;
 	}
 
-	model = e_task_table_get_model (task_table);
+	model = e_calendar_table_get_model (task_table);
 	row = e_table_get_cursor_row (table);
 	comp_data = e_cal_model_get_component_at (model, row);
 
@@ -185,7 +186,7 @@
                                          ETableModel *model)
 {
 	ECalModelComponent *comp_data;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ETable *table;
 	const gchar *current_uid;
 	const gchar *uid;
@@ -202,8 +203,8 @@
 	if (g_strcmp0 (uid, current_uid) != 0)
 		return;
 
-	task_table = E_TASK_TABLE (task_shell_content->priv->task_table);
-	table = e_task_table_get_table (task_table);
+	task_table = E_CALENDAR_TABLE (task_shell_content->priv->task_table);
+	table = e_calendar_table_get_table (task_table);
 
 	task_shell_content_cursor_change_cb (task_shell_content, 0, table);
 }
@@ -328,7 +329,7 @@
 
 	container = widget;
 
-	widget = e_task_table_new (shell_view);
+	widget = e_calendar_table_new (shell_view);
 	gtk_paned_add1 (GTK_PANED (container), widget);
 	priv->task_table = g_object_ref (widget);
 	gtk_widget_show (widget);
@@ -340,6 +341,7 @@
 	gtk_scrolled_window_set_shadow_type (
 		GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
 	gtk_paned_add2 (GTK_PANED (container), widget);
+	gtk_widget_show (widget);
 
 	container = widget;
 
@@ -353,14 +355,14 @@
 
 	/* Configure the task table. */
 
-	widget = E_TASK_TABLE (priv->task_table)->etable;
+	widget = E_CALENDAR_TABLE (priv->task_table)->etable;
 	table = e_table_scrolled_get_table (E_TABLE_SCROLLED (widget));
-	model = e_task_table_get_model (E_TASK_TABLE (priv->task_table));
+	model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->task_table));
 
-	priv->table_config = e_task_table_config_new (
-		E_TASK_TABLE (priv->task_table));
+	priv->table_config = e_calendar_table_config_new (
+		E_CALENDAR_TABLE (priv->task_table));
 
-	e_table_set_state (table, E_TASK_TABLE_DEFAULT_STATE);
+	e_table_set_state (table, E_CALENDAR_TABLE_DEFAULT_STATE);
 
 	e_table_drag_source_set (
 		table, GDK_BUTTON1_MASK,
@@ -497,13 +499,13 @@
 		task_shell_content->priv->task_preview);
 }
 
-ETaskTable *
+ECalendarTable *
 e_task_shell_content_get_task_table (ETaskShellContent *task_shell_content)
 {
 	g_return_val_if_fail (
 		E_IS_TASK_SHELL_CONTENT (task_shell_content), NULL);
 
-	return E_TASK_TABLE (task_shell_content->priv->task_table);
+	return E_CALENDAR_TABLE (task_shell_content->priv->task_table);
 }
 
 GalViewInstance *

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-content.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-content.h	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-content.h	Fri Oct  3 19:24:59 2008
@@ -25,6 +25,9 @@
 #include <shell/e-shell-content.h>
 #include <shell/e-shell-view.h>
 
+#include <calendar/gui/e-calendar-table.h>
+#include <calendar/gui/e-cal-component-preview.h>
+
 #include <widgets/menus/gal-view-instance.h>
 
 /* Standard GObject macros */
@@ -63,6 +66,11 @@
 
 GType		e_task_shell_content_get_type	(void);
 GtkWidget *	e_task_shell_content_new	(EShellView *shell_view);
+ECalComponentPreview *
+		e_task_shell_content_get_task_preview
+						(ETaskShellContent *task_shell_content);
+ECalendarTable *e_task_shell_content_get_task_table
+						(ETaskShellContent *task_shell_content);
 GalViewInstance *
 		e_task_shell_content_get_view_instance
 						(ETaskShellContent *task_shell_content);

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-module.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-module.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-module.c	Fri Oct  3 19:24:59 2008
@@ -30,7 +30,11 @@
 #include "shell/e-shell-module.h"
 #include "shell/e-shell-window.h"
 
+#include "calendar/common/authentication.h"
 #include "calendar/gui/calendar-config.h"
+#include "calendar/gui/comp-util.h"
+#include "calendar/gui/dialogs/calendar-setup.h"
+#include "calendar/gui/dialogs/task-editor.h"
 
 #include "e-task-shell-view.h"
 

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-sidebar.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-sidebar.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-sidebar.c	Fri Oct  3 19:24:59 2008
@@ -21,9 +21,15 @@
 
 #include "e-task-shell-sidebar.h"
 
+#include <string.h>
 #include <glib/gi18n.h>
+#include <libecal/e-cal.h>
 
+#include "e-util/e-error.h"
+#include "calendar/common/authentication.h"
+#include "calendar/gui/calendar-config.h"
 #include "calendar/gui/e-calendar-selector.h"
+#include "calendar/gui/misc.h"
 
 #include "e-task-shell-view.h"
 
@@ -33,6 +39,9 @@
 
 struct _ETaskShellSidebarPrivate {
 	GtkWidget *selector;
+
+	/* UID -> Client */
+	GHashTable *client_table;
 };
 
 enum {
@@ -40,7 +49,255 @@
 	PROP_SELECTOR
 };
 
+enum {
+	CLIENT_ADDED,
+	CLIENT_REMOVED,
+	STATUS_MESSAGE,
+	LAST_SIGNAL
+};
+
 static gpointer parent_class;
+static guint signals[LAST_SIGNAL];
+
+static void
+task_shell_sidebar_emit_client_added (ETaskShellSidebar *task_shell_sidebar,
+                                      ECal *client)
+{
+	guint signal_id = signals[CLIENT_ADDED];
+
+	g_signal_emit (task_shell_sidebar, signal_id, 0, client);
+}
+
+static void
+task_shell_sidebar_emit_client_removed (ETaskShellSidebar *task_shell_sidebar,
+                                        ECal *client)
+{
+	guint signal_id = signals[CLIENT_REMOVED];
+
+	g_signal_emit (task_shell_sidebar, signal_id, 0, client);
+}
+
+static void
+task_shell_sidebar_emit_status_message (ETaskShellSidebar *task_shell_sidebar,
+                                        const gchar *status_message)
+{
+	guint signal_id = signals[STATUS_MESSAGE];
+
+	g_signal_emit (task_shell_sidebar, signal_id, 0, status_message);
+}
+
+static void
+task_shell_sidebar_update_timezone (ETaskShellSidebar *task_shell_sidebar)
+{
+	GHashTable *client_table;
+	icaltimezone *zone;
+	GList *values;
+
+	zone = calendar_config_get_icaltimezone ();
+	client_table = task_shell_sidebar->priv->client_table;
+	values = g_hash_table_get_values (client_table);
+
+	while (values != NULL) {
+		ECal *client = values->data;
+
+		if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED)
+			e_cal_set_default_timezone (client, zone, NULL);
+
+		values = g_list_delete_link (values, values);
+	}
+
+	/* XXX Need to call e_cal_component_preview_set_default_timezone()
+	 *     here but the sidebar is not really supposed to access content
+	 *     stuff.  I guess we could emit an "update-timezone" signal
+	 *     here, but that feels wrong.  Maybe this whole thing should
+	 *     be in ETaskShellView instead. */
+}
+
+static void
+task_shell_sidebar_backend_died_cb (ETaskShellSidebar *task_shell_sidebar,
+                                    ECal *client)
+{
+	EShellView *shell_view;
+	EShellWindow *shell_window;
+	EShellSidebar *shell_sidebar;
+	GHashTable *client_table;
+	ESource *source;
+	const gchar *uid;
+
+	client_table = task_shell_sidebar->priv->client_table;
+
+	shell_sidebar = E_SHELL_SIDEBAR (task_shell_sidebar);
+	shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
+	shell_window = e_shell_view_get_shell_window (shell_view);
+
+	source = e_cal_get_source (client);
+	uid = e_source_peek_uid (source);
+
+	g_object_ref (source);
+
+	g_hash_table_remove (client_table, uid);
+	task_shell_sidebar_emit_status_message (task_shell_sidebar, NULL);
+
+	e_error_run (
+		GTK_WINDOW (shell_window),
+		"calendar:tasks-crashed", NULL);
+
+	g_object_unref (source);
+}
+
+static void
+task_shell_sidebar_backend_error_cb (ETaskShellSidebar *task_shell_sidebar,
+                                     const gchar *message,
+                                     ECal *client)
+{
+	EShellView *shell_view;
+	EShellWindow *shell_window;
+	EShellSidebar *shell_sidebar;
+	GtkWidget *dialog;
+	const gchar *uri;
+	gchar *uri_no_passwd;
+
+	shell_sidebar = E_SHELL_SIDEBAR (task_shell_sidebar);
+	shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
+	shell_window = e_shell_view_get_shell_window (shell_view);
+
+	uri = e_cal_get_uri (client);
+	uri_no_passwd = get_uri_without_password (uri);
+
+	dialog = gtk_message_dialog_new (
+		GTK_WINDOW (shell_window),
+		GTK_DIALOG_DESTROY_WITH_PARENT,
+		GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+		_("Error on %s\n%s"),
+		uri_no_passwd, message);
+
+	gtk_dialog_run (GTK_DIALOG (dialog));
+	gtk_widget_destroy (dialog);
+
+	g_free (uri_no_passwd);
+}
+
+static void
+task_shell_sidebar_client_opened_cb (ETaskShellSidebar *task_shell_sidebar,
+                                     ECalendarStatus status,
+                                     ECal *client)
+{
+	EShellView *shell_view;
+	EShellWindow *shell_window;
+	EShellSidebar *shell_sidebar;
+	ESource *source;
+
+	source = e_cal_get_source (client);
+
+	shell_sidebar = E_SHELL_SIDEBAR (task_shell_sidebar);
+	shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
+	shell_window = e_shell_view_get_shell_window (shell_view);
+
+	switch (status) {
+		case E_CALENDAR_STATUS_OK:
+			g_signal_handlers_disconnect_matched (
+				client, G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
+				task_shell_sidebar_client_opened_cb, NULL);
+
+			task_shell_sidebar_emit_status_message (
+				task_shell_sidebar, _("Loading tasks"));
+			task_shell_sidebar_emit_client_added (
+				task_shell_sidebar, client);
+			task_shell_sidebar_emit_status_message (
+				task_shell_sidebar, NULL);
+			break;
+
+		case E_CALENDAR_STATUS_BUSY:
+			break;
+
+		case E_CALENDAR_STATUS_REPOSITORY_OFFLINE:
+			e_error_run (
+				GTK_WINDOW (shell_window),
+				"calendar:prompt-no-contents-offline-tasks",
+				NULL);
+			break;
+
+		default:
+			task_shell_sidebar_emit_client_removed (
+				task_shell_sidebar, client);
+			break;
+	}
+}
+
+static void
+task_shell_sidebar_row_changed_cb (ETaskShellSidebar *task_shell_sidebar,
+                                   GtkTreePath *tree_path,
+                                   GtkTreeIter *tree_iter,
+                                   GtkTreeModel *tree_model)
+{
+	ESourceSelector *selector;
+	ESource *source;
+
+	/* XXX ESourceSelector's underlying tree store has only one
+	 *     column: ESource objects.  While we're not supposed to
+	 *     know this, listening for "row-changed" signals from
+	 *     the model is easier to deal with than the selector's
+	 *     "selection-changed" signal, which doesn't tell you
+	 *     _which_ row changed. */
+
+	selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
+	gtk_tree_model_get (tree_model, tree_iter, 0, &source, -1);
+
+	/* XXX This signal gets emitted a lot while the model is being
+	 *     rebuilt, during which time we won't get a valid ESource.
+	 *     ESourceSelector should probably block this signal while
+	 *     rebuilding the model, but we'll be forgiving and not
+	 *     emit a warning. */
+	if (!E_IS_SOURCE (source))
+		return;
+
+	if (e_source_selector_source_is_selected (selector, source))
+		e_task_shell_sidebar_add_source (task_shell_sidebar, source);
+	else
+		e_task_shell_sidebar_remove_source (task_shell_sidebar, source);
+}
+
+static void
+task_shell_sidebar_selection_changed_cb (ETaskShellSidebar *task_shell_sidebar,
+                                         ESourceSelector *selector)
+{
+	GSList *list, *iter;
+
+	/* This signal is emitted less frequently than "row-changed",
+	 * especially when the model is being rebuilt.  So we'll take
+	 * it easy on poor GConf. */
+
+	list = e_source_selector_get_selection (selector);
+
+	for (iter = list; iter != NULL; iter = iter->next) {
+		ESource *source = iter->data;
+
+		iter->data = (gpointer) e_source_peek_uid (source);
+		g_object_unref (source);
+	}
+
+	calendar_config_set_tasks_selected (list);
+
+	g_slist_free (list);
+}
+
+static void
+task_shell_sidebar_primary_selection_changed_cb (ETaskShellSidebar *task_shell_sidebar,
+                                                 ESourceSelector *selector)
+{
+	ESource *source;
+	const gchar *uid;
+
+	/* XXX ESourceSelector needs a "primary-selection-uid" property
+	 *     so we can just bind the property with GConfBridge. */
+
+	source = e_source_selector_peek_primary_selection (selector);
+	if (source == NULL)
+		return;
+
+	uid = e_source_peek_uid (source);
+	calendar_config_set_primary_tasks (uid);
+}
 
 static void
 task_shell_sidebar_get_property (GObject *object,
@@ -71,20 +328,40 @@
 		priv->selector = NULL;
 	}
 
+	g_hash_table_remove_all (priv->client_table);
+
 	/* Chain up to parent's dispose() method. */
 	G_OBJECT_CLASS (parent_class)->dispose (object);
 }
 
 static void
+task_shell_sidebar_finalize (GObject *object)
+{
+	ETaskShellSidebarPrivate *priv;
+
+	priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (object);
+
+	g_hash_table_destroy (priv->client_table);
+
+	/* Chain up to parent's finalize() method. */
+	G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
 task_shell_sidebar_constructed (GObject *object)
 {
 	ETaskShellSidebarPrivate *priv;
 	EShellView *shell_view;
 	EShellSidebar *shell_sidebar;
 	ETaskShellView *task_shell_view;
+	ESourceSelector *selector;
 	ESourceList *source_list;
+	ESource *source;
 	GtkContainer *container;
+	GtkTreeModel *model;
 	GtkWidget *widget;
+	GSList *list, *iter;
+	gchar *uid;
 
 	priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (object);
 
@@ -114,6 +391,83 @@
 	gtk_container_add (container, widget);
 	priv->selector = g_object_ref (widget);
 	gtk_widget_show (widget);
+
+	/* Restore the selector state from the last session. */
+
+	selector = E_SOURCE_SELECTOR (priv->selector);
+	model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
+
+	g_signal_connect_swapped (
+		model, "row-changed",
+		G_CALLBACK (task_shell_sidebar_row_changed_cb),
+		object);
+
+	source = NULL;
+	uid = calendar_config_get_primary_tasks ();
+	if (uid != NULL)
+		source = e_source_list_peek_source_by_uid (source_list, uid);
+	if (source == NULL)
+		source = e_source_list_peek_source_any (source_list);
+	if (source != NULL)
+		e_source_selector_set_primary_selection (selector, source);
+	g_free (uid);
+
+	list = calendar_config_get_tasks_selected ();
+	for (iter = list; iter != NULL; iter = iter->next) {
+		uid = iter->data;
+		source = e_source_list_peek_source_by_uid (source_list, uid);
+		g_free (uid);
+
+		if (source == NULL)
+			continue;
+
+		e_source_selector_select_source (selector, source);
+	}
+	g_slist_free (list);
+
+	/* Listen for subsequent changes to the selector. */
+
+	g_signal_connect_swapped (
+		widget, "selection-changed",
+		G_CALLBACK (task_shell_sidebar_selection_changed_cb),
+		object);
+
+	g_signal_connect_swapped (
+		widget, "primary-selection-changed",
+		G_CALLBACK (task_shell_sidebar_selection_changed_cb),
+		object);
+}
+
+static void
+task_shell_sidebar_client_added (ETaskShellSidebar *task_shell_sidebar,
+                                 ECal *client)
+{
+	task_shell_sidebar_update_timezone (task_shell_sidebar);
+}
+
+static void
+task_shell_sidebar_client_removed (ETaskShellSidebar *task_shell_sidebar,
+                                   ECal *client)
+{
+	ESourceSelector *selector;
+	GHashTable *client_table;
+	ESource *source;
+	const gchar *uid;
+
+	client_table = task_shell_sidebar->priv->client_table;
+	selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
+
+	g_signal_handlers_disconnect_matched (
+		client, G_SIGNAL_MATCH_DATA, 0, 0,
+		NULL, NULL, task_shell_sidebar);
+
+	source = e_cal_get_source (client);
+	e_source_selector_unselect_source (selector, source);
+
+	uid = e_source_peek_uid (source);
+	g_hash_table_remove (client_table, uid);
+
+	task_shell_sidebar_emit_status_message (task_shell_sidebar, NULL);
 }
 
 static void
@@ -127,8 +481,12 @@
 	object_class = G_OBJECT_CLASS (class);
 	object_class->get_property = task_shell_sidebar_get_property;
 	object_class->dispose = task_shell_sidebar_dispose;
+	object_class->finalize = task_shell_sidebar_finalize;
 	object_class->constructed = task_shell_sidebar_constructed;
 
+	class->client_added = task_shell_sidebar_client_added;
+	class->client_removed = task_shell_sidebar_client_removed;
+
 	g_object_class_install_property (
 		object_class,
 		PROP_SELECTOR,
@@ -138,14 +496,53 @@
 			_("This widget displays groups of task lists"),
 			E_TYPE_SOURCE_SELECTOR,
 			G_PARAM_READABLE));
+
+	signals[CLIENT_ADDED] = g_signal_new (
+		"client-added",
+		G_OBJECT_CLASS_TYPE (object_class),
+		G_SIGNAL_RUN_LAST,
+		G_STRUCT_OFFSET (ETaskShellSidebarClass, client_added),
+		NULL, NULL,
+		g_cclosure_marshal_VOID__OBJECT,
+		G_TYPE_NONE, 1,
+		E_TYPE_CAL);
+
+	signals[CLIENT_REMOVED] = g_signal_new (
+		"client-removed",
+		G_OBJECT_CLASS_TYPE (object_class),
+		G_SIGNAL_RUN_LAST,
+		G_STRUCT_OFFSET (ETaskShellSidebarClass, client_removed),
+		NULL, NULL,
+		g_cclosure_marshal_VOID__OBJECT,
+		G_TYPE_NONE, 1,
+		E_TYPE_CAL);
+
+	signals[STATUS_MESSAGE] = g_signal_new (
+		"status-message",
+		G_OBJECT_CLASS_TYPE (object_class),
+		G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+		G_STRUCT_OFFSET (ETaskShellSidebarClass, status_message),
+		NULL, NULL,
+		g_cclosure_marshal_VOID__STRING,
+		G_TYPE_NONE, 1,
+		G_TYPE_STRING);
 }
 
 static void
 task_shell_sidebar_init (ETaskShellSidebar *task_shell_sidebar)
 {
+	GHashTable *client_table;
+
+	client_table = g_hash_table_new_full (
+		g_str_hash, g_str_equal,
+		(GDestroyNotify) g_free,
+		(GDestroyNotify) g_object_unref);
+
 	task_shell_sidebar->priv =
 		E_TASK_SHELL_SIDEBAR_GET_PRIVATE (task_shell_sidebar);
 
+	task_shell_sidebar->priv->client_table = client_table;
+
 	/* Postpone widget construction until we have a shell view. */
 }
 
@@ -194,3 +591,79 @@
 
 	return E_SOURCE_SELECTOR (task_shell_sidebar->priv->selector);
 }
+
+void
+e_task_shell_sidebar_add_source (ETaskShellSidebar *task_shell_sidebar,
+                                 ESource *source)
+{
+	ESourceSelector *selector;
+	GHashTable *client_table;
+	ECal *client;
+	const gchar *uid;
+	const gchar *uri;
+	gchar *message;
+
+	g_return_if_fail (E_IS_TASK_SHELL_SIDEBAR (task_shell_sidebar));
+	g_return_if_fail (E_IS_SOURCE (source));
+
+	client_table = task_shell_sidebar->priv->client_table;
+	selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
+
+	uid = e_source_peek_uid (source);
+	client = g_hash_table_lookup (client_table, uid);
+
+	if (client != NULL)
+		return;
+
+	client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_TODO);
+	g_return_if_fail (client != NULL);
+
+	g_signal_connect_swapped (
+		client, "backend-died",
+		G_CALLBACK (task_shell_sidebar_backend_died_cb),
+		task_shell_sidebar);
+
+	g_signal_connect_swapped (
+		client, "backend-error",
+		G_CALLBACK (task_shell_sidebar_backend_error_cb),
+		task_shell_sidebar);
+
+	g_hash_table_insert (client_table, g_strdup (uid), client);
+	e_source_selector_select_source (selector, source);
+
+	uri = e_cal_get_uri (client);
+	message = g_strdup_printf (_("Opening tasks at %s"), uri);
+	task_shell_sidebar_emit_status_message (task_shell_sidebar, message);
+	g_free (message);
+
+	g_signal_connect_swapped (
+		client, "cal-opened",
+		G_CALLBACK (task_shell_sidebar_client_opened_cb),
+		task_shell_sidebar);
+
+	e_cal_open_async (client, FALSE);
+}
+
+void
+e_task_shell_sidebar_remove_source (ETaskShellSidebar *task_shell_sidebar,
+                                    ESource *source)
+{
+	ESourceSelector *selector;
+	GHashTable *client_table;
+	ECal *client;
+	const gchar *uid;
+
+	g_return_if_fail (E_IS_TASK_SHELL_SIDEBAR (task_shell_sidebar));
+	g_return_if_fail (E_IS_SOURCE (source));
+
+	client_table = task_shell_sidebar->priv->client_table;
+	selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
+
+	uid = e_source_peek_uid (source);
+	client = g_hash_table_lookup (client_table, uid);
+
+	if (client == NULL)
+		return;
+
+	task_shell_sidebar_emit_client_removed (task_shell_sidebar, client);
+}

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-sidebar.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-sidebar.h	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-sidebar.h	Fri Oct  3 19:24:59 2008
@@ -22,6 +22,7 @@
 #ifndef E_TASK_SHELL_SIDEBAR_H
 #define E_TASK_SHELL_SIDEBAR_H
 
+#include <libecal/e-cal.h>
 #include <libedataserverui/e-source-selector.h>
 
 #include <shell/e-shell-sidebar.h>
@@ -59,6 +60,14 @@
 
 struct _ETaskShellSidebarClass {
 	EShellSidebarClass parent_class;
+
+	/* Signals */
+	void	(*client_added)			(ETaskShellSidebar *task_shell_sidebar,
+						 ECal *client);
+	void	(*client_removed)		(ETaskShellSidebar *task_shell_sidebar,
+						 ECal *client);
+	void	(*status_message)		(ETaskShellSidebar *task_shell_sidebar,
+						 const gchar *status_message);
 };
 
 GType		e_task_shell_sidebar_get_type	(void);
@@ -66,6 +75,11 @@
 ESourceSelector *
 		e_task_shell_sidebar_get_selector
 						(ETaskShellSidebar *task_shell_sidebar);
+void		e_task_shell_sidebar_add_source	(ETaskShellSidebar *task_shell_sidebar,
+						 ESource *source);
+void		e_task_shell_sidebar_remove_source
+						(ETaskShellSidebar *task_shell_sidebar,
+						 ESource *source);
 
 G_END_DECLS
 

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.c	Fri Oct  3 19:24:59 2008
@@ -64,14 +64,14 @@
                        ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModelComponent *comp_data;
 	GSList *list;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
 
-	list = e_task_table_get_selected (task_table);
+	list = e_calendar_table_get_selected (task_table);
 	g_return_if_fail (list != NULL);
 	comp_data = list->data;
 	g_slist_free (list);
@@ -87,11 +87,11 @@
                                ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
-	e_task_table_copy_clipboard (task_table);
+	e_calendar_table_copy_clipboard (task_table);
 }
 
 static void
@@ -99,11 +99,11 @@
                               ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
-	e_task_table_cut_clipboard (task_table);
+	e_calendar_table_cut_clipboard (task_table);
 }
 
 static void
@@ -111,11 +111,11 @@
                                 ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
-	e_task_table_paste_clipboard (task_table);
+	e_calendar_table_paste_clipboard (task_table);
 }
 
 static void
@@ -124,7 +124,7 @@
 {
 	ETaskShellContent *task_shell_content;
 	ECalComponentPreview *task_preview;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	const gchar *status_message;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
@@ -133,7 +133,7 @@
 
 	status_message = _("Deleting selected tasks...");
 	e_task_shell_view_set_status_message (task_shell_view, status_message);
-	e_task_table_delete_selected (task_table);
+	e_calendar_table_delete_selected (task_table);
 	e_task_shell_view_set_status_message (task_shell_view, NULL);
 
 	e_cal_component_preview_clear (task_preview);
@@ -144,7 +144,7 @@
                         ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModelComponent *comp_data;
 	ECalComponent *comp;
 	icalcomponent *clone;
@@ -154,7 +154,7 @@
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
 
-	list = e_task_table_get_selected (task_table);
+	list = e_calendar_table_get_selected (task_table);
 	g_return_if_fail (list != NULL);
 	comp_data = list->data;
 	g_slist_free (list);
@@ -199,7 +199,7 @@
         ETaskShellSidebar *task_shell_sidebar;
         EShellWindow *shell_window;
         EShellView *shell_view;
-        ETaskTable *task_table;
+        ECalendarTable *task_table;
         ECal *client;
         ECalModel *model;
         ESourceSelector *selector;
@@ -215,7 +215,7 @@
 
         task_shell_content = task_shell_view->priv->task_shell_content;
         task_table = e_task_shell_content_get_task_table (task_shell_content);
-        model = e_task_table_get_model (task_table);
+        model = e_calendar_table_get_model (task_table);
 
         task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
         selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
@@ -277,13 +277,13 @@
                            ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ETable *table;
 	GtkPrintOperationAction print_action;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
-	table = e_task_table_get_table (task_table);
+	table = e_calendar_table_get_table (task_table);
 
 	print_action = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG;
 	print_table (table, _("Print Tasks"), _("Tasks"), print_action);
@@ -294,13 +294,13 @@
                                    ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ETable *table;
 	GtkPrintOperationAction print_action;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
-	table = e_task_table_get_table (task_table);
+	table = e_calendar_table_get_table (task_table);
 
 	print_action = GTK_PRINT_OPERATION_ACTION_PREVIEW;
 	print_table (table, _("Print Tasks"), _("Tasks"), print_action);
@@ -362,18 +362,19 @@
                               ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModel *model;
 	GSList *list, *iter;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
-	list = e_task_table_get_selected (task_table);
-	model = e_task_table_get_model (task_table);
+	list = e_calendar_table_get_selected (task_table);
+	model = e_calendar_table_get_model (task_table);
 
 	for (iter = list; iter != NULL; iter = iter->next) {
 		ECalModelComponent *comp_data = iter->data;
-		e_cal_model_tasks_mark_comp_complete (model, comp_data);
+		e_cal_model_tasks_mark_comp_complete (
+			E_CAL_MODEL_TASKS (model), comp_data);
 	}
 
 	g_slist_free (list);
@@ -384,18 +385,19 @@
                                 ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModel *model;
 	GSList *list, *iter;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
-	list = e_task_table_get_selected (task_table);
-	model = e_task_table_get_model (task_table);
+	list = e_calendar_table_get_selected (task_table);
+	model = e_calendar_table_get_model (task_table);
 
 	for (iter = list; iter != NULL; iter = iter->next) {
 		ECalModelComponent *comp_data = iter->data;
-		e_cal_model_tasks_mark_comp_incomplete (model, comp_data);
+		e_cal_model_tasks_mark_comp_incomplete (
+			E_CAL_MODEL_TASKS (model), comp_data);
 	}
 
 	g_slist_free (list);
@@ -406,7 +408,7 @@
                     ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModelComponent *comp_data;
 	ECal *client;
 	ECalComponent *comp;
@@ -416,7 +418,7 @@
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
 
-	list = e_task_table_get_selected (task_table);
+	list = e_calendar_table_get_selected (task_table);
 	g_return_if_fail (list != NULL);
 	comp_data = list->data;
 	g_slist_free (list);
@@ -437,14 +439,14 @@
                      ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModelComponent *comp_data;
 	GSList *list;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
 
-	list = e_task_table_get_selected (task_table);
+	list = e_calendar_table_get_selected (task_table);
 	g_return_if_fail (list != NULL);
 	comp_data = list->data;
 	g_slist_free (list);
@@ -458,7 +460,7 @@
                          ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModelComponent *comp_data;
 	icalproperty *prop;
 	GdkScreen *screen;
@@ -469,7 +471,7 @@
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
 
-	list = e_task_table_get_selected (task_table);
+	list = e_calendar_table_get_selected (task_table);
 	g_return_if_fail (list != NULL);
 	comp_data = list->data;
 
@@ -505,7 +507,7 @@
                       ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModelComponent *comp_data;
 	ECalComponent *comp;
 	icalcomponent *clone;
@@ -513,9 +515,9 @@
 	GSList *list;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
-	task_table = e_memo_shell_content_get_task_table (task_shell_content);
+	task_table = e_task_shell_content_get_task_table (task_shell_content);
 
-	list = e_task_table_get_selected (task_table);
+	list = e_calendar_table_get_selected (task_table);
 	g_return_if_fail (list != NULL);
 	comp_data = list->data;
 	g_slist_free (list);
@@ -540,7 +542,7 @@
                         ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModelComponent *comp_data;
 	GSList *list;
 	gchar *filename;
@@ -549,7 +551,7 @@
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
 
-	list = e_task_table_get_selected (task_table);
+	list = e_calendar_table_get_selected (task_table);
 	g_return_if_fail (list != NULL);
 	comp_data = list->data;
 	g_slist_free (list);
@@ -558,7 +560,7 @@
 	if (filename == NULL)
 		return;
 
-	string = e_cal_component_as_string (
+	string = e_cal_get_component_as_string (
 		comp_data->client, comp_data->icalcomp);
 	if (string == NULL) {
 		g_warning ("Could not convert task to a string");
@@ -603,14 +605,14 @@
 
 	{ "task-delete",
 	  GTK_STOCK_DELETE,
-	  N_("Delete Task"),
+	  N_("_Delete Task"),
 	  NULL,
 	  N_("Delete selected tasks"),
 	  G_CALLBACK (action_task_delete_cb) },
 
 	{ "task-forward",
 	  "mail-forward",
-	  N_("_Forward as iCalendar"),
+	  N_("_Forward as iCalendar..."),
 	  "<Control>f",
 	  NULL,  /* XXX Add a tooltip! */
 	  G_CALLBACK (action_task_forward_cb) },
@@ -657,6 +659,13 @@
 	  NULL,  /* XXX Add a tooltip! */
 	  G_CALLBACK (action_task_list_properties_cb) },
 
+	{ "task-list-select-one",
+	  "stock_check-filled",
+	  N_("Show _Only This Task List"),
+	  NULL,
+	  NULL,  /* XXX Add a tooltip! */
+	  G_CALLBACK (action_task_list_select_one_cb) },
+
 	{ "task-mark-complete",
 	  NULL,
 	  N_("_Mark as Complete"),
@@ -708,10 +717,19 @@
 
 	{ "task-save-as",
 	  GTK_STOCK_SAVE_AS,
-	  NULL,
+	  N_("_Save as iCalendar..."),
 	  NULL,
 	  NULL,  /* XXX Add a tooltip! */
-	  G_CALLBACK (action_task_save_as_cb) }
+	  G_CALLBACK (action_task_save_as_cb) },
+
+	/*** Menus ***/
+
+	{ "task-actions-menu",
+	  NULL,
+	  N_("_Actions"),
+	  NULL,
+	  NULL,
+	  NULL }
 };
 
 static GtkToggleActionEntry task_toggle_entries[] = {

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.h	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.h	Fri Oct  3 19:24:59 2008
@@ -30,7 +30,7 @@
 #define E_SHELL_WINDOW_ACTION_TASK_CLIPBOARD_COPY(window) \
 	E_SHELL_WINDOW_ACTION ((window), "task-clipboard-copy")
 #define E_SHELL_WINDOW_ACTION_TASK_CLIPBOARD_CUT(window) \
-	E_SHELL_WINDOW_ACTION ((window), "task-clibpard-cut")
+	E_SHELL_WINDOW_ACTION ((window), "task-clipboard-cut")
 #define E_SHELL_WINDOW_ACTION_TASK_CLIPBOARD_PASTE(window) \
 	E_SHELL_WINDOW_ACTION ((window), "task-clipboard-paste")
 #define E_SHELL_WINDOW_ACTION_TASK_DELETE(window) \

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view-private.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view-private.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view-private.c	Fri Oct  3 19:24:59 2008
@@ -35,7 +35,7 @@
 
 static void
 task_shell_view_table_user_created_cb (ETaskShellView *task_shell_view,
-                                       ETaskTable *task_table)
+                                       ECalendarTable *task_table)
 {
 	ETaskShellSidebar *task_shell_sidebar;
 	ECalModel *model;
@@ -44,7 +44,7 @@
 
 	/* This is the "Click to Add" handler. */
 
-	model = e_task_table_get_model (task_table);
+	model = e_calendar_table_get_model (task_table);
 	client = e_cal_model_get_default_client (model);
 	source = e_cal_get_source (client);
 
@@ -59,12 +59,12 @@
                                           ECal *client)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModel *model;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
-	model = e_task_table_get_model (task_table);
+	model = e_calendar_table_get_model (task_table);
 
 	e_cal_model_add_client (model, client);
 }
@@ -74,12 +74,12 @@
                                             ECal *client)
 {
 	ETaskShellContent *task_shell_content;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModel *model;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
-	model = e_task_table_get_model (task_table);
+	model = e_calendar_table_get_model (task_table);
 
 	e_cal_model_remove_client (model, client);
 }
@@ -181,7 +181,7 @@
 	EShellWindow *shell_window;
 	EShellContent *shell_content;
 	EShellSidebar *shell_sidebar;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModel *model;
 	ETable *table;
 	ESourceSelector *selector;
@@ -197,8 +197,8 @@
 
 	task_shell_content = E_TASK_SHELL_CONTENT (shell_content);
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
-	model = e_task_table_get_model (task_table);
-	table = e_task_table_get_table (task_table);
+	model = e_calendar_table_get_model (task_table);
+	table = e_calendar_table_get_table (task_table);
 
 	task_shell_sidebar = E_TASK_SHELL_SIDEBAR (shell_sidebar);
 	selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
@@ -309,7 +309,80 @@
 void
 e_task_shell_view_execute_search (ETaskShellView *task_shell_view)
 {
+	ETaskShellContent *task_shell_content;
+	EShellView *shell_view;
+	EShellWindow *shell_window;
+	EShellContent *shell_content;
+	GtkAction *action;
+	GString *string;
+	ECalComponentPreview *task_preview;
+	ECalendarTable *task_table;
+	ECalModel *model;
+	FilterRule *rule;
+	const gchar *format;
+	const gchar *text;
+	gchar *query;
+	gint value;
+
+	shell_view = E_SHELL_VIEW (task_shell_view);
+	shell_content = e_shell_view_get_shell_content (shell_view);
+	text = e_shell_content_get_search_text (shell_content);
+
+	shell_window = e_shell_view_get_shell_window (shell_view);
+	action = ACTION (TASK_SEARCH_ANY_FIELD_CONTAINS);
+	value = gtk_radio_action_get_current_value (
+		GTK_RADIO_ACTION (action));
+
+	if (text == NULL || *text == '\0') {
+		text = "";
+		value = TASK_SEARCH_SUMMARY_CONTAINS;
+	}
+
+	switch (value) {
+		default:
+			text = "";
+			/* fall through */
+
+		case TASK_SEARCH_SUMMARY_CONTAINS:
+			format = "(contains? \"summary\" %s)";
+			break;
+
+		case TASK_SEARCH_DESCRIPTION_CONTAINS:
+			format = "(contains? \"description\" %s)";
+			break;
+
+		case TASK_SEARCH_ANY_FIELD_CONTAINS:
+			format = "(contains? \"any\" %s)";
+			break;
+	}
+
+	/* Build the query. */
+	string = g_string_new ("");
+	e_sexp_encode_string (string, text);
+	query = g_strdup_printf (format, string->str);
+	g_string_free (string, TRUE);
+
+	/* Apply selected filter. */
+	value = e_shell_content_get_filter_value (shell_content);
 	/* FIXME */
+
+	/* XXX This is wrong.  We need to programmatically construct a
+	 *     FilterRule, tell it to build code, and pass the resulting
+	 *     expression string to ECalModel. */
+	rule = filter_rule_new ();
+	e_shell_content_set_search_rule (shell_content, rule);
+	g_object_unref (rule);
+
+	/* Submit the query. */
+	task_shell_content = task_shell_view->priv->task_shell_content;
+	task_table = e_task_shell_content_get_task_table (task_shell_content);
+	model = e_calendar_table_get_model (task_table);
+	e_cal_model_set_search_query (model, query);
+	g_free (query);
+
+	task_preview =
+		e_task_shell_content_get_task_preview (task_shell_content);
+	e_cal_component_preview_clear (task_preview);
 }
 
 void
@@ -344,7 +417,7 @@
 	if (itip_organizer_is_user (comp, comp_data->client))
 		flags |= COMP_EDITOR_USER_ORG;
 
-	if (!itip_organizer_has_attendees (comp))
+	if (!e_cal_component_has_attendees (comp))
 		flags |= COMP_EDITOR_USER_ORG;
 
 	editor = task_editor_new (comp_data->client, flags);
@@ -396,7 +469,7 @@
 	ETaskShellContent *task_shell_content;
 	EShellView *shell_view;
 	EShellSidebar *shell_sidebar;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ECalModel *model;
 	ETable *table;
 	GString *string;
@@ -410,8 +483,8 @@
 	task_shell_content = task_shell_view->priv->task_shell_content;
 	task_table = e_task_shell_content_get_task_table (task_shell_content);
 
-	model = e_task_table_get_model (task_table);
-	table = e_task_table_get_table (task_table);
+	model = e_calendar_table_get_model (task_table);
+	table = e_calendar_table_get_table (task_table);
 
 	n_rows = e_table_model_row_count (E_TABLE_MODEL (model));
 	n_selected = e_table_selected_count (table);

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view-private.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view-private.h	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view-private.h	Fri Oct  3 19:24:59 2008
@@ -35,10 +35,13 @@
 #include "e-util/gconf-bridge.h"
 
 #include "calendar/common/authentication.h"
-#include "calendar/gui/misc.h"
+#include "calendar/gui/comp-util.h"
 #include "calendar/gui/e-cal-component-preview.h"
+#include "calendar/gui/e-cal-model-tasks.h"
 #include "calendar/gui/e-calendar-selector.h"
+#include "calendar/gui/print.h"
 #include "calendar/gui/dialogs/calendar-setup.h"
+#include "calendar/gui/dialogs/copy-source-dialog.h"
 #include "calendar/gui/dialogs/task-editor.h"
 
 #include "e-task-shell-content.h"

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view.c	Fri Oct  3 19:24:59 2008
@@ -82,7 +82,7 @@
 	EShellWindow *shell_window;
 	ESourceSelector *selector;
 	ETable *table;
-	ETaskTable *task_table;
+	ECalendarTable *task_table;
 	ESource *source;
 	GtkAction *action;
 	GSList *list, *iter;
@@ -107,10 +107,10 @@
 	task_shell_sidebar = priv->task_shell_sidebar;
 	selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
 
-	table = e_task_table_get_table (task_table);
+	table = e_calendar_table_get_table (task_table);
 	n_selected = e_table_selected_count (table);
 
-	list = e_task_table_get_selected (task_table);
+	list = e_calendar_table_get_selected (task_table);
 	for (iter = list; iter != NULL; iter = iter->next) {
 		ECalModelComponent *comp_data = iter->data;
 		icalproperty *prop;
@@ -124,7 +124,7 @@
 		if (e_cal_get_static_capability (comp_data->client, cap))
 			assignable = FALSE;
 
-		cap = CAL_STATIC_NO_CONV_TO_ASSIGN_TASK;
+		cap = CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK;
 		if (e_cal_get_static_capability (comp_data->client, cap))
 			assignable = FALSE;
 

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/action-groups.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/action-groups.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/action-groups.sgml	Fri Oct  3 19:24:59 2008
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-content.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-content.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-content.sgml	Fri Oct  3 19:24:59 2008
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 
@@ -94,3 +92,270 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION e_shell_content_get_shell_view ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_context ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_context ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ context: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_filter_action ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_filter_action ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ filter_action: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_filter_value ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_filter_value ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ filter_value: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_filter_visible ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_filter_visible ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ filter_visible: 
+
+
+<!-- ##### FUNCTION e_shell_content_add_filter_separator_after ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ action_value: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_search_context ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_search_rule ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_search_rule ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ search_rule: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_search_text ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_search_text ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ search_text: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_search_value ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_search_value ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ search_value: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_search_visible ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_search_visible ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ search_visible: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_scope_action ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_scope_action ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ scope_action: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_scope_value ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_scope_value ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ scope_value: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_scope_visible ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_scope_visible ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ scope_visible: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_view_id ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_view_id ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ view_id: 
+
+
+<!-- ##### FUNCTION e_shell_content_run_advanced_search_dialog ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+
+
+<!-- ##### FUNCTION e_shell_content_run_edit_searches_dialog ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+
+
+<!-- ##### FUNCTION e_shell_content_run_save_search_dialog ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+
+

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-importer.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-importer.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-importer.sgml	Fri Oct  3 19:24:59 2008
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-module.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-module.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-module.sgml	Fri Oct  3 19:24:59 2008
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml	Fri Oct  3 19:24:59 2008
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 
@@ -49,3 +47,48 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION e_shell_sidebar_get_shell_view ##### -->
+<para>
+
+</para>
+
+ shell_sidebar: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_sidebar_get_primary_text ##### -->
+<para>
+
+</para>
+
+ shell_sidebar: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_sidebar_set_primary_text ##### -->
+<para>
+
+</para>
+
+ shell_sidebar: 
+ primary_text: 
+
+
+<!-- ##### FUNCTION e_shell_sidebar_get_secondary_text ##### -->
+<para>
+
+</para>
+
+ shell_sidebar: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_sidebar_set_secondary_text ##### -->
+<para>
+
+</para>
+
+ shell_sidebar: 
+ secondary_text: 
+
+

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-switcher.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-switcher.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-switcher.sgml	Fri Oct  3 19:24:59 2008
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-taskbar.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-taskbar.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-taskbar.sgml	Fri Oct  3 19:24:59 2008
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 
@@ -44,3 +42,38 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION e_shell_taskbar_get_shell_view ##### -->
+<para>
+
+</para>
+
+ shell_taskbar: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_taskbar_get_message ##### -->
+<para>
+
+</para>
+
+ shell_taskbar: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_taskbar_set_message ##### -->
+<para>
+
+</para>
+
+ shell_taskbar: 
+ message: 
+
+
+<!-- ##### FUNCTION e_shell_taskbar_unset_message ##### -->
+<para>
+
+</para>
+
+ shell_taskbar: 
+
+

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-view.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-view.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-view.sgml	Fri Oct  3 19:24:59 2008
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-window.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-window.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-window.sgml	Fri Oct  3 19:24:59 2008
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell.sgml	Fri Oct  3 19:24:59 2008
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/shell-actions.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/shell-actions.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/shell-actions.sgml	Fri Oct  3 19:24:59 2008
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: branches/kill-bonobo/e-util/e-util.c
==============================================================================
--- branches/kill-bonobo/e-util/e-util.c	(original)
+++ branches/kill-bonobo/e-util/e-util.c	Fri Oct  3 19:24:59 2008
@@ -132,8 +132,10 @@
 		ui_manager, filename, &error);
 	g_free (filename);
 
-	if (error != NULL)
-		g_error ("%s", error->message);  /* does not return */
+	if (error != NULL) {
+		g_error ("%s: %s", basename, error->message);
+		g_assert_not_reached ();
+	}
 
 	return merge_id;
 }

Modified: branches/kill-bonobo/shell/e-shell-content.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell-content.h	(original)
+++ branches/kill-bonobo/shell/e-shell-content.h	Fri Oct  3 19:24:59 2008
@@ -53,7 +53,7 @@
 
 G_BEGIN_DECLS
 
-/* Avoid including <e-shell-view.h> */
+/* Avoid including <e-shell-view.h>, because it includes us! */
 struct _EShellView;
 
 typedef struct _EShellContent EShellContent;

Modified: branches/kill-bonobo/shell/e-shell-module.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell-module.h	(original)
+++ branches/kill-bonobo/shell/e-shell-module.h	Fri Oct  3 19:24:59 2008
@@ -52,7 +52,7 @@
 
 G_BEGIN_DECLS
 
-/* Avoid including <e-shell.h> */
+/* Avoid including <e-shell.h>, because it includes us! */
 struct _EShell;
 
 typedef struct _EShellModule EShellModule;

Modified: branches/kill-bonobo/shell/e-shell-sidebar.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell-sidebar.h	(original)
+++ branches/kill-bonobo/shell/e-shell-sidebar.h	Fri Oct  3 19:24:59 2008
@@ -51,7 +51,7 @@
 
 G_BEGIN_DECLS
 
-/* Avoid including <e-shell-view.h> */
+/* Avoid including <e-shell-view.h>, because it includes us! */
 struct _EShellView;
 
 typedef struct _EShellSidebar EShellSidebar;

Modified: branches/kill-bonobo/shell/e-shell-taskbar.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell-taskbar.h	(original)
+++ branches/kill-bonobo/shell/e-shell-taskbar.h	Fri Oct  3 19:24:59 2008
@@ -51,7 +51,7 @@
 
 G_BEGIN_DECLS
 
-/* Avoid including <e-shell-view.h> */
+/* Avoid including <e-shell-view.h>, because it includes us! */
 struct _EShellView;
 
 typedef struct _EShellTaskbar EShellTaskbar;

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	Fri Oct  3 19:24:59 2008
@@ -1519,7 +1519,7 @@
 	{ "search-execute",
 	  GTK_STOCK_FIND,
 	  N_("_Find Now"),
-	  NULL,
+	  "",      /* Block the default Ctrl+F. */
 	  N_("Execute the current search parameters"),
 	  NULL },  /* Handled by EShellContent and subclasses. */
 
@@ -1970,12 +1970,7 @@
 	/* Construct a group of radio actions from the various EShellView
 	 * subclasses and register them with the EShellSwitcher.  These
 	 * actions are manifested as switcher buttons and View->Window
-	 * menu items.
-	 *
-	 * Note: The shell window has already selected a view by now,
-	 * so we have to be careful not to overwrite that when setting
-	 * up the radio action group.  That means not connecting to any
-	 * "changed" signals until after the group is built. */
+	 * menu items. */
 
 	for (ii = 0; ii < n_children; ii++) {
 		EShellViewClass *class;

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	Fri Oct  3 19:24:59 2008
@@ -69,8 +69,6 @@
 	loaded_views = shell_window->priv->loaded_views;
 	g_hash_table_insert (loaded_views, g_strdup (view_name), shell_view);
 
-	g_message ("Creating view \"%s\" on page %d", view_name, page_num);
-
 	/* Add pages to the various shell window notebooks. */
 
 	notebook = GTK_NOTEBOOK (shell_window->priv->content_notebook);
@@ -379,7 +377,7 @@
  * Returns: the requested #EShellView, or %NULL if no such view is
  *          registered
  **/
-gpointer
+EShellView *
 e_shell_window_get_shell_view (EShellWindow *shell_window,
                                const gchar *view_name)
 {
@@ -469,17 +467,20 @@
 	ui_manager = e_shell_window_get_ui_manager (shell_window);
 	iter = gtk_ui_manager_get_action_groups (ui_manager);
 
-	while (iter != NULL && action == NULL) {
+	while (iter != NULL) {
 		GtkActionGroup *action_group = iter->data;
 
 		action = gtk_action_group_get_action (
 			action_group, action_name);
+		if (action != NULL)
+			return action;
+
 		iter = g_list_next (iter);
 	}
 
-	g_return_val_if_fail (action != NULL, NULL);
+	g_critical ("%s: action `%s' not found", G_STRFUNC, action_name);
 
-	return action;
+	return NULL;
 }
 
 /**
@@ -517,7 +518,9 @@
 		iter = g_list_next (iter);
 	}
 
-	g_return_val_if_reached (NULL);
+	g_critical ("%s: action group `%s' not found", G_STRFUNC, group_name);
+
+	return NULL;
 }
 
 /**

Modified: branches/kill-bonobo/shell/e-shell-window.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell-window.h	(original)
+++ branches/kill-bonobo/shell/e-shell-window.h	Fri Oct  3 19:24:59 2008
@@ -51,6 +51,9 @@
 
 G_BEGIN_DECLS
 
+/* Avoid including <e-shell-view.h>, because it includes us! */
+struct _EShellView;
+
 typedef struct _EShellWindow EShellWindow;
 typedef struct _EShellWindowClass EShellWindowClass;
 typedef struct _EShellWindowPrivate EShellWindowPrivate;
@@ -74,7 +77,8 @@
 GtkWidget *	e_shell_window_new		(EShell *shell,
 						 gboolean safe_mode);
 EShell *	e_shell_window_get_shell	(EShellWindow *shell_window);
-gpointer	e_shell_window_get_shell_view	(EShellWindow *shell_window,
+struct _EShellView *
+		e_shell_window_get_shell_view	(EShellWindow *shell_window,
 						 const gchar *view_name);
 GtkUIManager *	e_shell_window_get_ui_manager	(EShellWindow *shell_window);
 GtkAction *	e_shell_window_get_action	(EShellWindow *shell_window,

Modified: branches/kill-bonobo/ui/evolution-tasks.ui
==============================================================================
--- branches/kill-bonobo/ui/evolution-tasks.ui	(original)
+++ branches/kill-bonobo/ui/evolution-tasks.ui	Fri Oct  3 19:24:59 2008
@@ -1,12 +1,12 @@
 <ui>
-  <menubar name='main-menu'/>
+  <menubar name='main-menu'>
     <menu action='file-menu'>
       <placeholder name='file-actions'>
         <menuitem action='task-open'/>
       </placeholder>
       <placeholder name='print-actions'>
-        <menuitem action='task-print-preview'/>
-        <menuitem action='task-print'/>
+        <menuitem action='task-list-print-preview'/>
+        <menuitem action='task-list-print'/>
       </placeholder>
     </menu>
     <menu action='edit-menu'>
@@ -25,14 +25,14 @@
       <menuitem action='task-preview'/>
     </menu>
     <placeholder name='custom-menus'>
-      <menu action='actions-menu'>
-        <menuitem name='task-purge'/>
-        <menuitem name='task-assign'/>
-        <menuitem name='task-forward'/>
+      <menu action='task-actions-menu'>
+        <menuitem action='task-purge'/>
+        <menuitem action='task-assign'/>
+        <menuitem action='task-forward'/>
       </menu>
     </placeholder>
   </menubar>
-  <toolbar name='main-toolbar'/>
+  <toolbar name='main-toolbar'>
     <toolitem action='task-clipboard-cut'/>
     <toolitem action='task-clipboard-copy'/>
     <toolitem action='task-clipboard-paste'/>



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