evolution r36701 - in branches/kill-bonobo: addressbook/gui/component calendar/gui calendar/modules mail shell widgets/misc



Author: mbarnes
Date: Thu Oct 30 20:51:26 2008
New Revision: 36701
URL: http://svn.gnome.org/viewvc/evolution?rev=36701&view=rev

Log:
Add popup menus to the calendar memopad and taskpad.
Implement support for "hide completed tasks" option (not yet tested).
Flesh out most of the Preferences window.  Still need Certificates page.


Removed:
   branches/kill-bonobo/mail/mail-config-factory.c
   branches/kill-bonobo/mail/mail-config-factory.h
Modified:
   branches/kill-bonobo/addressbook/gui/component/autocompletion-config.c
   branches/kill-bonobo/calendar/gui/e-tasks.c
   branches/kill-bonobo/calendar/gui/e-tasks.h
   branches/kill-bonobo/calendar/gui/gnome-cal.c
   branches/kill-bonobo/calendar/gui/gnome-cal.h
   branches/kill-bonobo/calendar/gui/main.c
   branches/kill-bonobo/calendar/modules/e-cal-shell-module.c
   branches/kill-bonobo/calendar/modules/e-cal-shell-sidebar.c
   branches/kill-bonobo/calendar/modules/e-cal-shell-sidebar.h
   branches/kill-bonobo/calendar/modules/e-cal-shell-view-actions.c
   branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.c
   branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.h
   branches/kill-bonobo/calendar/modules/e-task-shell-content.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-private.c
   branches/kill-bonobo/calendar/modules/e-task-shell-view-private.h
   branches/kill-bonobo/mail/Makefile.am
   branches/kill-bonobo/mail/e-mail-shell-module.c
   branches/kill-bonobo/mail/e-mail-shell-module.h
   branches/kill-bonobo/mail/em-account-prefs.c
   branches/kill-bonobo/mail/em-account-prefs.h
   branches/kill-bonobo/mail/em-mailer-prefs.h
   branches/kill-bonobo/mail/em-network-prefs.h
   branches/kill-bonobo/shell/e-shell-window.c
   branches/kill-bonobo/widgets/misc/e-preferences-window.c

Modified: branches/kill-bonobo/addressbook/gui/component/autocompletion-config.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/autocompletion-config.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/autocompletion-config.c	Thu Oct 30 20:51:26 2008
@@ -28,10 +28,11 @@
 #include <libedataserverui/e-name-selector-entry.h>
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
-#include <e-preferences-window.h>
 #include <libedataserver/e-source-list.h>
 #include <libedataserverui/e-source-selector.h>
 
+#include "widgets/misc/e-preferences-window.h"
+
 static void
 source_selection_changed_cb (ESourceSelector *source_selector)
 {

Modified: branches/kill-bonobo/calendar/gui/e-tasks.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-tasks.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-tasks.c	Thu Oct 30 20:51:26 2008
@@ -74,9 +74,6 @@
 	/* Calendar search bar for tasks */
 	GtkWidget *search_bar;
 
-	/* Tasks menu */
-	ECalMenu *tasks_menu;
-
 	/* Paned widget */
 	GtkWidget *paned;
 
@@ -87,18 +84,12 @@
 	char *sexp;
 	guint update_timeout;
 
-	/* View instance and the view menus handler */
-	GalViewInstance *view_instance;
-	GalViewMenus *view_menus;
-
 	GList *notifications;
 };
 
 static void setup_widgets (ETasks *tasks);
 static void e_tasks_destroy (GtkObject *object);
-static void update_view (ETasks *tasks);
 
-static void categories_changed_cb (gpointer object, gpointer user_data);
 static void backend_error_cb (ECal *client, const char *message, gpointer data);
 
 /* Signal IDs */
@@ -113,112 +104,6 @@
 
 G_DEFINE_TYPE (ETasks, e_tasks, GTK_TYPE_TABLE)
 
-/* Callback used when the cursor changes in the table */
-static void
-table_cursor_change_cb (ETable *etable, int row, gpointer data)
-{
-	ETasks *tasks;
-	ETasksPrivate *priv;
-	ECalModel *model;
-	ECalModelComponent *comp_data;
-	ECalComponent *comp;
-	const char *uid;
-
-	int n_selected;
-
-	tasks = E_TASKS (data);
-	priv = tasks->priv;
-
-	n_selected = e_table_selected_count (etable);
-
-	/* update the HTML widget */
-	if (n_selected != 1) {
-		e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (priv->preview));
-
-		return;
-	}
-
-	model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-
-	comp_data = e_cal_model_get_component_at (model, e_table_get_cursor_row (etable));
-	comp = e_cal_component_new ();
-	e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
-
-	e_cal_component_preview_display (E_CAL_COMPONENT_PREVIEW (priv->preview), comp_data->client, comp);
-
-	e_cal_component_get_uid (comp, &uid);
-	if (priv->current_uid)
-		g_free (priv->current_uid);
-	priv->current_uid = g_strdup (uid);
-
-	g_object_unref (comp);
-}
-
-ECalMenu *
-e_tasks_get_tasks_menu (ETasks *tasks)
-{
-        g_return_val_if_fail (E_IS_TASKS (tasks), NULL);
-
-        return tasks->priv->tasks_menu;
-}
-
-
-/* Callback used when the selection changes in the table. */
-static void
-table_selection_change_cb (ETable *etable, gpointer data)
-{
-	ETasks *tasks;
-	int n_selected;
-
-	tasks = E_TASKS (data);
-
-	n_selected = e_table_selected_count (etable);
-	g_signal_emit (tasks, e_tasks_signals[SELECTION_CHANGED], 0, n_selected);
-
-	if (n_selected != 1)
-		e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (tasks->priv->preview));
-}
-
-static void
-user_created_cb (GtkWidget *view, ETasks *tasks)
-{
-	ETasksPrivate *priv;
-	ECalendarTable *cal_table;
-	ECal *ecal;
-
-	priv = tasks->priv;
-	cal_table = E_CALENDAR_TABLE (priv->tasks_view);
-
-	if (cal_table->user_created_cal)
-		ecal = cal_table->user_created_cal;
-	else {
-		ECalModel *model;
-
-		model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-		ecal = e_cal_model_get_default_client (model);
-	}
-
-	e_tasks_add_todo_source (tasks, e_cal_get_source (ecal));
-}
-
-/* Callback used when the sexp in the search bar changes */
-static void
-search_bar_sexp_changed_cb (CalSearchBar *cal_search, const char *sexp, gpointer data)
-{
-	ETasks *tasks;
-	ETasksPrivate *priv;
-
-	tasks = E_TASKS (data);
-	priv = tasks->priv;
-
-	if (priv->sexp)
-		g_free (priv->sexp);
-
-	priv->sexp = g_strdup (sexp);
-
-	update_view (tasks);
-}
-
 /* Callback used when the selected category in the search bar changes */
 static void
 search_bar_category_changed_cb (CalSearchBar *cal_search, const char *category, gpointer data)
@@ -234,194 +119,6 @@
 	e_cal_model_set_default_category (model, category);
 }
 
-static gboolean
-vpaned_resized_cb (GtkWidget *widget, GdkEventButton *event, ETasks *tasks)
-{
-	calendar_config_set_task_vpane_pos (gtk_paned_get_position (GTK_PANED (widget)));
-
-	return FALSE;
-}
-
-static void
-set_timezone (ETasks *tasks)
-{
-	ETasksPrivate *priv;
-	icaltimezone *zone;
-	GList *l;
-
-	priv = tasks->priv;
-
-	zone = calendar_config_get_icaltimezone ();
-	for (l = priv->clients_list; l != NULL; l = l->next) {
-		ECal *client = l->data;
-		/* FIXME Error checking */
-		e_cal_set_default_timezone (client, zone, NULL);
-	}
-
-	if (priv->default_client)
-		/* FIXME Error checking */
-		e_cal_set_default_timezone (priv->default_client, zone, NULL);
-
-	if (priv->preview)
-		e_cal_component_preview_set_default_timezone (E_CAL_COMPONENT_PREVIEW (priv->preview), zone);
-}
-
-static void
-timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
-	ETasks *tasks = data;
-
-	set_timezone (tasks);
-}
-
-static void
-update_view (ETasks *tasks)
-{
-	ETasksPrivate *priv;
-	ECalModel *model;
-	char *real_sexp = NULL;
-	char *new_sexp = NULL;
-
-	priv = tasks->priv;
-
-	model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-
-	if ((new_sexp = calendar_config_get_hide_completed_tasks_sexp (FALSE)) != NULL) {
-		real_sexp = g_strdup_printf ("(and %s %s)", new_sexp, priv->sexp);
-		e_cal_model_set_search_query (model, real_sexp);
-		g_free (new_sexp);
-		g_free (real_sexp);
-	} else
-		e_cal_model_set_search_query (model, priv->sexp);
-
-	e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (priv->preview));
-}
-
-static void
-process_completed_tasks (ETasks *tasks, gboolean config_changed)
-{
-	ETasksPrivate *priv;
-
-	g_return_if_fail (tasks != NULL);
-	g_return_if_fail (E_IS_TASKS (tasks));
-
-	priv = tasks->priv;
-
-	e_calendar_table_process_completed_tasks (e_tasks_get_calendar_table (tasks), priv->clients_list, config_changed);
-}
-
-static gboolean
-update_view_cb (ETasks *tasks)
-{
-	ECalModel *model;
-
-	model = e_calendar_table_get_model (E_CALENDAR_TABLE (tasks->priv->tasks_view));
-
-	process_completed_tasks (tasks, FALSE);
-	e_cal_model_tasks_update_due_tasks (E_CAL_MODEL_TASKS (model));
-
-	return TRUE;
-}
-
-static void
-config_hide_completed_tasks_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
-	process_completed_tasks (data, TRUE);
-	update_view (data);
-}
-
-static void
-model_row_changed_cb (ETableModel *etm, int row, gpointer data)
-{
-	ETasks *tasks;
-	ETasksPrivate *priv;
-	ECalModelComponent *comp_data;
-
-	tasks = E_TASKS (data);
-	priv = tasks->priv;
-
-	if (priv->current_uid) {
-		const char *uid;
-
-		comp_data = e_cal_model_get_component_at (E_CAL_MODEL (etm), row);
-		if (comp_data) {
-			uid = icalcomponent_get_uid (comp_data->icalcomp);
-			if (!strcmp (uid ? uid : "", priv->current_uid)) {
-				ETable *etable;
-
-				etable = e_table_scrolled_get_table (
-					E_TABLE_SCROLLED (E_CALENDAR_TABLE (priv->tasks_view)->etable));
-				table_cursor_change_cb (etable, 0, tasks);
-			}
-		}
-	}
-}
-
-static void
-view_progress_cb (ECalModel *model, const char *message, int percent, ECalSourceType type, ETasks *tasks)
-{
-	e_calendar_table_set_status_message (E_CALENDAR_TABLE (e_tasks_get_calendar_table (tasks)),
-			message, percent);
-}
-
-static void
-view_done_cb (ECalModel *model, ECalendarStatus status, ECalSourceType type, ETasks *tasks)
-{
-	e_calendar_table_set_status_message (E_CALENDAR_TABLE (e_tasks_get_calendar_table (tasks)),
-			NULL, -1);
-
-}
-
-static void
-config_preview_state_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
-	gboolean state;
-	GConfValue *value;
-	ETasks *tasks = (ETasks *)data;
-
-	g_return_if_fail (gconf_entry_get_key (entry) != NULL);
-	g_return_if_fail ((value = gconf_entry_get_value (entry)) != NULL);
-
-	state = gconf_value_get_bool (value);
-	e_tasks_show_preview (tasks, state);
-	bonobo_ui_component_set_prop (E_SEARCH_BAR (tasks->priv->search_bar)->ui_component, "/commands/ViewPreview", "state", state ? "1" : "0", NULL);
-}
-
-static void
-setup_config (ETasks *tasks)
-{
-	ETasksPrivate *priv;
-	guint not;
-
-	priv = tasks->priv;
-
-	/* Timezone */
-	set_timezone (tasks);
-
-	not = calendar_config_add_notification_timezone (timezone_changed_cb, tasks);
-	priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
-	not = calendar_config_add_notification_hide_completed_tasks (config_hide_completed_tasks_changed_cb,
-							      tasks);
-	priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
-	not = calendar_config_add_notification_hide_completed_tasks_units (config_hide_completed_tasks_changed_cb,
-							      tasks);
-	priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
-	not = calendar_config_add_notification_hide_completed_tasks_value (config_hide_completed_tasks_changed_cb,
-							      tasks);
-	priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
-	not = calendar_config_add_notification_preview_state (config_preview_state_changed_cb, tasks);
-	priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-}
-
-struct AffectedComponents {
-	ECalendarTable *cal_table;
-	GSList *components; /* contains pointers to ECalModelComponent */
-};
-
 /**
  * get_selected_components_cb
  * Helper function to fill list of selected components in ECalendarTable.
@@ -605,7 +302,6 @@
 			  G_CALLBACK (search_bar_sexp_changed_cb), tasks);
 	g_signal_connect (priv->search_bar, "category_changed",
 			  G_CALLBACK (search_bar_category_changed_cb), tasks);
-	categories_changed_cb (NULL, tasks);
 
 	gtk_table_attach (GTK_TABLE (tasks), priv->search_bar, 0, 1, 0, 1,
 			  GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, 0, 0);
@@ -615,8 +311,6 @@
 	priv->paned = gtk_vpaned_new ();
 	g_signal_connect (priv->paned, "realize", G_CALLBACK (pane_realized), tasks);
 
-	g_signal_connect (G_OBJECT (priv->paned), "button_release_event",
-			  G_CALLBACK (vpaned_resized_cb), tasks);
 	gtk_table_attach (GTK_TABLE (tasks), priv->paned, 0, 1, 1, 2,
 			  GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 	gtk_widget_show (priv->paned);
@@ -656,12 +350,8 @@
 			  "table_drag_data_received", G_CALLBACK(table_drag_data_received_cb), editor);
 	*/
 
-	g_signal_connect (etable, "cursor_change", G_CALLBACK (table_cursor_change_cb), tasks);
 	g_signal_connect (etable, "selection_change", G_CALLBACK (table_selection_change_cb), tasks);
 
-	/* Timeout check to hide completed items */
-	priv->update_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_view_cb, tasks, NULL);
-
 	/* create the task detail */
 	priv->preview = e_cal_component_preview_new ();
 	e_cal_component_preview_set_default_timezone (E_CAL_COMPONENT_PREVIEW (priv->preview), calendar_config_get_icaltimezone ());
@@ -670,15 +360,6 @@
 
 	if (state)
 		gtk_widget_show (priv->preview);
-
-	model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-	g_signal_connect (G_OBJECT (model), "model_row_changed",
-			  G_CALLBACK (model_row_changed_cb), tasks);
-
-	g_signal_connect (G_OBJECT (model), "cal_view_progress",
-				G_CALLBACK (view_progress_cb), tasks);
-	g_signal_connect (G_OBJECT (model), "cal_view_done",
-				G_CALLBACK (view_done_cb), tasks);
 }
 
 /* Class initialization function for the gnome calendar */
@@ -729,29 +410,6 @@
 }
 
 
-static void
-categories_changed_cb (gpointer object, gpointer user_data)
-{
-	GList *cat_list;
-	GPtrArray *cat_array;
-	ETasksPrivate *priv;
-	ETasks *tasks = user_data;
-
-	priv = tasks->priv;
-
-	cat_array = g_ptr_array_new ();
-	cat_list = e_categories_get_list ();
-	while (cat_list != NULL) {
-		if (e_categories_is_searchable ((const char *) cat_list->data))
-			g_ptr_array_add (cat_array, cat_list->data);
-		cat_list = g_list_remove (cat_list, cat_list->data);
-	}
-
-	cal_search_bar_set_categories ((CalSearchBar *)priv->search_bar, cat_array);
-
-	g_ptr_array_free (cat_array, TRUE);
-}
-
 /* Object initialization function for the gnome calendar */
 static void
 e_tasks_init (ETasks *tasks)
@@ -761,20 +419,13 @@
 	priv = g_new0 (ETasksPrivate, 1);
 	tasks->priv = priv;
 
-	e_categories_register_change_listener (G_CALLBACK (categories_changed_cb), tasks);
-
-	setup_config (tasks);
 	setup_widgets (tasks);
 
 	priv->clients = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
 	priv->query = NULL;
-	priv->view_instance = NULL;
-	priv->view_menus = NULL;
 	priv->current_uid = NULL;
 	priv->sexp = g_strdup ("#t");
 	priv->default_client = NULL;
-	priv->tasks_menu = e_cal_menu_new ("org.gnome.evolution.tasks.view");
-	update_view (tasks);
 }
 
 GtkWidget *
@@ -787,18 +438,6 @@
 	return GTK_WIDGET (tasks);
 }
 
-
-void
-e_tasks_set_ui_component (ETasks *tasks,
-			  BonoboUIComponent *ui_component)
-{
-	g_return_if_fail (E_IS_TASKS (tasks));
-	g_return_if_fail (ui_component == NULL || BONOBO_IS_UI_COMPONENT (ui_component));
-
-	e_search_bar_set_ui_component (E_SEARCH_BAR (tasks->priv->search_bar), ui_component);
-}
-
-
 static void
 e_tasks_destroy (GtkObject *object)
 {
@@ -814,8 +453,6 @@
 	if (priv) {
 		GList *l;
 
-		e_categories_unregister_change_listener (G_CALLBACK (categories_changed_cb), tasks);
-
 		/* disconnect from signals on all the clients */
 		for (l = priv->clients_list; l != NULL; l = l->next) {
 			g_signal_handlers_disconnect_matched (l->data, G_SIGNAL_MATCH_DATA,
@@ -839,11 +476,6 @@
 			priv->sexp = NULL;
 		}
 
-		if (priv->update_timeout) {
-			g_source_remove (priv->update_timeout);
-			priv->update_timeout = 0;
-		}
-
 		if (priv->tasks_view_config) {
 			g_object_unref (priv->tasks_view_config);
 			priv->tasks_view_config = NULL;
@@ -880,101 +512,6 @@
 	e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->tasks_view), msg_string, -1);
 }
 
-/* Callback from the calendar client when the calendar is opened */
-static void
-client_cal_opened_cb (ECal *ecal, ECalendarStatus status, ETasks *tasks)
-{
-	ECalModel *model;
-	ESource *source;
-	ETasksPrivate *priv;
-
-	priv = tasks->priv;
-
-	source = e_cal_get_source (ecal);
-	
-	if (status == E_CALENDAR_STATUS_AUTHENTICATION_FAILED)
-		auth_cal_forget_password (ecal);
-
-	switch (status) {
-	case E_CALENDAR_STATUS_OK :
-		g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, client_cal_opened_cb, NULL);
-
-		set_status_message (tasks, _("Loading tasks"));
-		model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-		e_cal_model_add_client (model, ecal);
-
-		set_status_message (tasks, NULL);
-		break;
-	case E_CALENDAR_STATUS_BUSY :
-		break;
-	case E_CALENDAR_STATUS_REPOSITORY_OFFLINE:
-		e_error_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))), "calendar:prompt-no-contents-offline-tasks", NULL);
-	default :
-		/* Make sure the source doesn't disappear on us */
-		g_object_ref (source);
-
-		priv->clients_list = g_list_remove (priv->clients_list, ecal);
-		g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_DATA,
-						      0, 0, NULL, NULL, tasks);
-
-		/* Do this last because it unrefs the client */
-		g_hash_table_remove (priv->clients,  e_source_peek_uid (source));
-
-		g_signal_emit (tasks, e_tasks_signals[SOURCE_REMOVED], 0, source);
-
-		set_status_message (tasks, NULL);
-		g_object_unref (source);
-
-		break;
-	}
-}
-
-static void
-default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, ETasks *tasks)
-{
-	ECalModel *model;
-	ESource *source;
-	ETasksPrivate *priv;
-
-	priv = tasks->priv;
-
-	source = e_cal_get_source (ecal);
-
-	if (status == E_CALENDAR_STATUS_AUTHENTICATION_FAILED)
-		auth_cal_forget_password (ecal);
-
-	switch (status) {
-	case E_CALENDAR_STATUS_OK :
-		g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, default_client_cal_opened_cb, NULL);
-		model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-
-		e_cal_model_set_default_client (model, ecal);
-		set_status_message (tasks, NULL);
-		break;
-	case E_CALENDAR_STATUS_BUSY:
-		break;
-	default :
-		/* Make sure the source doesn't disappear on us */
-		g_object_ref (source);
-
-		priv->clients_list = g_list_remove (priv->clients_list, ecal);
-		g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_DATA,
-						      0, 0, NULL, NULL, tasks);
-
-		/* Do this last because it unrefs the client */
-		g_hash_table_remove (priv->clients,  e_source_peek_uid (source));
-
-		g_signal_emit (tasks, e_tasks_signals[SOURCE_REMOVED], 0, source);
-
-		set_status_message (tasks, NULL);
-		g_object_unref (priv->default_client);
-		priv->default_client = NULL;
-		g_object_unref (source);
-
-		break;
-	}
-}
-
 typedef void (*open_func) (ECal *, ECalendarStatus, ETasks *);
 
 static gboolean
@@ -1039,52 +576,6 @@
 	gtk_window_present (GTK_WINDOW (editor));
 }
 
-void
-e_tasks_show_preview (ETasks *tasks, gboolean state)
-{
-	ETasksPrivate *priv;
-
-	g_return_if_fail (tasks != NULL);
-	g_return_if_fail (E_IS_TASKS (tasks));
-	priv = tasks->priv;
-
-	if (state) {
-		ECalModel *model;
-		ECalModelComponent *comp_data;
-		ECalComponent *comp;
-		ETable *etable;
-		const char *uid;
-		int n_selected;
-
-		etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (E_CALENDAR_TABLE (priv->tasks_view)->etable));
-		n_selected = e_table_selected_count (etable);
-
-		if (n_selected != 1) {
-			e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (priv->preview));
-		} else {
-			model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-
-			comp_data = e_cal_model_get_component_at (model, e_table_get_cursor_row (etable));
-			comp = e_cal_component_new ();
-			e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
-
-			e_cal_component_preview_display (E_CAL_COMPONENT_PREVIEW (priv->preview), comp_data->client, comp);
-
-			e_cal_component_get_uid (comp, &uid);
-			if (priv->current_uid)
-				g_free (priv->current_uid);
-			priv->current_uid = g_strdup (uid);
-
-			g_object_unref (comp);
-		}
-		gtk_widget_show (priv->preview);
-
-	} else	{
-		e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (priv->preview));
-		gtk_widget_hide (priv->preview);
-	}
-}
-
 gboolean
 e_tasks_remove_todo_source (ETasks *tasks, ESource *source)
 {
@@ -1150,68 +641,6 @@
 	return TRUE;
 }
 
-ECal *
-e_tasks_get_default_client (ETasks *tasks)
-{
-	ETasksPrivate *priv;
-
-	g_return_val_if_fail (tasks != NULL, NULL);
-	g_return_val_if_fail (E_IS_TASKS (tasks), NULL);
-
-	priv = tasks->priv;
-
-	return e_cal_model_get_default_client (e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view)));
-}
-
-/**
- * e_tasks_complete_selected:
- * @tasks: A tasks control widget
- *
- * Marks the selected tasks complete
- **/
-void
-e_tasks_complete_selected (ETasks *tasks)
-{
-	ETasksPrivate *priv;
-	ECalendarTable *cal_table;
-
-	g_return_if_fail (tasks != NULL);
-	g_return_if_fail (E_IS_TASKS (tasks));
-
-	priv = tasks->priv;
-
-	cal_table = E_CALENDAR_TABLE (priv->tasks_view);
-
-	set_status_message (tasks, _("Completing tasks..."));
-	e_calendar_table_complete_selected (cal_table);
-	set_status_message (tasks, NULL);
-}
-
-/**
- * e_tasks_delete_selected:
- * @tasks: A tasks control widget.
- *
- * Deletes the selected tasks in the task list.
- **/
-void
-e_tasks_delete_selected (ETasks *tasks)
-{
-	ETasksPrivate *priv;
-	ECalendarTable *cal_table;
-
-	g_return_if_fail (tasks != NULL);
-	g_return_if_fail (E_IS_TASKS (tasks));
-
-	priv = tasks->priv;
-
-	cal_table = E_CALENDAR_TABLE (priv->tasks_view);
-	set_status_message (tasks, _("Deleting selected objects..."));
-	e_calendar_table_delete_selected (cal_table);
-	set_status_message (tasks, NULL);
-
-	e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (priv->preview));
-}
-
 /**
  * e_tasks_expunge:
  * @tasks: A tasks control widget
@@ -1301,24 +730,3 @@
 
 	return;
 }
-
-/**
- * e_tasks_get_calendar_table:
- * @tasks: A tasks widget.
- *
- * Queries the #ECalendarTable contained in a tasks widget.
- *
- * Return value: The #ECalendarTable that the tasks widget uses to display its
- * information.
- **/
-ECalendarTable *
-e_tasks_get_calendar_table (ETasks *tasks)
-{
-	ETasksPrivate *priv;
-
-	g_return_val_if_fail (tasks != NULL, NULL);
-	g_return_val_if_fail (E_IS_TASKS (tasks), NULL);
-
-	priv = tasks->priv;
-	return E_CALENDAR_TABLE (priv->tasks_view);
-}

Modified: branches/kill-bonobo/calendar/gui/e-tasks.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-tasks.h	(original)
+++ branches/kill-bonobo/calendar/gui/e-tasks.h	Thu Oct 30 20:51:26 2008
@@ -63,29 +63,15 @@
 
 GtkWidget *e_tasks_new             (void);
 
-void       e_tasks_set_ui_component  (ETasks            *tasks,
-				      BonoboUIComponent *ui_component);
-
 gboolean   e_tasks_add_todo_source (ETasks *tasks, ESource *source);
 gboolean   e_tasks_remove_todo_source (ETasks *tasks, ESource *source);
 gboolean   e_tasks_set_default_source (ETasks *tasks, ESource *source);
-ECal      *e_tasks_get_default_client    (ETasks *tasks);
-
 void       e_tasks_open_task         (ETasks		*tasks);
 void       e_tasks_open_task_id      (ETasks		*tasks,
 				      const char *src_uid,
 				      const char *comp_uid,
 				      const char *comp_rid);
 void       e_tasks_new_task          (ETasks            *tasks);
-void       e_tasks_complete_selected (ETasks            *tasks);
-void       e_tasks_delete_selected   (ETasks            *tasks);
 void       e_tasks_delete_completed  (ETasks            *tasks);
 
-void e_tasks_show_preview (ETasks *tasks, gboolean state);
-void e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic);
-void e_tasks_discard_view_menus (ETasks *tasks);
-
-struct _ECalMenu *e_tasks_get_tasks_menu (ETasks *tasks);
-ECalendarTable *e_tasks_get_calendar_table (ETasks *tasks);
-
 #endif /* _E_TASKS_H_ */

Modified: branches/kill-bonobo/calendar/gui/gnome-cal.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/gnome-cal.c	(original)
+++ branches/kill-bonobo/calendar/gui/gnome-cal.c	Thu Oct 30 20:51:26 2008
@@ -55,7 +55,6 @@
 #include "e-comp-editor-registry.h"
 #include "dialogs/delete-error.h"
 #include "dialogs/event-editor.h"
-#include "dialogs/task-editor.h"
 #include "comp-util.h"
 #include "e-calendar-marshal.h"
 #include "e-cal-model-calendar.h"
@@ -68,11 +67,9 @@
 #include "e-cal-list-view-config.h"
 #include "e-mini-calendar-config.h"
 #include "e-calendar-table-config.h"
-#include "e-memo-table-config.h"
 #include "evolution-calendar.h"
 #include "gnome-cal.h"
 #include "calendar-component.h"
-#include "memos-component.h"
 #include "cal-search-bar.h"
 #include "calendar-commands.h"
 #include "calendar-config.h"
@@ -84,7 +81,6 @@
 #include "common/authentication.h"
 #include "e-cal-popup.h"
 #include "e-cal-menu.h"
-#include "e-cal-model-tasks.h"
 
 /* FIXME glib 2.4 and above has this */
 #ifndef G_MAXINT32
@@ -118,9 +114,6 @@
 
 	ECalendar   *date_navigator;
 	EMiniCalendarConfig *date_navigator_config;
-	GtkWidget   *todo;
-
-	GtkWidget   *memo;
 
 	GtkWidget   *day_view;
 	GtkWidget   *work_week_view;
@@ -133,8 +126,6 @@
 
 	/* plugin menu managers */
 	ECalMenu    *calendar_menu;
-	ECalMenu    *taskpad_menu;
-	ECalMenu    *memopad_menu;
 
 	/* Calendar query for the date navigator */
 	GList       *dn_queries; /* list of CalQueries */
@@ -192,10 +183,8 @@
 enum {
 	DATES_SHOWN_CHANGED,
 	CALENDAR_SELECTION_CHANGED,
-	TASKPAD_SELECTION_CHANGED,
 	MEMOPAD_SELECTION_CHANGED,
 	CALENDAR_FOCUS_CHANGE,
-	TASKPAD_FOCUS_CHANGE,
 	MEMOPAD_FOCUS_CHANGE,
 	GOTO_DATE,
 	SOURCE_ADDED,
@@ -300,25 +289,6 @@
 				g_cclosure_marshal_VOID__VOID,
 				G_TYPE_NONE, 0);
 
-	gnome_calendar_signals[TASKPAD_SELECTION_CHANGED] =
-		g_signal_new ("taskpad_selection_changed",
-				G_TYPE_FROM_CLASS (object_class),
-				G_SIGNAL_RUN_LAST,
-				G_STRUCT_OFFSET (GnomeCalendarClass, taskpad_selection_changed),
-				NULL, NULL,
-				g_cclosure_marshal_VOID__VOID,
-				G_TYPE_NONE, 0);
-
-	gnome_calendar_signals[MEMOPAD_SELECTION_CHANGED] =
-		g_signal_new ("memopad_selection_changed",
-				G_TYPE_FROM_CLASS (object_class),
-				G_SIGNAL_RUN_LAST,
-				G_STRUCT_OFFSET (GnomeCalendarClass, memopad_selection_changed),
-				NULL, NULL,
-				g_cclosure_marshal_VOID__VOID,
-				G_TYPE_NONE, 0);
-
-
 	gnome_calendar_signals[CALENDAR_FOCUS_CHANGE] =
 		g_signal_new ("calendar_focus_change",
 				G_TYPE_FROM_CLASS (object_class),
@@ -329,26 +299,6 @@
 				G_TYPE_NONE, 1,
 				G_TYPE_BOOLEAN);
 
-	gnome_calendar_signals[TASKPAD_FOCUS_CHANGE] =
-		g_signal_new ("taskpad_focus_change",
-				G_TYPE_FROM_CLASS (object_class),
-				G_SIGNAL_RUN_FIRST,
-				G_STRUCT_OFFSET (GnomeCalendarClass, taskpad_focus_change),
-				NULL, NULL,
-				g_cclosure_marshal_VOID__BOOLEAN,
-				G_TYPE_NONE, 1,
-				G_TYPE_BOOLEAN);
-
-	gnome_calendar_signals[MEMOPAD_FOCUS_CHANGE] =
-		g_signal_new ("memopad_focus_change",
-				G_TYPE_FROM_CLASS (object_class),
-				G_SIGNAL_RUN_FIRST,
-				G_STRUCT_OFFSET (GnomeCalendarClass, memopad_focus_change),
-				NULL, NULL,
-				g_cclosure_marshal_VOID__BOOLEAN,
-				G_TYPE_NONE, 1,
-				G_TYPE_BOOLEAN);
-
 	gnome_calendar_signals[SOURCE_ADDED] =
 		g_signal_new ("source_added",
 			      G_TYPE_FROM_CLASS (object_class),
@@ -397,11 +347,7 @@
 
 	class->dates_shown_changed = NULL;
 	class->calendar_selection_changed = NULL;
-	class->taskpad_selection_changed = NULL;
-	class->memopad_selection_changed = NULL;
 	class->calendar_focus_change = NULL;
-	class->taskpad_focus_change = NULL;
-	class->memopad_focus_change = NULL;
 	class->source_added = NULL;
 	class->source_removed = NULL;
 	class->goto_date = gnome_calendar_goto_date;
@@ -979,8 +925,9 @@
 						 category);
 	}
 
+	/* [KILL-BONOBO] Delete this when moved to ECalShellView.
 	model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
-	e_cal_model_set_default_category (model, category);
+	e_cal_model_set_default_category (model, category); */
 }
 
 static void
@@ -1031,35 +978,6 @@
 }
 
 
-/* Callback used when the taskpad receives a focus event.  We emit the
- * corresponding signal so that parents can change the menus as appropriate.
- */
-static gint
-table_canvas_focus_change_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data)
-{
-	GnomeCalendar *gcal;
-
-	gcal = GNOME_CALENDAR (data);
-
-	g_signal_emit (gcal, gnome_calendar_signals [TASKPAD_FOCUS_CHANGE], 0,
-		       event->in ? TRUE : FALSE);
-
-	return FALSE;
-}
-
-static gint
-memo_canvas_focus_change_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data)
-{
-	GnomeCalendar *gcal;
-
-	gcal = GNOME_CALENDAR (data);
-
-	g_signal_emit (gcal, gnome_calendar_signals [MEMOPAD_FOCUS_CHANGE], 0,
-		       event->in ? TRUE : FALSE);
-
-	return FALSE;
-}
-
 static gint
 calendar_focus_change_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data)
 {
@@ -1114,29 +1032,6 @@
 			  G_CALLBACK (calendar_focus_change_cb), gcal);
 }
 
-/* Callback used when the selection in the taskpad table changes.  We just proxy
- * the signal with our own one.
- */
-static void
-table_selection_change_cb (ETable *etable, gpointer data)
-{
-	GnomeCalendar *gcal;
-
-	gcal = GNOME_CALENDAR (data);
-
-	g_signal_emit (gcal, gnome_calendar_signals[TASKPAD_SELECTION_CHANGED], 0);
-}
-
-static void
-memo_selection_change_cb (ETable *etable, gpointer data)
-{
-	GnomeCalendar *gcal;
-
-	gcal = GNOME_CALENDAR (data);
-
-	g_signal_emit (gcal, gnome_calendar_signals[MEMOPAD_SELECTION_CHANGED], 0);
-}
-
 static void
 set_week_start (GnomeCalendar *calendar)
 {
@@ -1457,26 +1352,15 @@
 static void
 view_progress_cb (ECalModel *model, const char *message, int percent, ECalSourceType type, GnomeCalendar *gcal)
 {
-	if (type == E_CAL_SOURCE_TYPE_EVENT) {
+	if (type == E_CAL_SOURCE_TYPE_EVENT)
 		e_calendar_view_set_status_message (E_CALENDAR_VIEW (gcal->priv->week_view), message, percent);
-	} else if (type == E_CAL_SOURCE_TYPE_TODO) {
-		e_calendar_table_set_status_message (E_CALENDAR_TABLE (gcal->priv->todo), message, percent);
-	} else if (type == E_CAL_SOURCE_TYPE_JOURNAL) {
-		e_memo_table_set_status_message (E_MEMO_TABLE (gcal->priv->memo), message);
-	}
 }
 
 static void
 view_done_cb (ECalModel *model, ECalendarStatus status, ECalSourceType type, GnomeCalendar *gcal)
 {
-	if (type == E_CAL_SOURCE_TYPE_EVENT) {
+	if (type == E_CAL_SOURCE_TYPE_EVENT)
 		e_calendar_view_set_status_message (E_CALENDAR_VIEW (gcal->priv->week_view), NULL, -1);
-	} else if (type == E_CAL_SOURCE_TYPE_TODO) {
-		e_calendar_table_set_status_message (E_CALENDAR_TABLE (gcal->priv->todo), NULL, -1);
-	} else if (type == E_CAL_SOURCE_TYPE_JOURNAL) {
-		e_memo_table_set_status_message (E_MEMO_TABLE (gcal->priv->memo), NULL);
-	}
-
 }
 
 GtkWidget *
@@ -1573,20 +1457,6 @@
 
 	update_todo_view (gcal);
 
-	etable = e_calendar_table_get_table (E_CALENDAR_TABLE (priv->todo));
-	g_signal_connect (etable->table_canvas, "focus_in_event",
-			  G_CALLBACK (table_canvas_focus_change_cb), gcal);
-	g_signal_connect (etable->table_canvas, "focus_out_event",
-			  G_CALLBACK (table_canvas_focus_change_cb), gcal);
-
-	g_signal_connect (etable, "selection_change",
-			  G_CALLBACK (table_selection_change_cb), gcal);
-
-	g_signal_connect (e_calendar_table_get_model ((ECalendarTable *)priv->todo), "cal_view_progress",
-				G_CALLBACK (view_progress_cb), gcal);
-	g_signal_connect (e_calendar_table_get_model ((ECalendarTable *)priv->todo), "cal_view_done",
-				G_CALLBACK (view_done_cb), gcal);
-
 	/* Timeout check to hide completed items */
 	priv->update_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_todo_view_cb, gcal, NULL);
 
@@ -1691,21 +1561,6 @@
 	gtk_widget_show (vbox);
 
 	update_memo_view (gcal);
-
-	etable = e_memo_table_get_table (E_MEMO_TABLE (priv->memo));
-	g_signal_connect (etable->table_canvas, "focus_in_event",
-			  G_CALLBACK (memo_canvas_focus_change_cb), gcal);
-	g_signal_connect (etable->table_canvas, "focus_out_event",
-			  G_CALLBACK (memo_canvas_focus_change_cb), gcal);
-
-	g_signal_connect (etable, "selection_change",
-			  G_CALLBACK (memo_selection_change_cb), gcal);
-
-	g_signal_connect (e_memo_table_get_model ((EMemoTable *)priv->memo), "cal_view_progress",
-				G_CALLBACK (view_progress_cb), gcal);
-	g_signal_connect (e_memo_table_get_model ((EMemoTable *)priv->memo), "cal_view_done",
-				G_CALLBACK (view_done_cb), gcal);
-
 }
 
 /* Object initialization function for the gnome calendar */
@@ -1731,7 +1586,6 @@
 	setup_widgets (gcal);
 
 	priv->calendar_menu = e_cal_menu_new("org.gnome.evolution.calendar.view");
-	priv->taskpad_menu = e_cal_menu_new("org.gnome.evolution.calendar.taskpad");
 
 	priv->dn_queries = NULL;
 	priv->sexp = g_strdup ("#t"); /* Match all */
@@ -1799,18 +1653,6 @@
 		g_list_free (priv->notifications);
 		priv->notifications = NULL;
 
-		/* Save the TaskPad layout. */
-		filename = g_build_filename (calendar_component_peek_config_directory (calendar_component_peek ()),
-					     "TaskPad", NULL);
-		e_calendar_table_save_state (E_CALENDAR_TABLE (priv->todo), filename);
-		g_free (filename);
-
-		/* Save the MemoPad layout. */
-		filename = g_build_filename (memos_component_peek_config_directory (memos_component_peek ()),
-					     "MemoPad", NULL);
-		e_memo_table_save_state (E_MEMO_TABLE (priv->memo), filename);
-		g_free (filename);
-
 		if (priv->dn_queries) {
 			for (l = priv->dn_queries; l != NULL; l = l->next) {
 				g_signal_handlers_disconnect_matched ((ECalView *) l->data, G_SIGNAL_MATCH_DATA,
@@ -1827,11 +1669,6 @@
 			priv->sexp = NULL;
 		}
 
-		if (priv->todo_sexp) {
-			g_free (priv->todo_sexp);
-			priv->todo_sexp = NULL;
-		}
-
 		if (priv->update_timeout) {
 			g_source_remove (priv->update_timeout);
 			priv->update_timeout = 0;
@@ -1847,15 +1684,6 @@
 			priv->calendar_menu = NULL;
 		}
 
-		if (priv->taskpad_menu) {
-			g_object_unref (priv->taskpad_menu);
-			priv->taskpad_menu = NULL;
-		}
-
-		if (priv->memopad_menu) {
-			g_object_unref (priv->memopad_menu);
-			priv->memopad_menu = NULL;
-		}
 		/* Disconnect all handlers */
 		cal_model = e_calendar_view_get_model ((ECalendarView *)priv->week_view);
 		g_signal_handlers_disconnect_by_func (cal_model,
@@ -1863,18 +1691,6 @@
 		g_signal_handlers_disconnect_by_func (cal_model,
 				G_CALLBACK (view_done_cb), gcal);
 
-		cal_model = e_calendar_table_get_model ((ECalendarTable *) priv->todo);
-		g_signal_handlers_disconnect_by_func (cal_model,
-				G_CALLBACK (view_progress_cb), gcal);
-		g_signal_handlers_disconnect_by_func (cal_model,
-				G_CALLBACK (view_done_cb), gcal);
-
-		cal_model = e_memo_table_get_model ((EMemoTable *)priv->memo);
-		g_signal_handlers_disconnect_by_func (cal_model,
-				G_CALLBACK (view_progress_cb), gcal);
-		g_signal_handlers_disconnect_by_func (cal_model,
-				G_CALLBACK (view_done_cb), gcal);
-
 		g_free (priv);
 		gcal->priv = NULL;
 	}
@@ -2361,11 +2177,6 @@
 	case E_CAL_SOURCE_TYPE_EVENT:
 		e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);
 		break;
-	case E_CAL_SOURCE_TYPE_TODO:
-		e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), NULL, -1);
-		break;
-	case E_CAL_SOURCE_TYPE_JOURNAL:
-		e_memo_table_set_status_message (E_MEMO_TABLE (priv->memo), NULL);
 	default:
 		break;
 	}
@@ -2432,22 +2243,6 @@
 		e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);
 		break;
 
-	case E_CAL_SOURCE_TYPE_TODO :
-		msg = g_strdup_printf (_("Loading tasks at %s"), e_cal_get_uri (ecal));
-		e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), msg, -1);
-		g_free (msg);
-
-		e_cal_model_add_client (e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)), ecal);
-
-		e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), NULL, -1);
-		break;
-	case E_CAL_SOURCE_TYPE_JOURNAL:
-		msg = g_strdup_printf (_("Loading memos at %s"), e_cal_get_uri (ecal));
-		e_memo_table_set_status_message (E_MEMO_TABLE (priv->memo), msg);
-		g_free (msg);
-		e_cal_model_add_client (e_memo_table_get_model (E_MEMO_TABLE (priv->memo)), ecal);
-		e_memo_table_set_status_message (E_MEMO_TABLE (priv->memo), NULL);
-		break;
 	default:
 		g_return_if_reached ();
 	}
@@ -2471,12 +2266,6 @@
 	case E_CAL_SOURCE_TYPE_EVENT:
 		e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);
 		break;
-	case E_CAL_SOURCE_TYPE_TODO:
-		e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), NULL, -1);
-		break;
-	case E_CAL_SOURCE_TYPE_JOURNAL:
-		e_memo_table_set_status_message (E_MEMO_TABLE (priv->memo), NULL);
-		break;
 	default:
 		break;
 	}
@@ -2522,12 +2311,6 @@
 				ecal);
 		break;
 
-	case E_CAL_SOURCE_TYPE_TODO:
-		e_cal_model_set_default_client (e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)), ecal);
-		break;
-	case E_CAL_SOURCE_TYPE_JOURNAL:
-		e_cal_model_set_default_client (e_memo_table_get_model (E_MEMO_TABLE (priv->memo)), ecal);
-		break;
 	default:
 		break;
         }
@@ -2552,12 +2335,6 @@
 	case E_CAL_SOURCE_TYPE_EVENT :
 		e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), msg, -1);
 		break;
-	case E_CAL_SOURCE_TYPE_TODO :
-		e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), msg, -1);
-		break;
-	case E_CAL_SOURCE_TYPE_JOURNAL:
-		e_memo_table_set_status_message (E_MEMO_TABLE (priv->memo), msg);
-		break;
 	default:
 		g_free (msg);
 		g_return_val_if_reached (FALSE);
@@ -2627,21 +2404,6 @@
 		g_signal_emit (gcal, gnome_calendar_signals[SOURCE_REMOVED], 0, source_type, source);
 		break;
 
-	case E_CAL_SOURCE_TYPE_TODO:
-		id = "calendar:tasks-crashed";
-
-		e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), NULL, -1);
-
-		g_signal_emit (gcal, gnome_calendar_signals[SOURCE_REMOVED], 0, source_type, source);
-		break;
-
-	case E_CAL_SOURCE_TYPE_JOURNAL:
-		id = "calendar:memos-crashed";
-
-		e_memo_table_set_status_message (E_MEMO_TABLE (priv->memo), NULL);
-
-		g_signal_emit (gcal, gnome_calendar_signals[SOURCE_REMOVED], 0, source_type, source);
-		break;
 	default:
 		g_return_if_reached ();
 	}
@@ -2847,16 +2609,6 @@
 		update_query (gcal);
 		break;
 
-	case E_CAL_SOURCE_TYPE_TODO:
-		model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
-		e_cal_model_remove_client (model, client);
-		break;
-
-	case E_CAL_SOURCE_TYPE_JOURNAL:
-		model = e_memo_table_get_model (E_MEMO_TABLE (priv->memo));
-		e_cal_model_remove_client (model, client);
-		break;
-
 	default:
 		g_return_val_if_reached (TRUE);
 	}
@@ -3474,14 +3226,6 @@
 
 }
 
-ECalendarTable*
-gnome_calendar_get_task_pad	(GnomeCalendar *gcal)
-{
-	g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
-	return E_CALENDAR_TABLE (gcal->priv->todo);
-}
-
 GtkWidget *
 gnome_calendar_get_e_calendar_widget (GnomeCalendar *gcal)
 {
@@ -3506,13 +3250,6 @@
  	return GTK_WIDGET(gcal->priv->notebook);
 }
 
-ECalMenu *gnome_calendar_get_taskpad_menu (GnomeCalendar *gcal)
-{
- 	g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- 	return gcal->priv->taskpad_menu;
-}
-
 ECalMenu *gnome_calendar_get_calendar_menu (GnomeCalendar *gcal)
 {
  	g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
@@ -3520,14 +3257,6 @@
  	return gcal->priv->calendar_menu;
 }
 
-ECalMenu *gnome_calendar_get_memopad_menu (GnomeCalendar *gcal)
-{
- 	g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- 	return gcal->priv->memopad_menu;
-}
-
-
 void
 gnome_calendar_edit_appointment (GnomeCalendar *gcal,
 				 const char* src_uid,

Modified: branches/kill-bonobo/calendar/gui/gnome-cal.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/gnome-cal.h	(original)
+++ branches/kill-bonobo/calendar/gui/gnome-cal.h	Thu Oct 30 20:51:26 2008
@@ -133,15 +133,12 @@
 
 GtkWidget *gnome_calendar_get_current_view_widget (GnomeCalendar *gcal);
 
-ECalendarTable *gnome_calendar_get_task_pad	(GnomeCalendar *gcal);
 GtkWidget *gnome_calendar_get_e_calendar_widget (GnomeCalendar *gcal);
 GtkWidget *gnome_calendar_get_search_bar_widget (GnomeCalendar *gcal);
 GtkWidget *gnome_calendar_get_view_notebook_widget (GnomeCalendar *gcal);
 GtkWidget *gnome_calendar_get_tag (GnomeCalendar *gcal);
 
-struct _ECalMenu *gnome_calendar_get_taskpad_menu (GnomeCalendar *gcal);
 struct _ECalMenu *gnome_calendar_get_calendar_menu (GnomeCalendar *gcal);
-struct _ECalMenu *gnome_calendar_get_memopad_menu (GnomeCalendar *gcal);
 
 void	   gnome_calendar_set_selected_time_range (GnomeCalendar *gcal,
 						   time_t	  start_time,

Modified: branches/kill-bonobo/calendar/gui/main.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/main.c	(original)
+++ branches/kill-bonobo/calendar/gui/main.c	Thu Oct 30 20:51:26 2008
@@ -174,15 +174,6 @@
 		return object;
 	} else if (strcmp (component_id, ITIP_CONTROL_ID) == 0)
 		return BONOBO_OBJECT (itip_bonobo_control_new ());
-	else if (strcmp (component_id, CONFIG_CONTROL_ID) == 0) {
-		GtkWidget *prefs;
-		EvolutionConfigControl *control;
-
-		prefs = calendar_prefs_dialog_new ();
-		gtk_widget_show (prefs);
-		control = evolution_config_control_new (prefs);
-
-		return BONOBO_OBJECT (control);
 	} else if (strcmp (component_id, COMP_EDITOR_FACTORY_ID) == 0)
 		return BONOBO_OBJECT (comp_editor_factory_fn ());
 

Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-module.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-module.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-module.c	Thu Oct 30 20:51:26 2008
@@ -30,10 +30,12 @@
 #include "shell/e-shell.h"
 #include "shell/e-shell-module.h"
 #include "shell/e-shell-window.h"
+#include "widgets/misc/e-preferences-window.h"
 
 #include "calendar/common/authentication.h"
 #include "calendar/gui/calendar-config.h"
 #include "calendar/gui/comp-util.h"
+#include "calendar/gui/dialogs/cal-prefs-dialog.h"
 #include "calendar/gui/dialogs/calendar-setup.h"
 #include "calendar/gui/dialogs/event-editor.h"
 
@@ -404,6 +406,22 @@
 	  G_CALLBACK (action_calendar_new_cb) }
 };
 
+static void
+cal_module_init_preferences (void)
+{
+	GtkWidget *preferences_window;
+
+	preferences_window = e_shell_get_preferences_window ();
+
+	e_preferences_window_add_page (
+		E_PREFERENCES_WINDOW (preferences_window),
+		"calendar-and-tasks",
+		"preferences-calendar-and-tasks",
+		_("Calendar and Tasks"),
+		calendar_prefs_dialog_new (),
+		600);
+}
+
 static gboolean
 cal_module_handle_uri (EShellModule *shell_module,
                        const gchar *uri)
@@ -463,4 +481,6 @@
 	g_signal_connect_swapped (
 		shell, "window-created",
 		G_CALLBACK (cal_module_window_created), shell_module);
+
+	cal_module_init_preferences ();
 }

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	Thu Oct 30 20:51:26 2008
@@ -473,14 +473,6 @@
 }
 
 static void
-cal_shell_sidebar_client_added (ECalShellSidebar *cal_shell_sidebar,
-                                ECal *client)
-{
-        /* FIXME */
-	/*cal_shell_sidebar_update_timezone (cal_shell_sidebar);*/
-}
-
-static void
 cal_shell_sidebar_client_removed (ECalShellSidebar *cal_shell_sidebar,
                                   ECal *client)
 {
@@ -519,7 +511,6 @@
 	object_class->finalize = cal_shell_sidebar_finalize;
 	object_class->constructed = cal_shell_sidebar_constructed;
 
-	class->client_added = cal_shell_sidebar_client_added;
 	class->client_removed = cal_shell_sidebar_client_removed;
 
 	g_object_class_install_property (
@@ -628,6 +619,19 @@
 		"shell-view", shell_view, NULL);
 }
 
+GList *
+e_cal_shell_sidebar_get_clients (ECalShellSidebar *cal_shell_sidebar)
+{
+	GHashTable *client_table;
+
+	g_return_val_if_fail (
+		E_IS_CAL_SHELL_SIDEBAR (cal_shell_sidebar), NULL);
+
+	client_table = cal_shell_sidebar->priv->client_table;
+
+	return g_hash_table_get_values (client_table);
+}
+
 ECalendar *
 e_cal_shell_sidebar_get_mini_calendar (ECalShellSidebar *cal_shell_sidebar)
 {
@@ -721,26 +725,3 @@
 
 	cal_shell_sidebar_emit_client_removed (cal_shell_sidebar, client);
 }
-
-void
-e_cal_shell_sidebar_update_timezone (ECalShellSidebar *cal_shell_sidebar)
-{
-	GHashTable *client_table;
-	icaltimezone *timezone;
-	GList *values;
-
-	g_return_if_fail (E_CAL_SHELL_SIDEBAR (cal_shell_sidebar));
-
-	timezone = calendar_config_get_icaltimezone ();
-	client_table = cal_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, timezone, NULL);
-
-		values = g_list_delete_link (values, values);
-	}
-}

Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-sidebar.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-sidebar.h	(original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-sidebar.h	Thu Oct 30 20:51:26 2008
@@ -80,6 +80,7 @@
 
 GType		e_cal_shell_sidebar_get_type	(void);
 GtkWidget *	e_cal_shell_sidebar_new		(EShellView *shell_view);
+GList *		e_cal_shell_sidebar_get_clients	(ECalShellSidebar *cal_shell_sidebar);
 ECalendar *	e_cal_shell_sidebar_get_mini_calendar
 						(ECalShellSidebar *cal_shell_sidebar);
 ESourceSelector *
@@ -89,8 +90,6 @@
 void		e_cal_shell_sidebar_remove_source
 						(ECalShellSidebar *cal_shell_sidebar,
 						 ESource *source);
-void		e_cal_shell_sidebar_update_timezone
-						(ECalShellSidebar *cal_shell_sidebar);
 
 G_END_DECLS
 

Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-view-actions.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-view-actions.c	Thu Oct 30 20:51:26 2008
@@ -516,7 +516,6 @@
 action_search_execute_cb (GtkAction *action,
                           ECalShellView *cal_shell_view)
 {
-#if 0
 	EShellView *shell_view;
 
 	/* All shell views respond to the activation of this action,
@@ -527,7 +526,6 @@
 		return;
 
 	e_cal_shell_view_execute_search (cal_shell_view);
-#endif
 }
 
 static void
@@ -535,9 +533,7 @@
                          GtkRadioAction *current,
                          ECalShellView *cal_shell_view)
 {
-#if 0
 	e_cal_shell_view_execute_search (cal_shell_view);
-#endif
 }
 
 static GtkActionEntry calendar_entries[] = {

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	Thu Oct 30 20:51:26 2008
@@ -41,41 +41,6 @@
 }
 
 static void
-cal_shell_view_update_timezone (ECalShellView *cal_shell_view)
-{
-#if 0
-	ECalShellContent *cal_shell_content;
-	ECalShellSidebar *cal_shell_sidebar;
-	GnomeCalendarViewType view_type;
-	ECalendarView *calendar_view;
-	icaltimezone *timezone;
-
-	cal_shell_content = cal_shell_view->priv->cal_shell_content;
-	cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar;
-
-	e_cal_shell_sidebar_update_timezone (cal_shell_sidebar);
-
-	view_type = e_cal_shell_content_get_current_view (cal_shell_content);
-	calendar_view = e_cal_shell_content_get_calendar_view (
-		cal_shell_content, view_type);
-
-	timezone = calendar_config_get_icaltimezone ();
-	e_calendar_view_get_icaltimezone (calendar_view, timezone);
-#endif
-}
-
-static void
-cal_shell_view_config_hide_completed_tasks_changed_cb (GConfClient *client,
-                                                       guint id,
-                                                       GConfEntry *entry,
-                                                       gpointer user_data)
-{
-	ECalShellView *cal_shell_view = user_data;
-
-	/* FIXME */
-}
-
-static void
 cal_shell_view_config_timezone_changed_cb (GConfClient *client,
                                            guint id,
                                            GConfEntry *entry,
@@ -83,7 +48,7 @@
 {
 	ECalShellView *cal_shell_view = user_data;
 
-	cal_shell_view_update_timezone (cal_shell_view);
+	e_cal_shell_view_update_timezone (cal_shell_view);
 }
 
 static struct tm
@@ -152,6 +117,26 @@
 }
 
 static void
+cal_shell_view_memopad_popup_event_cb (EShellView *shell_view,
+                                       GdkEventButton *event)
+{
+	const gchar *widget_path;
+
+	widget_path = "/calendar-memopad-popup";
+	e_shell_view_show_popup_menu (shell_view, widget_path, event);
+}
+
+static void
+cal_shell_view_taskpad_popup_event_cb (EShellView *shell_view,
+                                       GdkEventButton *event)
+{
+	const gchar *widget_path;
+
+	widget_path = "/calendar-taskpad-popup";
+	e_shell_view_show_popup_menu (shell_view, widget_path, event);
+}
+
+static void
 cal_shell_view_load_view_collection (EShellViewClass *shell_view_class)
 {
 	GalViewCollection *collection;
@@ -300,11 +285,21 @@
 		cal_shell_view);
 
 	g_signal_connect_swapped (
+		memo_table, "popup-event",
+		G_CALLBACK (cal_shell_view_memopad_popup_event_cb),
+		cal_shell_view);
+
+	g_signal_connect_swapped (
 		memo_table, "status-message",
 		G_CALLBACK (e_cal_shell_view_memopad_set_status_message),
 		cal_shell_view);
 
 	g_signal_connect_swapped (
+		task_table, "popup-event",
+		G_CALLBACK (cal_shell_view_taskpad_popup_event_cb),
+		cal_shell_view);
+
+	g_signal_connect_swapped (
 		task_table, "status-message",
 		G_CALLBACK (e_cal_shell_view_taskpad_set_status_message),
 		cal_shell_view);
@@ -319,6 +314,10 @@
 		G_CALLBACK (e_cal_shell_view_taskpad_actions_update),
 		cal_shell_view);
 
+	e_categories_register_change_listener (
+		G_CALLBACK (e_cal_shell_view_update_search_filter),
+		cal_shell_view);
+
 	/* Listen for configuration changes. */
 
 	/* Timezone */
@@ -326,30 +325,11 @@
 		cal_shell_view_config_timezone_changed_cb, cal_shell_view);
 	priv->notifications = g_list_prepend (
 		priv->notifications, GUINT_TO_POINTER (id));
-	cal_shell_view_update_timezone (cal_shell_view);
-
-	/* Hide Completed Tasks (enable/units/value) */
-	id = calendar_config_add_notification_hide_completed_tasks (
-		cal_shell_view_config_hide_completed_tasks_changed_cb,
-		cal_shell_view);
-	priv->notifications = g_list_prepend (
-		priv->notifications, GUINT_TO_POINTER (id));
-	id = calendar_config_add_notification_hide_completed_tasks_units (
-		cal_shell_view_config_hide_completed_tasks_changed_cb,
-		cal_shell_view);
-	priv->notifications = g_list_prepend (
-		priv->notifications, GUINT_TO_POINTER (id));
-	id = calendar_config_add_notification_hide_completed_tasks_value (
-		cal_shell_view_config_hide_completed_tasks_changed_cb,
-		cal_shell_view);
-
-	e_categories_register_change_listener (
-		G_CALLBACK (e_cal_shell_view_update_search_filter),
-		cal_shell_view);
 
 	e_cal_shell_view_actions_init (cal_shell_view);
 	e_cal_shell_view_update_sidebar (cal_shell_view);
         e_cal_shell_view_update_search_filter (cal_shell_view);
+	e_cal_shell_view_update_timezone (cal_shell_view);
 }
 
 void
@@ -402,6 +382,12 @@
 }
 
 void
+e_cal_shell_view_execute_search (ECalShellView *cal_shell_view)
+{
+	/* FIXME */
+}
+
+void
 e_cal_shell_view_open_event (ECalShellView *cal_shell_view,
                              ECalModelComponent *comp_data)
 {
@@ -610,3 +596,37 @@
 	e_shell_sidebar_set_secondary_text (shell_sidebar, buffer);
 #endif
 }
+
+void
+e_cal_shell_view_update_timezone (ECalShellView *cal_shell_view)
+{
+#if 0
+	ECalShellContent *cal_shell_content;
+	ECalShellSidebar *cal_shell_sidebar;
+	GnomeCalendarViewType view_type;
+	ECalendarView *calendar_view;
+	icaltimezone *timezone;
+	GList *clients, *iter;
+
+	cal_shell_content = cal_shell_view->priv->cal_shell_content;
+	view_type = e_cal_shell_content_get_current_view (cal_shell_content);
+	calendar_view = e_cal_shell_content_get_calendar_view (
+		cal_shell_content, view_type);
+
+	cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar;
+	clients = e_cal_shell_sidebar_get_clients (cal_shell_sidebar);
+
+	timezone = calendar_config_get_icaltimezone ();
+
+	for (iter = clients; iter != NULL; iter = iter->next) {
+		ECal *client = iter->data;
+
+		if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED)
+			e_cal_set_default_timezone (client, timezone, NULL);
+	}
+
+	e_calendar_view_set_icaltimezone (calendar_view, timezone);
+
+	g_list_free (clients);
+#endif
+}

Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.h	(original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-view-private.h	Thu Oct 30 20:51:26 2008
@@ -140,6 +140,8 @@
 					(ECalShellView *cal_shell_view);
 void		e_cal_shell_view_update_search_filter
 					(ECalShellView *cal_shell_view);
+void		e_cal_shell_view_update_timezone
+					(ECalShellView *cal_shell_view);
 
 /* Memo Pad Utilities */
 

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	Thu Oct 30 20:51:26 2008
@@ -175,8 +175,6 @@
 
 	task_preview = e_task_shell_content_get_task_preview (task_shell_content);
 
-	/* XXX Old code emits a "selection-changed" signal here. */
-
 	if (e_table_selected_count (table) != 1)
 		e_cal_component_preview_clear (task_preview);
 }

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	Thu Oct 30 20:51:26 2008
@@ -88,33 +88,6 @@
 }
 
 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)
 {
@@ -471,13 +444,6 @@
 }
 
 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)
 {
@@ -520,7 +486,6 @@
 	shell_sidebar_class = E_SHELL_SIDEBAR_CLASS (class);
 	shell_sidebar_class->check_state = task_shell_sidebar_check_state;
 
-	class->client_added = task_shell_sidebar_client_added;
 	class->client_removed = task_shell_sidebar_client_removed;
 
 	g_object_class_install_property (
@@ -620,6 +585,19 @@
 		"shell-view", shell_view, NULL);
 }
 
+GList *
+e_task_shell_sidebar_get_clients (ETaskShellSidebar *task_shell_sidebar)
+{
+	GHashTable *client_table;
+
+	g_return_val_if_fail (
+		E_IS_TASK_SHELL_SIDEBAR (task_shell_sidebar), NULL);
+
+	client_table = task_shell_sidebar->priv->client_table;
+
+	return g_hash_table_get_values (client_table);
+}
+
 ESourceSelector *
 e_task_shell_sidebar_get_selector (ETaskShellSidebar *task_shell_sidebar)
 {

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	Thu Oct 30 20:51:26 2008
@@ -78,6 +78,7 @@
 
 GType		e_task_shell_sidebar_get_type	(void);
 GtkWidget *	e_task_shell_sidebar_new	(EShellView *shell_view);
+GList *		e_task_shell_sidebar_get_clients(ETaskShellSidebar *task_shell_sidebar);
 ESourceSelector *
 		e_task_shell_sidebar_get_selector
 						(ETaskShellSidebar *task_shell_sidebar);

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	Thu Oct 30 20:51:26 2008
@@ -24,6 +24,44 @@
 #include <widgets/menus/gal-view-factory-etable.h>
 
 static void
+task_shell_view_config_hide_completed_tasks_changed_cb (GConfClient *client,
+                                                        guint id,
+                                                        GConfEntry *entry,
+                                                        gpointer user_data)
+{
+	ETaskShellView *task_shell_view = user_data;
+	ETaskShellContent *task_shell_content;
+	ETaskShellSidebar *task_shell_sidebar;
+	ECalendarTable *task_table;
+	GList *clients;
+
+	task_shell_content = task_shell_view->priv->task_shell_content;
+	task_table = e_task_shell_content_get_task_table (task_shell_content);
+
+	task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
+	clients = e_task_shell_sidebar_get_clients (task_shell_sidebar);
+
+	e_calendar_table_process_completed_tasks (task_table, clients, TRUE);
+
+	/* Search query takes whether to show completed tasks into account,
+	 * so if the preference has changed we need to update the query. */
+	e_task_shell_view_execute_search (task_shell_view);
+
+	g_list_free (clients);
+}
+
+static void
+task_shell_view_config_timezone_changed_cb (GConfClient *client,
+                                            guint id,
+                                            GConfEntry *entry,
+                                            gpointer user_data)
+{
+	ETaskShellView *task_shell_view = user_data;
+
+	e_task_shell_view_update_timezone (task_shell_view);
+}
+
+static void
 task_shell_view_table_popup_event_cb (EShellView *shell_view,
                                       GdkEventButton *event)
 {
@@ -67,6 +105,7 @@
 	model = e_calendar_table_get_model (task_table);
 
 	e_cal_model_add_client (model, client);
+	e_task_shell_view_update_timezone (task_shell_view);
 }
 
 static void
@@ -97,6 +136,30 @@
 	return TRUE;
 }
 
+static gboolean
+task_shell_view_update_timeout_cb (ETaskShellView *task_shell_view)
+{
+	ETaskShellContent *task_shell_content;
+	ETaskShellSidebar *task_shell_sidebar;
+	ECalendarTable *task_table;
+	ECalModel *model;
+	GList *clients;
+
+	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);
+
+	task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
+	clients = e_task_shell_sidebar_get_clients (task_shell_sidebar);
+
+	e_calendar_table_process_completed_tasks (task_table, clients, FALSE);
+	e_cal_model_tasks_update_due_tasks (E_CAL_MODEL_TASKS (model));
+
+	g_list_free (clients);
+
+	return TRUE;
+}
+
 static void
 task_shell_view_load_view_collection (EShellViewClass *shell_view_class)
 {
@@ -184,6 +247,7 @@
 	ECalModel *model;
 	ETable *table;
 	ESourceSelector *selector;
+	guint id;
 
 	shell_view = E_SHELL_VIEW (task_shell_view);
 	shell_content = e_shell_view_get_shell_content (shell_view);
@@ -270,9 +334,41 @@
 		G_CALLBACK (e_task_shell_view_update_search_filter),
 		task_shell_view);
 
+	task_shell_view_update_timeout_cb (task_shell_view);
+	priv->update_timeout = g_timeout_add_full (
+		G_PRIORITY_LOW, 60000, (GSourceFunc)
+		task_shell_view_update_timeout_cb,
+		task_shell_view, NULL);
+
+	/* Listen for configuration changes. */
+
+	/* Timezone */
+	id = calendar_config_add_notification_timezone (
+		task_shell_view_config_timezone_changed_cb, task_shell_view);
+	priv->notifications = g_list_prepend (
+		priv->notifications, GUINT_TO_POINTER (id));
+
+	/* Hide Completed Tasks (enable/units/value) */
+	id = calendar_config_add_notification_hide_completed_tasks (
+		task_shell_view_config_hide_completed_tasks_changed_cb,
+		task_shell_view);
+	priv->notifications = g_list_prepend (
+		priv->notifications, GUINT_TO_POINTER (id));
+	id = calendar_config_add_notification_hide_completed_tasks_units (
+		task_shell_view_config_hide_completed_tasks_changed_cb,
+		task_shell_view);
+	priv->notifications = g_list_prepend (
+		priv->notifications, GUINT_TO_POINTER (id));
+	id = calendar_config_add_notification_hide_completed_tasks_value (
+		task_shell_view_config_hide_completed_tasks_changed_cb,
+		task_shell_view);
+	priv->notifications = g_list_prepend (
+		priv->notifications, GUINT_TO_POINTER (id));
+
 	e_task_shell_view_actions_init (task_shell_view);
 	e_task_shell_view_update_sidebar (task_shell_view);
 	e_task_shell_view_update_search_filter (task_shell_view);
+	e_task_shell_view_update_timezone (task_shell_view);
 
 	e_task_shell_view_execute_search (task_shell_view);
 }
@@ -281,6 +377,7 @@
 e_task_shell_view_private_dispose (ETaskShellView *task_shell_view)
 {
 	ETaskShellViewPrivate *priv = task_shell_view->priv;
+	GList *iter;
 
 	DISPOSE (priv->source_list);
 
@@ -296,6 +393,18 @@
 		g_object_unref (task_shell_view->priv->activity);
 		task_shell_view->priv->activity = NULL;
 	}
+
+	if (priv->update_timeout > 0) {
+		g_source_remove (priv->update_timeout);
+		priv->update_timeout = 0;
+	}
+
+	for (iter = priv->notifications; iter != NULL; iter = iter->next) {
+		guint notification_id = GPOINTER_TO_UINT (iter->data);
+		calendar_config_remove_notification (notification_id);
+	}
+	g_list_free (priv->notifications);
+	priv->notifications = NULL;
 }
 
 void
@@ -453,6 +562,17 @@
 		}
 	}
 
+	/* Honor the user's preference to hide completed tasks. */
+	temp = calendar_config_get_hide_completed_tasks_sexp (FALSE);
+	if (temp != NULL) {
+		gchar *temp2;
+
+		temp2 = g_strdup_printf ("(and %s %s)", temp, query);
+		g_free (query);
+		g_free (temp);
+		query = temp2;
+	}
+
 	/* XXX This is wrong.  We need to programmatically construct a
 	 *     FilterRule, tell it to build code, and pass the resulting
 	 *     expression string to ECalModel. */
@@ -595,3 +715,32 @@
 
 	g_string_free (string, TRUE);
 }
+
+void
+e_task_shell_view_update_timezone (ETaskShellView *task_shell_view)
+{
+	ETaskShellContent *task_shell_content;
+	ETaskShellSidebar *task_shell_sidebar;
+	ECalComponentPreview *task_preview;
+	icaltimezone *timezone;
+	GList *clients, *iter;
+
+	task_shell_content = task_shell_view->priv->task_shell_content;
+	task_preview = e_task_shell_content_get_task_preview (task_shell_content);
+
+	task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
+	clients = e_task_shell_sidebar_get_clients (task_shell_sidebar);
+
+	timezone = calendar_config_get_icaltimezone ();
+
+	for (iter = clients; iter != NULL; iter = iter->next) {
+		ECal *client = iter->data;
+
+		if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED)
+			e_cal_set_default_timezone (client, timezone, NULL);
+	}
+
+	e_cal_component_preview_set_default_timezone (task_preview, timezone);
+
+	g_list_free (clients);
+}

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	Thu Oct 30 20:51:26 2008
@@ -108,6 +108,10 @@
 	ETaskShellSidebar *task_shell_sidebar;
 
 	EActivity *activity;
+	guint update_timeout;
+
+	/* GConf notification IDs */
+	GList *notifications;
 };
 
 void		e_task_shell_view_private_init
@@ -137,6 +141,8 @@
 					(ETaskShellView *task_shell_view);
 void		e_task_shell_view_update_search_filter
 					(ETaskShellView *task_shell_view);
+void		e_task_shell_view_update_timezone
+					(ETaskShellView *task_shell_view);
 
 G_END_DECLS
 

Modified: branches/kill-bonobo/mail/Makefile.am
==============================================================================
--- branches/kill-bonobo/mail/Makefile.am	(original)
+++ branches/kill-bonobo/mail/Makefile.am	Thu Oct 30 20:51:26 2008
@@ -53,6 +53,8 @@
 	e-searching-tokenizer.h				\
 	em-account-editor.c				\
 	em-account-editor.h				\
+	em-account-prefs.c				\
+	em-account-prefs.h				\
 	em-composer-prefs.c				\
 	em-composer-prefs.h				\
 	em-composer-utils.c				\
@@ -105,6 +107,10 @@
 	em-inline-filter.h				\
 	em-junk-hook.c					\
 	em-junk-hook.h					\
+	em-mailer-prefs.c				\
+	em-mailer-prefs.h				\
+	em-network-prefs.c				\
+	em-network-prefs.h				\
 	em-popup.c					\
 	em-popup.h					\
 	em-search-context.c				\
@@ -238,14 +244,10 @@
 #	em-icon-stream.c			\
 #	em-inline-filter.c			\
 #	em-junk-hook.c				\
-#	em-mailer-prefs.c			\
-#	em-mailer-prefs.h			\
 #	em-menu.c				\
 #	em-message-browser.c			\
 #	em-migrate.c				\
 #	em-migrate.h				\
-#	em-network-prefs.c			\
-#	em-network-prefs.h			\
 #	em-popup.c				\
 #	em-search-context.c			\
 #	em-search-context.h			\
@@ -263,8 +265,6 @@
 #	mail-autofilter.c			\
 #	mail-component-factory.c		\
 #	mail-component.c			\
-#	mail-config-factory.c			\
-#	mail-config-factory.h			\
 #	mail-config.c				\
 #	mail-crypto.c				\
 #	mail-crypto.h				\

Modified: branches/kill-bonobo/mail/e-mail-shell-module.c
==============================================================================
--- branches/kill-bonobo/mail/e-mail-shell-module.c	(original)
+++ branches/kill-bonobo/mail/e-mail-shell-module.c	Thu Oct 30 20:51:26 2008
@@ -27,17 +27,22 @@
 #include "e-util/e-util.h"
 #include "shell/e-shell.h"
 #include "shell/e-shell-window.h"
+#include "widgets/misc/e-preferences-window.h"
 
 #include "e-mail-shell-view.h"
 #include "e-mail-shell-module.h"
 #include "e-mail-shell-module-migrate.h"
 
+#include "em-account-prefs.h"
+#include "em-composer-prefs.h"
 #include "em-config.h"
 #include "em-event.h"
 #include "em-folder-tree-model.h"
 #include "em-format-hook.h"
 #include "em-format-html-display.h"
 #include "em-junk-hook.h"
+#include "em-mailer-prefs.h"
+#include "em-network-prefs.h"
 #include "mail-config.h"
 #include "mail-folder-cache.h"
 #include "mail-mt.h"
@@ -413,17 +418,57 @@
 	  G_CALLBACK (action_mail_folder_new_cb) }
 };
 
+static void
+mail_shell_module_init_preferences (void)
+{
+	GtkWidget *preferences_window;
+
+	preferences_window = e_shell_get_preferences_window ();
+
+	e_preferences_window_add_page (
+		E_PREFERENCES_WINDOW (preferences_window),
+		"mail-accounts",
+		"preferences-mail-accounts",
+		_("Mail Accounts"),
+		em_account_prefs_new (),
+		100);
+
+	e_preferences_window_add_page (
+		E_PREFERENCES_WINDOW (preferences_window),
+		"mail",
+		"preferences-mail",
+		_("Mail Preferences"),
+		em_mailer_prefs_new (),
+		300);
+
+	e_preferences_window_add_page (
+		E_PREFERENCES_WINDOW (preferences_window),
+		"composer",
+		"preferences-composer",
+		_("Composer Preferences"),
+		em_composer_prefs_new (),
+		400);
+
+	e_preferences_window_add_page (
+		E_PREFERENCES_WINDOW (preferences_window),
+		"system-network-proxy",
+		"preferences-system-network-proxy",
+		_("Network Preferences"),
+		em_network_prefs_new (),
+		500);
+}
+
 static gboolean
-mail_module_handle_uri (EShellModule *shell_module,
-                        const gchar *uri)
+mail_shell_module_handle_uri (EShellModule *shell_module,
+                              const gchar *uri)
 {
 	/* FIXME */
 	return FALSE;
 }
 
 static void
-mail_module_window_created (EShellModule *shell_module,
-                            EShellWindow *shell_window)
+mail_shell_module_window_created (EShellModule *shell_module,
+                                  EShellWindow *shell_window)
 {
 	EShell *shell;
 	const gchar *module_name;
@@ -489,17 +534,18 @@
 
 	g_signal_connect_swapped (
 		shell, "handle-uri",
-		G_CALLBACK (mail_module_handle_uri), shell_module);
+		G_CALLBACK (mail_shell_module_handle_uri), shell_module);
 
 	g_signal_connect_swapped (
 		shell, "window-created",
-		G_CALLBACK (mail_module_window_created), shell_module);
+		G_CALLBACK (mail_shell_module_window_created), shell_module);
 
 	mail_config_init ();
 	mail_msg_init ();
 
 	mail_shell_module_init_local_store (shell_module);
 	mail_shell_module_load_accounts (shell_module);
+	mail_shell_module_init_preferences ();
 }
 
 /******************************** Public API *********************************/
@@ -597,3 +643,10 @@
 
 	return NULL;
 }
+
+void
+e_mail_shell_module_remove_store_by_uri (EShellModule *shell_module,
+                                         const gchar *uri)
+{
+	/* FIXME */
+}

Modified: branches/kill-bonobo/mail/e-mail-shell-module.h
==============================================================================
--- branches/kill-bonobo/mail/e-mail-shell-module.h	(original)
+++ branches/kill-bonobo/mail/e-mail-shell-module.h	Thu Oct 30 20:51:26 2008
@@ -66,6 +66,9 @@
 						(EShellModule *shell_module,
 						 const gchar *uri,
 						 const gchar *name);
+void		e_mail_shell_module_remove_store_by_uri
+						(EShellModule *shell_module,
+						 const gchar *uri);
 
 G_END_DECLS
 

Modified: branches/kill-bonobo/mail/em-account-prefs.c
==============================================================================
--- branches/kill-bonobo/mail/em-account-prefs.c	(original)
+++ branches/kill-bonobo/mail/em-account-prefs.c	Thu Oct 30 20:51:26 2008
@@ -28,7 +28,6 @@
 
 #include <glib/gi18n.h>
 
-#include "mail-component.h"
 #include "mail-config.h"
 #include "mail-ops.h"
 #include "mail-send-recv.h"
@@ -38,8 +37,8 @@
 #include "e-util/e-util-private.h"
 
 #include "em-account-prefs.h"
-
 #include "em-account-editor.h"
+#include "e-mail-shell-module.h"
 
 static void em_account_prefs_class_init (EMAccountPrefsClass *class);
 static void em_account_prefs_init       (EMAccountPrefs *prefs);
@@ -239,7 +238,8 @@
 
 		/* remove it from the folder-tree in the shell */
 		if (account->enabled && account->source && account->source->url)
-			mail_component_remove_store_by_uri (mail_component_peek (), account->source->url);
+			e_mail_shell_module_remove_store_by_uri (
+				mail_shell_module, account->source->url);
 
 		/* remove all the proxies account has created*/
 		if (has_proxies)
@@ -292,17 +292,16 @@
 static void
 account_able_changed(EAccount *account)
 {
-	MailComponent *component = mail_component_peek ();
-
 	/* FIXME: do this directly by listening to the mail accounts changed events in the relevant components */
 
 	if (account->source->url) {
 		if (account->enabled)
-			mail_component_load_store_by_uri (component,
-							  account->source->url,
-							  account->name);
+			e_mail_shell_module_load_store_by_uri (
+				mail_shell_module,
+				account->source->url, account->name);
 		else
-			mail_component_remove_store_by_uri (component, account->source->url);
+			e_mail_shell_module_remove_store_by_uri (
+				mail_shell_module, account->source->url);
 	}
 
 	mail_config_write ();
@@ -565,13 +564,12 @@
 }
 
 GtkWidget *
-em_account_prefs_new (GNOME_Evolution_Shell shell)
+em_account_prefs_new (void)
 {
 	EMAccountPrefs *new;
 
 	new = (EMAccountPrefs *) g_object_new (em_account_prefs_get_type (), NULL);
 	em_account_prefs_construct (new);
-	new->shell = shell;
 
 	return (GtkWidget *) new;
 }

Modified: branches/kill-bonobo/mail/em-account-prefs.h
==============================================================================
--- branches/kill-bonobo/mail/em-account-prefs.h	(original)
+++ branches/kill-bonobo/mail/em-account-prefs.h	Thu Oct 30 20:51:26 2008
@@ -21,29 +21,33 @@
  *
  */
 
-#ifndef __EM_ACCOUNT_PREFS_H__
-#define __EM_ACCOUNT_PREFS_H__
+#ifndef EM_ACCOUNT_PREFS_H
+#define EM_ACCOUNT_PREFS_H
 
 #include <gtk/gtk.h>
 #include <glade/glade.h>
-
 #include <table/e-table.h>
 
-#include "evolution-config-control.h"
-
-#include <shell/Evolution.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
+/* Standard GObject macros */
+#define EM_TYPE_ACCOUNT_PREFS \
+	(em_account_prefs_get_type ())
+#define EM_ACCOUNT_PREFS(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), EM_TYPE_ACCOUNT_PREFS, EMAccountPrefs))
+#define EM_ACCOUNT_PREFS_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), EM_TYPE_ACCOUNT_PREFS, EMAccountPrefsClass))
+#define EM_IS_ACCOUNT_PREFS(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), EM_TYPE_ACCOUNT_PREFS))
+#define EM_IS_ACCOUNT_PREFS_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), EM_TYPE_ACCOUNT_PREFS))
+#define EM_ACCOUNT_PREFS_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), EM_TYPE_ACCOUNT_PREFS, EMAccountPrefsClass))
 
-
-#define EM_ACCOUNT_PREFS_TYPE        (em_account_prefs_get_type ())
-#define EM_ACCOUNT_PREFS(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_ACCOUNT_PREFS_TYPE, EMAccountPrefs))
-#define EM_ACCOUNT_PREFS_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST ((k), EM_ACCOUNT_PREFS_TYPE, EMAccountPrefsClass))
-#define EM_IS_ACCOUNT_PREFS(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_ACCOUNT_PREFS_TYPE))
-#define EM_IS_ACCOUNT_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_ACCOUNT_PREFS_TYPE))
+G_BEGIN_DECLS
 
 typedef struct _EMAccountPrefs EMAccountPrefs;
 typedef struct _EMAccountPrefsClass EMAccountPrefsClass;
@@ -51,8 +55,6 @@
 struct _EMAccountPrefs {
 	GtkVBox parent_object;
 
-	GNOME_Evolution_Shell shell;
-
 	GladeXML *gui;
 
 	GtkWidget *druid;
@@ -71,21 +73,11 @@
 
 struct _EMAccountPrefsClass {
 	GtkVBoxClass parent_class;
-
-	/* signals */
-
 };
 
+GType		em_account_prefs_get_type	(void);
+GtkWidget *	em_account_prefs_new		(void);
 
-GType em_account_prefs_get_type (void);
-
-GtkWidget *em_account_prefs_new (GNOME_Evolution_Shell shell);
-
-/* needed by global config */
-#define EM_ACCOUNT_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_AccountPrefs_ConfigControl:" BASE_VERSION
-
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
-#endif /* __EM_ACCOUNT_PREFS_H__ */
+#endif /* EM_ACCOUNT_PREFS_H */

Modified: branches/kill-bonobo/mail/em-mailer-prefs.h
==============================================================================
--- branches/kill-bonobo/mail/em-mailer-prefs.h	(original)
+++ branches/kill-bonobo/mail/em-mailer-prefs.h	Thu Oct 30 20:51:26 2008
@@ -20,35 +20,33 @@
  *
  */
 
-#ifndef __EM_MAILER_PREFS_H__
-#define __EM_MAILER_PREFS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
+#ifndef EM_MAILER_PREFS_H
+#define EM_MAILER_PREFS_H
 
 #include <gtk/gtk.h>
-#include <shell/Evolution.h>
+#include <glade/glade.h>
+#include <gconf/gconf-client.h>
+
+/* Standard GObject macros */
+#define EM_TYPE_MAILER_PREFS \
+	(em_mailer_prefs_get_type ())
+#define EM_MAILER_PREFS(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), EM_TYPE_MAILER_PREFS, EMMailerPrefs))
+#define EM_MAILER_PREFS_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), EM_TYPE_MAILER_PREFS, EMMailerPrefsClass))
+#define EM_IS_MAILER_PREFS(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), EM_TYPE_MAILER_PREFS))
+#define EM_IS_MAILER_PREFS_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), EM_TYPE_MAILER_PREFS))
+#define EM_MAILER_PREFS_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), EM_TYPE_MAILER_PREFS))
 
-struct _ESignature;
-struct _GtkToggleButton;
-struct _GtkOptionMenu;
-struct _GdkPixbuf;
-struct _GtkWidget;
-struct _GladeXML;
-struct _GtkFileChooserbutton;
-struct _GtkFontButton;
-struct _GConfClient;
-struct _GtkButton;
-struct _GtkTreeView;
-struct _GtkWindow;
-
-#define EM_MAILER_PREFS_TYPE        (em_mailer_prefs_get_type ())
-#define EM_MAILER_PREFS(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_MAILER_PREFS_TYPE, EMMailerPrefs))
-#define EM_MAILER_PREFS_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST ((k), EM_MAILER_PREFS_TYPE, EMMailerPrefsClass))
-#define EM_IS_MAILER_PREFS(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_MAILER_PREFS_TYPE))
-#define EM_IS_MAILER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_MAILER_PREFS_TYPE))
+G_BEGIN_DECLS
 
 typedef struct _EMMailerPrefs EMMailerPrefs;
 typedef struct _EMMailerPrefsClass EMMailerPrefsClass;
@@ -63,103 +61,94 @@
 struct _EMMailerPrefs {
 	GtkVBox parent_object;
 
-	GNOME_Evolution_Shell shell;
-
-	struct _GladeXML *gui;
-	struct _GConfClient *gconf;
+	GladeXML *gui;
+	GConfClient *gconf;
 
 	/* General tab */
 
 	/* Message Display */
-	struct _GtkToggleButton *timeout_toggle;
-	struct _GtkSpinButton *timeout;
-	struct _GtkToggleButton *address_toggle;
-	struct _GtkSpinButton *address_count;
-	struct _GtkToggleButton *mlimit_toggle;
-	struct _GtkSpinButton *mlimit_count;
-	struct _GtkOptionMenu *charset;
-	struct _GtkToggleButton *citation_highlight;
-	struct _GtkColorButton *citation_color;
-	struct _GtkToggleButton *enable_search_folders;
-	struct _GtkToggleButton *magic_spacebar;
+	GtkToggleButton *timeout_toggle;
+	GtkSpinButton *timeout;
+	GtkToggleButton *address_toggle;
+	GtkSpinButton *address_count;
+	GtkToggleButton *mlimit_toggle;
+	GtkSpinButton *mlimit_count;
+	GtkOptionMenu *charset;
+	GtkToggleButton *citation_highlight;
+	GtkColorButton *citation_color;
+	GtkToggleButton *enable_search_folders;
+	GtkToggleButton *magic_spacebar;
 
 	/* Deleting Mail */
-	struct _GtkToggleButton *empty_trash;
-	struct _GtkOptionMenu *empty_trash_days;
-	struct _GtkToggleButton *confirm_expunge;
+	GtkToggleButton *empty_trash;
+	GtkOptionMenu *empty_trash_days;
+	GtkToggleButton *confirm_expunge;
 
 	/* HTML Mail tab */
-	struct _GtkFontButton *font_variable;
-	struct _GtkFontButton *font_fixed;
-	struct _GtkToggleButton *font_share;
+	GtkFontButton *font_variable;
+	GtkFontButton *font_fixed;
+	GtkToggleButton *font_share;
 
 	/* Loading Images */
-	struct _GtkToggleButton *images_always;
-	struct _GtkToggleButton *images_sometimes;
-	struct _GtkToggleButton *images_never;
-
-	struct _GtkToggleButton *show_animated;
-	struct _GtkToggleButton *autodetect_links;
-	struct _GtkToggleButton *prompt_unwanted_html;
+	GtkToggleButton *images_always;
+	GtkToggleButton *images_sometimes;
+	GtkToggleButton *images_never;
+
+	GtkToggleButton *show_animated;
+	GtkToggleButton *autodetect_links;
+	GtkToggleButton *prompt_unwanted_html;
 
 	/* Labels and Colours tab */
-	struct _GtkWidget *label_add;
-	struct _GtkWidget *label_edit;
-	struct _GtkWidget *label_remove;
-	struct _GtkWidget *label_tree;
-	struct _GtkListStore *label_list_store;
+	GtkWidget *label_add;
+	GtkWidget *label_edit;
+	GtkWidget *label_remove;
+	GtkWidget *label_tree;
+	GtkListStore *label_list_store;
 	guint labels_change_notify_id; /* mail_config's notify id */
 
 	/* Headers tab */
-	struct _GtkButton *add_header;
-	struct _GtkButton *remove_header;
-	struct _GtkEntry *entry_header;
-	struct _GtkTreeView *header_list;
-	struct _GtkListStore *header_list_store;
-	struct _GtkToggleButton *photo_show;
-	struct _GtkToggleButton *photo_local;
+	GtkButton *add_header;
+	GtkButton *remove_header;
+	GtkEntry *entry_header;
+	GtkTreeView *header_list;
+	GtkListStore *header_list_store;
+	GtkToggleButton *photo_show;
+	GtkToggleButton *photo_local;
 
 	/* Junk prefs */
-	struct _GtkToggleButton *check_incoming;
-	struct _GtkToggleButton *empty_junk;
-	struct _GtkOptionMenu *empty_junk_days;
+	GtkToggleButton *check_incoming;
+	GtkToggleButton *empty_junk;
+	GtkOptionMenu *empty_junk_days;
 	
-	struct _GtkToggleButton *sa_local_tests_only;
-	struct _GtkToggleButton *sa_use_daemon;
-	struct _GtkComboBox *default_junk_plugin;
-	struct _GtkLabel *plugin_status;
-	struct _GtkImage *plugin_image;
-
-	struct _GtkToggleButton *junk_header_check;
-	struct _GtkTreeView *junk_header_tree;
-	struct _GtkListStore *junk_header_list_store;	
-	struct _GtkButton *junk_header_add;
-	struct _GtkButton *junk_header_remove;
-	struct _GtkToggleButton *junk_book_lookup;
-	struct _GtkToggleButton *junk_lookup_local_only;
+	GtkToggleButton *sa_local_tests_only;
+	GtkToggleButton *sa_use_daemon;
+	GtkComboBox *default_junk_plugin;
+	GtkLabel *plugin_status;
+	GtkImage *plugin_image;
+
+	GtkToggleButton *junk_header_check;
+	GtkTreeView *junk_header_tree;
+	GtkListStore *junk_header_list_store;	
+	GtkButton *junk_header_add;
+	GtkButton *junk_header_remove;
+	GtkToggleButton *junk_book_lookup;
+	GtkToggleButton *junk_lookup_local_only;
 };
 
 struct _EMMailerPrefsClass {
 	GtkVBoxClass parent_class;
-
-	/* signals */
-
 };
 
-GType em_mailer_prefs_get_type (void);
-GtkWidget * create_combo_text_widget (void);
-
-struct _GtkWidget *em_mailer_prefs_new (void);
+GType		em_mailer_prefs_get_type	(void);
+GtkWidget *	create_combo_text_widget	(void);
 
-EMMailerPrefsHeader *em_mailer_prefs_header_from_xml(const char *xml);
-char *em_mailer_prefs_header_to_xml(EMMailerPrefsHeader *header);
-void em_mailer_prefs_header_free(EMMailerPrefsHeader *header);
+GtkWidget *	em_mailer_prefs_new		(void);
 
-/* needed by global config */
-#define EM_MAILER_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_MailerPrefs_ConfigControl:" BASE_VERSION
+EMMailerPrefsHeader *
+		em_mailer_prefs_header_from_xml	(const gchar *xml);
+gchar *		em_mailer_prefs_header_to_xml	(EMMailerPrefsHeader *header);
+void		em_mailer_prefs_header_free	(EMMailerPrefsHeader *header);
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
 
-#endif /* __EM_MAILER_PREFS_H__ */
+#endif /* EM_MAILER_PREFS_H */

Modified: branches/kill-bonobo/mail/em-network-prefs.h
==============================================================================
--- branches/kill-bonobo/mail/em-network-prefs.h	(original)
+++ branches/kill-bonobo/mail/em-network-prefs.h	Thu Oct 30 20:51:26 2008
@@ -20,30 +20,37 @@
  *
  */
 
-#ifndef __EM_NETWORK_PREFS_H__
-#define __EM_NETWORK_PREFS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
+#ifndef EM_NETWORK_PREFS_H
+#define EM_NETWORK_PREFS_H
 
 #include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <gconf/gconf-client.h>
+
+/* Standard GObject macros */
+#define EM_TYPE_NETWORK_PREFS \
+	(em_network_prefs_get_type ())
+#define EM_NETWORK_PREFS(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), EM_TYPE_NETWORK_PREFS, EMNetworkPrefs))
+#define EM_NETWORK_PREFS_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), EM_TYPE_NETWORK_PREFS, EMNetworkPrefsClass))
+#define EM_IS_NETWORK_PREFS(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), EM_TYPE_NETWORK_PREFS))
+#define EM_IS_NETWORK_PREFS_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), EM_TYPE_NETWORK_PREFS))
+#define EM_NETWORK_PREFS_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), EM_TYPE_NETWORK_PREFS, EMNetworkPrefsClass))
 
-#define EM_NETWORK_PREFS_TYPE        (em_network_prefs_get_type ())
-#define EM_NETWORK_PREFS(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_NETWORK_PREFS_TYPE, EMNetworkPrefs))
-#define EM_NETWORK_PREFS_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST ((k), EM_NETWORK_PREFS_TYPE, EMNetworkPrefsClass))
-#define EM_IS_NETWORK_PREFS(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_NETWORK_PREFS_TYPE))
-#define EM_IS_NETWORK_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_NETWORK_PREFS_TYPE))
+G_BEGIN_DECLS
 
 typedef struct _EMNetworkPrefs EMNetworkPrefs;
 typedef struct _EMNetworkPrefsClass EMNetworkPrefsClass;
 
-struct _GtkToggleButton;
-struct _GtkEntry;
-struct _GladeXML;
-struct _GConfClient;
-
 typedef enum {
 	NETWORK_PROXY_SYS_SETTINGS,
 	NETWORK_PROXY_DIRECT_CONNECTION,
@@ -51,60 +58,50 @@
 	NETWORK_PROXY_AUTOCONFIG
 } NetworkConfigProxyType;
 
-
 struct _EMNetworkPrefs {
 	GtkVBox parent_object;
 	
-	struct _GConfClient *gconf;
+	GConfClient *gconf;
 	
-	struct _GladeXML *gui;
+	GladeXML *gui;
 	
 	/* Default Behavior */
-	struct _GtkToggleButton *sys_proxy;
-	struct _GtkToggleButton *no_proxy;
-	struct _GtkToggleButton *manual_proxy;
-	struct _GtkToggleButton *auto_proxy;
-	struct _GtkToggleButton *use_auth;
-
-	struct _GtkEntry *http_host;
-	struct _GtkEntry *https_host;
-	struct _GtkEntry *socks_host;
-	struct _GtkEntry *ignore_hosts;
-	struct _GtkEntry *auto_proxy_url;
-	struct _GtkEntry *auth_user;
-	struct _GtkEntry *auth_pwd;
-
-	struct _GtkLabel *lbl_http_host;
-	struct _GtkLabel *lbl_http_port;
-	struct _GtkLabel *lbl_https_host;
-	struct _GtkLabel *lbl_https_port;
-	struct _GtkLabel *lbl_socks_host;
-	struct _GtkLabel *lbl_socks_port;	
-	struct _GtkLabel *lbl_ignore_hosts;
-	struct _GtkLabel *lbl_auth_user;
-	struct _GtkLabel *lbl_auth_pwd;
-
-	struct _GtkSpinButton *http_port;
-	struct _GtkSpinButton *https_port;
-	struct _GtkSpinButton *socks_port;	
+	GtkToggleButton *sys_proxy;
+	GtkToggleButton *no_proxy;
+	GtkToggleButton *manual_proxy;
+	GtkToggleButton *auto_proxy;
+	GtkToggleButton *use_auth;
+
+	GtkEntry *http_host;
+	GtkEntry *https_host;
+	GtkEntry *socks_host;
+	GtkEntry *ignore_hosts;
+	GtkEntry *auto_proxy_url;
+	GtkEntry *auth_user;
+	GtkEntry *auth_pwd;
+
+	GtkLabel *lbl_http_host;
+	GtkLabel *lbl_http_port;
+	GtkLabel *lbl_https_host;
+	GtkLabel *lbl_https_port;
+	GtkLabel *lbl_socks_host;
+	GtkLabel *lbl_socks_port;	
+	GtkLabel *lbl_ignore_hosts;
+	GtkLabel *lbl_auth_user;
+	GtkLabel *lbl_auth_pwd;
+
+	GtkSpinButton *http_port;
+	GtkSpinButton *https_port;
+	GtkSpinButton *socks_port;	
 };
 
 struct _EMNetworkPrefsClass {
 	GtkVBoxClass parent_class;
-	
-	/* signals */
-	
 };
 
-GType em_network_prefs_get_type (void);
-
-struct _GtkWidget *em_network_prefs_new (void);
-
-/* needed by global config */
-#define EM_NETWORK_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_NetworkPrefs_ConfigControl:" BASE_VERSION
+GType		em_network_prefs_get_type	(void);
+GtkWidget *	em_network_prefs_new		(void);
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
 
-#endif /* __EM_NETWORK_PREFS_H__ */
+#endif /* EM_NETWORK_PREFS_H */

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	Thu Oct 30 20:51:26 2008
@@ -63,7 +63,6 @@
 		page_num, "shell-window", shell_window, NULL);
 
 	/* Register the shell view. */
-	g_debug ("Loaded view '%s' (page %d)", view_name, page_num);
 	loaded_views = shell_window->priv->loaded_views;
 	g_hash_table_insert (loaded_views, g_strdup (view_name), shell_view);
 

Modified: branches/kill-bonobo/widgets/misc/e-preferences-window.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-preferences-window.c	(original)
+++ branches/kill-bonobo/widgets/misc/e-preferences-window.c	Thu Oct 30 20:51:26 2008
@@ -358,6 +358,7 @@
 	g_hash_table_insert (index, g_strdup (page_name), reference);
 	gtk_tree_path_free (path);
 
+	gtk_widget_show (widget);
 	gtk_notebook_append_page (notebook, widget, NULL);
 
 	if (page == 0)



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