evolution r36278 - in branches/kill-bonobo: addressbook/gui/component calendar/gui shell shell/test widgets/misc



Author: mbarnes
Date: Mon Sep  8 20:37:00 2008
New Revision: 36278
URL: http://svn.gnome.org/viewvc/evolution?rev=36278&view=rev

Log:
Progress update:

	- Merge ETaskBar into EShellTaskbar.
	- Remember the last view, and make --component work.



Added:
   branches/kill-bonobo/shell/e-activity-handler.c   (contents, props changed)
      - copied, changed from r36224, /branches/kill-bonobo/widgets/misc/e-activity-handler.c
   branches/kill-bonobo/shell/e-activity-handler.h   (contents, props changed)
      - copied, changed from r36224, /branches/kill-bonobo/widgets/misc/e-activity-handler.h
Removed:
   branches/kill-bonobo/widgets/misc/e-activity-handler.c
   branches/kill-bonobo/widgets/misc/e-activity-handler.h
   branches/kill-bonobo/widgets/misc/e-task-bar.c
   branches/kill-bonobo/widgets/misc/e-task-bar.h
Modified:
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.c
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.h
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-view.c
   branches/kill-bonobo/calendar/gui/e-calendar-table.h
   branches/kill-bonobo/shell/Makefile.am
   branches/kill-bonobo/shell/e-shell-content.c
   branches/kill-bonobo/shell/e-shell-content.h
   branches/kill-bonobo/shell/e-shell-registry.c
   branches/kill-bonobo/shell/e-shell-sidebar.c
   branches/kill-bonobo/shell/e-shell-sidebar.h
   branches/kill-bonobo/shell/e-shell-view.c
   branches/kill-bonobo/shell/e-shell-view.h
   branches/kill-bonobo/shell/e-shell-window-actions.c
   branches/kill-bonobo/shell/e-shell-window-private.c
   branches/kill-bonobo/shell/e-shell-window.c
   branches/kill-bonobo/shell/main.c
   branches/kill-bonobo/shell/test/e-test-shell-view.c
   branches/kill-bonobo/widgets/misc/Makefile.am
   branches/kill-bonobo/widgets/misc/e-task-widget.c
   branches/kill-bonobo/widgets/misc/e-task-widget.h

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c	Mon Sep  8 20:37:00 2008
@@ -40,7 +40,7 @@
 #include <autocompletion-config.h>
 
 #define MODULE_NAME		"addressbook"
-#define MODULE_ALIASES		""
+#define MODULE_ALIASES		"contacts"
 #define MODULE_SCHEMES		""
 #define MODULE_SEARCHES		"addresstypes.xml"
 #define MODULE_SORT_ORDER	300

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	Mon Sep  8 20:37:00 2008
@@ -52,7 +52,7 @@
 	GError *error = NULL;
 
 	shell_view = E_SHELL_VIEW (book_shell_view);
-	shell_window = e_shell_view_get_window (shell_view);
+	shell_window = e_shell_view_get_shell_window (shell_view);
 
 	selector = E_SOURCE_SELECTOR (book_shell_view->priv->selector);
 	source = e_source_selector_peek_primary_selection (selector);
@@ -112,7 +112,7 @@
 	EShellWindow *shell_window;
 
 	shell_view = E_SHELL_VIEW (book_shell_view);
-	shell_window = e_shell_view_get_window (shell_view);
+	shell_window = e_shell_view_get_shell_window (shell_view);
 
 	addressbook_config_create_new_source (GTK_WIDGET (shell_window));
 }
@@ -130,7 +130,7 @@
 	const gchar *uid;
 
 	shell_view = E_SHELL_VIEW (book_shell_view);
-	shell_window = e_shell_view_get_window (shell_view);
+	shell_window = e_shell_view_get_shell_window (shell_view);
 
 	selector = E_SOURCE_SELECTOR (book_shell_view->priv->selector);
 	source = e_source_selector_peek_primary_selection (selector);
@@ -370,6 +370,7 @@
 {
 	EShellView *shell_view;
 	EShellWindow *shell_window;
+	EShellContent *shell_content;
 	GtkWidget *widget;
 	GString *string;
 	EABView *view;
@@ -382,12 +383,10 @@
 	if (!e_shell_view_is_selected (shell_view))
 		return;
 
-	/* Dig up the search text. */
-	widget = e_shell_view_get_content_widget (shell_view);
-	widget = e_shell_content_get_search_bar (E_SHELL_CONTENT (widget));
-	search_text = e_search_bar_get_search_text (E_SEARCH_BAR (widget));
+	shell_content = e_shell_view_get_content (shell_view);
+	search_text = e_shell_content_get_search_text (shell_content);
 
-	shell_window = e_shell_view_get_window (shell_view);
+	shell_window = e_shell_view_get_shell_window (shell_view);
 	action = ACTION (CONTACT_SEARCH_ANY_FIELD_CONTAINS);
 	value = gtk_radio_action_get_current_value (
 		GTK_RADIO_ACTION (action));
@@ -689,7 +688,7 @@
 	const gchar *key;
 
 	shell_view = E_SHELL_VIEW (book_shell_view);
-	shell_window = e_shell_view_get_window (shell_view);
+	shell_window = e_shell_view_get_shell_window (shell_view);
 	manager = e_shell_window_get_ui_manager (shell_window);
 	domain = GETTEXT_PACKAGE;
 
@@ -743,7 +742,7 @@
 		return;
 
 	shell_view = E_SHELL_VIEW (book_shell_view);
-	shell_window = e_shell_view_get_window (shell_view);
+	shell_window = e_shell_view_get_shell_window (shell_view);
 
 	selector = E_SOURCE_SELECTOR (book_shell_view->priv->selector);
 	source = e_source_selector_peek_primary_selection (selector);

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.c	Mon Sep  8 20:37:00 2008
@@ -42,12 +42,10 @@
 				activity_handler, activity_id);
 			activity_id = 0;
 		}
-	} else if (activity_id == 0) {
-		gchar *client_id = g_strdup_printf ("%p", book_shell_view);
-
+	} else if (activity_id == 0)
 		activity_id = e_activity_handler_operation_started (
-			activity_handler, client_id, message, TRUE);
-	} else
+			activity_handler, message, TRUE);
+	else
 		e_activity_handler_operation_progressing (
 			activity_handler, activity_id, message, -1.0);
 
@@ -74,8 +72,8 @@
 	 *     and have it handle this directly. */
 
 	EShellView *shell_view;
+	EShellSidebar *shell_sidebar;
 	EABView *current_view;
-	GtkWidget *widget;
 	const gchar *name;
 
 	shell_view = E_SHELL_VIEW (book_shell_view);
@@ -85,10 +83,9 @@
 		return;
 
 	name = e_source_peek_name (view->source);
-	widget = e_shell_view_get_sidebar_widget (shell_view);
-
-	e_shell_sidebar_set_primary_text (E_SHELL_SIDEBAR (widget), name);
-	e_shell_sidebar_set_secondary_text (E_SHELL_SIDEBAR (widget), message);
+	shell_sidebar = e_shell_view_get_sidebar (shell_view);
+	e_shell_sidebar_set_primary_text (shell_sidebar, name);
+	e_shell_sidebar_set_secondary_text (shell_sidebar, message);
 }
 
 static void
@@ -175,6 +172,7 @@
 		g_object_set (uid_view, "type", EAB_VIEW_TABLE, NULL);
 		gtk_widget_show (uid_view);
 
+		g_object_ref_sink (uid_view);
 		gtk_notebook_append_page (notebook, uid_view, NULL);
 		g_hash_table_insert (hash_table, g_strdup (uid), uid_view);
 
@@ -217,7 +215,7 @@
 	const gchar *widget_path;
 
 	widget_path = "/address-book-popup";
-	shell_window = e_shell_view_get_window (shell_view);
+	shell_window = e_shell_view_get_shell_window (shell_view);
 	menu = e_shell_window_get_managed_widget (shell_window, widget_path);
 
 	if (event != NULL)
@@ -265,7 +263,7 @@
 	EShellWindow *shell_window;
 
 	/* Needed for the ACTION() macro. */
-	shell_window = e_shell_view_get_window (shell_view);
+	shell_window = e_shell_view_get_shell_window (shell_view);
 
 	if (event->keyval == GDK_Delete) {
 		gtk_action_activate (ACTION (ADDRESS_BOOK_DELETE));
@@ -314,25 +312,18 @@
 	/* Construct view widgets. */
 
 	widget = gtk_notebook_new ();
-	container = e_shell_view_get_content_widget (shell_view);
 	gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE);
 	gtk_notebook_set_show_border (GTK_NOTEBOOK (widget), FALSE);
-	gtk_container_add (GTK_CONTAINER (container), widget);
-	priv->notebook = g_object_ref (widget);
+	priv->notebook = g_object_ref_sink (widget);
 	gtk_widget_show (widget);
 
-	widget = e_shell_view_get_taskbar_widget (shell_view);
-	e_activity_handler_attach_task_bar (
-		priv->activity_handler, E_TASK_BAR (widget));
-
 	widget = gtk_scrolled_window_new (NULL, NULL);
-	container = e_shell_view_get_sidebar_widget (shell_view);
 	gtk_scrolled_window_set_policy (
 		GTK_SCROLLED_WINDOW (widget),
 		GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 	gtk_scrolled_window_set_shadow_type (
 		GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
-	gtk_container_add (GTK_CONTAINER (container), widget);
+	priv->scrolled_window = g_object_ref_sink (widget);
 	gtk_widget_show (widget);
 
 	container = widget;
@@ -368,7 +359,6 @@
 	e_categories_register_change_listener (
 		G_CALLBACK (book_shell_view_categories_changed_cb),
 		book_shell_view);
-	e_book_shell_view_update_search_filter (book_shell_view);
 }
 
 void
@@ -379,6 +369,7 @@
 	DISPOSE (priv->contact_actions);
 
 	DISPOSE (priv->notebook);
+	DISPOSE (priv->scrolled_window);
 	DISPOSE (priv->selector);
 
 	DISPOSE (priv->activity_handler);
@@ -430,17 +421,15 @@
 void
 e_book_shell_view_update_search_filter (EBookShellView *book_shell_view)
 {
+	EShellContent *shell_content;
 	EShellView *shell_view;
 	GtkRadioAction *action;
-	GtkWidget *widget;
 	GList *list, *iter;
 	GSList *group = NULL;
 	gint ii;
 
-	/* Dig up the search bar. */
 	shell_view = E_SHELL_VIEW (book_shell_view);
-	widget = e_shell_view_get_content_widget (shell_view);
-	widget = e_shell_content_get_search_bar (E_SHELL_CONTENT (widget));
+	shell_content = e_shell_view_get_content (shell_view);
 
 	action = gtk_radio_action_new (
 		"category-any", _("Any Category"), NULL, NULL, -1);
@@ -464,5 +453,5 @@
 	g_list_free (list);
 
 	/* Use any action in the group; doesn't matter which. */
-	e_search_bar_set_filter_action (E_SEARCH_BAR (widget), action);
+	e_shell_content_set_filter_action (shell_content, action);
 }

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.h
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.h	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.h	Mon Sep  8 20:37:00 2008
@@ -88,6 +88,7 @@
 	/*** Other Stuff ***/
 
 	GtkWidget *notebook;
+	GtkWidget *scrolled_window;
 	GtkWidget *selector;
 
 	EActivityHandler *activity_handler;

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view.c	Mon Sep  8 20:37:00 2008
@@ -171,10 +171,33 @@
 static void
 book_shell_view_constructed (GObject *object)
 {
-	e_book_shell_view_actions_init (E_BOOK_SHELL_VIEW (object));
+	EBookShellView *book_shell_view;
+	EShellContent *shell_content;
+	EShellSidebar *shell_sidebar;
+	EShellTaskbar *shell_taskbar;
+	EShellView *shell_view;
+	GtkWidget *widget;
 
 	/* Chain up to parent's constructed() method. */
 	G_OBJECT_CLASS (parent_class)->constructed (object);
+
+	shell_view = E_SHELL_VIEW (object);
+	book_shell_view = E_BOOK_SHELL_VIEW (object);
+
+	widget = book_shell_view->priv->notebook;
+	shell_content = e_shell_view_get_content (shell_view);
+	gtk_container_add (GTK_CONTAINER (shell_content), widget);
+
+	widget = book_shell_view->priv->scrolled_window;
+	shell_sidebar = e_shell_view_get_sidebar (shell_view);
+	gtk_container_add (GTK_CONTAINER (shell_sidebar), widget);
+
+	shell_taskbar = e_shell_view_get_taskbar (shell_view);
+	e_activity_handler_attach_task_bar (
+		book_shell_view->priv->activity_handler, shell_taskbar);
+
+	e_book_shell_view_actions_init (book_shell_view);
+	e_book_shell_view_update_search_filter (book_shell_view);
 }
 
 static void

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	Mon Sep  8 20:37:00 2008
@@ -27,7 +27,6 @@
 #include <gtk/gtk.h>
 #include <table/e-table-scrolled.h>
 #include <misc/e-cell-date-edit.h>
-#include "e-activity-handler.h"
 #include "e-cal-model.h"
 
 G_BEGIN_DECLS
@@ -37,6 +36,8 @@
  * Used for calendar events and tasks.
  */
 
+/* FIXME */
+typedef struct { gint bogus; } EActivityHandler;
 
 #define E_CALENDAR_TABLE(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, e_calendar_table_get_type (), ECalendarTable)
 #define E_CALENDAR_TABLE_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, e_calendar_table_get_type (), ECalendarTableClass)

Modified: branches/kill-bonobo/shell/Makefile.am
==============================================================================
--- branches/kill-bonobo/shell/Makefile.am	(original)
+++ branches/kill-bonobo/shell/Makefile.am	Mon Sep  8 20:37:00 2008
@@ -58,10 +58,13 @@
 eshellincludedir = $(privincludedir)/shell
 
 eshellinclude_HEADERS = 			\
+	e-activity-handler.h			\
 	e-shell-common.h			\
 	e-shell-content.h			\
 	e-shell-module.h			\
+	e-shell-sidebar.h			\
 	e-shell-switcher.h			\
+	e-shell-taskbar.h			\
 	e-shell-view.h				\
 	e-shell-window.h			\
 	e-shell-window-actions.h		\
@@ -70,9 +73,12 @@
 libeshell_la_SOURCES =				\
 	$(IDL_GENERATED)			\
 	$(MARSHAL_GENERATED)			\
+	e-activity-handler.c			\
 	e-shell-content.c			\
 	e-shell-module.c			\
+	e-shell-sidebar.c			\
 	e-shell-switcher.c			\
+	e-shell-taskbar.c			\
 	e-shell-view.c				\
 	e-shell-window.c			\
 	e-shell-window-actions.c		\
@@ -99,8 +105,6 @@
 	e-shell-importer.h			\
 	e-shell-registry.c			\
 	e-shell-registry.h			\
-	e-shell-sidebar.c			\
-	e-shell-sidebar.h			\
 	e-shell-window-private.c		\
 	e-shell-window-private.h		\
 	es-event.c				\

Copied: branches/kill-bonobo/shell/e-activity-handler.c (from r36224, /branches/kill-bonobo/widgets/misc/e-activity-handler.c)
==============================================================================
--- /branches/kill-bonobo/widgets/misc/e-activity-handler.c	(original)
+++ branches/kill-bonobo/shell/e-activity-handler.c	Mon Sep  8 20:37:00 2008
@@ -26,19 +26,11 @@
 
 #include "e-activity-handler.h"
 
+#include <glib/gi18n.h>
 #include <gtk/gtksignal.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
-#include <glib/gi18n.h>
-#include <libgnomeui/gnome-popup-menu.h>
-
-#include <misc/e-popup-menu.h>
-
-#define ICON_SIZE 16
-
-
 struct _ActivityInfo {
-	char *component_id;
 	int error_type;
 	guint id;
 	char *information;
@@ -128,15 +120,13 @@
 /* Creating and destroying ActivityInfos.  */
 
 static ActivityInfo *
-activity_info_new (const char *component_id,
-		   guint id,
+activity_info_new (guint id,
 		   const char *information,
 		   gboolean cancellable)
 {
 	ActivityInfo *info;
 
 	info = g_new (ActivityInfo, 1);
-	info->component_id   = g_strdup (component_id);
 	info->id             = id;
 	info->information    = g_strdup (information);
 	info->cancellable    = cancellable;
@@ -151,7 +141,6 @@
 static void
 activity_info_free (ActivityInfo *info)
 {
-	g_free (info->component_id);
 	g_free (info->information);
 
 	if (info->menu != NULL)
@@ -167,7 +156,6 @@
 	ETaskWidget *etw;
 
 	widget = e_task_widget_new_with_cancel (
-		activity_info->component_id,
 		activity_info->information,
 		activity_info->cancel_func,
 		activity_info->data);
@@ -187,7 +175,7 @@
 
 static void
 setup_task_bar (EActivityHandler *activity_handler,
-		ETaskBar *task_bar)
+		EShellTaskbar *shell_taskbar)
 {
 	EActivityHandlerPrivate *priv;
 	GList *p;
@@ -198,7 +186,7 @@
 		ActivityInfo *info = p->data;
 		ETaskWidget *task_widget = task_widget_new_from_activity_info (info);
 		task_widget->id = info->id;
-		e_task_bar_prepend_task (task_bar, task_widget);
+		e_shell_taskbar_prepend_task (shell_taskbar, task_widget);
 		if (info->error) {
 			/* Prepare to handle existing errors*/
 			GtkWidget *tool;
@@ -218,7 +206,7 @@
 
 static void
 task_bar_destroy_notify (void *data,
-			 GObject *task_bar_instance)
+			 GObject *shell_taskbar_instance)
 {
 	EActivityHandler *activity_handler;
 	EActivityHandlerPrivate *priv;
@@ -226,7 +214,7 @@
 	activity_handler = E_ACTIVITY_HANDLER (data);
 	priv = activity_handler->priv;
 
-	priv->task_bars = g_slist_remove (priv->task_bars, task_bar_instance);
+	priv->task_bars = g_slist_remove (priv->task_bars, shell_taskbar_instance);
 }
 
 
@@ -326,7 +314,7 @@
 	priv = activity_handler->priv;
 
 	for (i = priv->task_bars; i; i = i->next)
-		e_task_bar_set_message (E_TASK_BAR (i->data), message);
+		e_shell_taskbar_set_message (E_SHELL_TASKBAR (i->data), message);
 }
 
 void
@@ -338,27 +326,27 @@
 	priv = activity_handler->priv;
 
 	for (i = priv->task_bars; i; i = i->next)
-		e_task_bar_unset_message (E_TASK_BAR (i->data));
+		e_shell_taskbar_unset_message (E_SHELL_TASKBAR (i->data));
 }
 
 void
 e_activity_handler_attach_task_bar (EActivityHandler *activity_handler,
-				    ETaskBar *task_bar)
+				    EShellTaskbar *shell_taskbar)
 {
 	EActivityHandlerPrivate *priv;
 
 	g_return_if_fail (activity_handler != NULL);
 	g_return_if_fail (E_IS_ACTIVITY_HANDLER (activity_handler));
-	g_return_if_fail (task_bar != NULL);
-	g_return_if_fail (E_IS_TASK_BAR (task_bar));
+	g_return_if_fail (shell_taskbar != NULL);
+	g_return_if_fail (E_IS_SHELL_TASKBAR (shell_taskbar));
 
 	priv = activity_handler->priv;
 
-	g_object_weak_ref (G_OBJECT (task_bar), task_bar_destroy_notify, activity_handler);
+	g_object_weak_ref (G_OBJECT (shell_taskbar), task_bar_destroy_notify, activity_handler);
 
-	priv->task_bars = g_slist_prepend (priv->task_bars, task_bar);
+	priv->task_bars = g_slist_prepend (priv->task_bars, shell_taskbar);
 
-	setup_task_bar (activity_handler, task_bar);
+	setup_task_bar (activity_handler, shell_taskbar);
 }
 
 struct _cancel_wdata {
@@ -387,10 +375,10 @@
 		data->info->error = NULL;
 		info = data->info;
 		for (sp = handler->priv->task_bars; sp != NULL; sp = sp->next) {
-			ETaskBar *task_bar;
+			EShellTaskbar *shell_taskbar;
 
-			task_bar = E_TASK_BAR (sp->data);
-			e_task_bar_remove_task_from_id (task_bar, info->id);	
+			shell_taskbar = E_SHELL_TASKBAR (sp->data);
+			e_shell_taskbar_remove_task_from_id (shell_taskbar, info->id);	
 		}
 		activity_info_free (info);
 		len = g_list_length (handler->priv->activity_infos);
@@ -406,7 +394,6 @@
 
 /* CORBA methods.  */
 guint  e_activity_handler_cancelable_operation_started  (EActivityHandler *activity_handler,
-						      const char       *component_id,
 					      	      const char       *information,
 					      	      gboolean          cancellable,
 						      void (*cancel_func)(gpointer),
@@ -421,7 +408,7 @@
 	priv = activity_handler->priv;
 
 	activity_id = get_new_activity_id (activity_handler);
-	activity_info = activity_info_new (component_id, activity_id, information, cancellable);
+	activity_info = activity_info_new (activity_id, information, cancellable);
 
 	data = g_new(struct _cancel_wdata, 1);
 	data->handler = activity_handler;
@@ -440,7 +427,7 @@
 			g_object_set_data_full ((GObject *) tw, "free-data", data, g_free);
 			bfree = TRUE;
 		}
-		e_task_bar_prepend_task (E_TASK_BAR (p->data), tw);
+		e_shell_taskbar_prepend_task (E_SHELL_TASKBAR (p->data), tw);
 	}
 
 	priv->activity_infos = g_list_prepend (priv->activity_infos, activity_info);
@@ -451,7 +438,6 @@
 
 guint
 e_activity_handler_operation_started (EActivityHandler *activity_handler,
-				      const char *component_id,
 				      const char *information,
 				      gboolean cancellable)
 {
@@ -464,12 +450,12 @@
 
 	activity_id = get_new_activity_id (activity_handler);
 
-	activity_info = activity_info_new (component_id, activity_id, information, cancellable);
+	activity_info = activity_info_new (activity_id, information, cancellable);
 
 	for (p = priv->task_bars; p != NULL; p = p->next) {
 		ETaskWidget *tw = task_widget_new_from_activity_info (activity_info);
 		tw->id = activity_id;
-		e_task_bar_prepend_task (E_TASK_BAR (p->data), tw);
+		e_shell_taskbar_prepend_task (E_SHELL_TASKBAR (p->data), tw);
 	}
 
 	priv->activity_infos = g_list_prepend (priv->activity_infos, activity_info);
@@ -520,10 +506,10 @@
 			p = p->next;
 
 			for (sp = priv->task_bars; sp != NULL; sp = sp->next) {
-				ETaskBar *task_bar;
+				EShellTaskbar *task_bar;
 
-				task_bar = E_TASK_BAR (sp->data);
-				e_task_bar_remove_task_from_id (task_bar, info->id);
+				task_bar = E_SHELL_TASKBAR (sp->data);
+				e_shell_taskbar_remove_task_from_id (task_bar, info->id);
 			}
 			activity_info_free (info);
 			priv->activity_infos = g_list_remove_link (priv->activity_infos, node);
@@ -538,7 +524,6 @@
 
 guint
 e_activity_handler_make_error (EActivityHandler *activity_handler,
-				      const char *component_id,
 				      int error_type,
 				      GtkWidget  *error)
 {
@@ -552,21 +537,21 @@
 	priv = activity_handler->priv;
 	activity_id = get_new_activity_id (activity_handler);
 
-	activity_info = activity_info_new (component_id, activity_id, information, TRUE);
+	activity_info = activity_info_new (activity_id, information, TRUE);
 	activity_info->error = error;
 	activity_info->error_time = time (NULL);
 	activity_info->error_type = error_type;
 	
 	img = error_type ? icon_data[1] : icon_data[0];
 	for (p = priv->task_bars; p != NULL; p = p->next) {
-		ETaskBar *task_bar;
+		EShellTaskbar *task_bar;
 		ETaskWidget *task_widget;
 		GtkWidget *tool;
 
-		task_bar = E_TASK_BAR (p->data);
+		task_bar = E_SHELL_TASKBAR (p->data);
 		task_widget = task_widget_new_from_activity_info (activity_info); 
 		task_widget->id = activity_id;
-		e_task_bar_prepend_task (E_TASK_BAR (p->data), task_widget);
+		e_shell_taskbar_prepend_task (E_SHELL_TASKBAR (p->data), task_widget);
 		
 		tool = e_task_widget_update_image (task_widget, (char *)img, information);
 		g_object_set_data ((GObject *) task_widget, "tool", tool);
@@ -609,12 +594,12 @@
 	g_free (activity_info->information);
 	activity_info->information = g_strdup (g_object_get_data ((GObject *) error, "primary"));
 	for (sp = priv->task_bars; sp != NULL; sp = sp->next) {
-		ETaskBar *task_bar;
+		EShellTaskbar *task_bar;
 		ETaskWidget *task_widget;
 		GtkWidget *tool;
 
-		task_bar = E_TASK_BAR (sp->data);
-		task_widget = e_task_bar_get_task_widget_from_id (task_bar, activity_info->id);
+		task_bar = E_SHELL_TASKBAR (sp->data);
+		task_widget = e_shell_taskbar_get_task_widget_from_id (task_bar, activity_info->id);
 		if (!task_widget)
 			continue;
 
@@ -657,11 +642,11 @@
 	activity_info->progress = progress;
 
 	for (sp = priv->task_bars; sp != NULL; sp = sp->next) {
-		ETaskBar *task_bar;
+		EShellTaskbar *task_bar;
 		ETaskWidget *task_widget;
 
-		task_bar = E_TASK_BAR (sp->data);
-		task_widget = e_task_bar_get_task_widget_from_id (task_bar, activity_info->id);
+		task_bar = E_SHELL_TASKBAR (sp->data);
+		task_widget = e_shell_taskbar_get_task_widget_from_id (task_bar, activity_info->id);
 		if (!task_widget)
 			continue;
 
@@ -688,10 +673,10 @@
 	priv->activity_infos = g_list_remove_link (priv->activity_infos, p);
 
 	for (sp = priv->task_bars; sp != NULL; sp = sp->next) {
-		ETaskBar *task_bar;
+		EShellTaskbar *task_bar;
 
-		task_bar = E_TASK_BAR (sp->data);
-		e_task_bar_remove_task_from_id (task_bar, activity_id);
+		task_bar = E_SHELL_TASKBAR (sp->data);
+		e_shell_taskbar_remove_task_from_id (task_bar, activity_id);
 	}
 }
 

Copied: branches/kill-bonobo/shell/e-activity-handler.h (from r36224, /branches/kill-bonobo/widgets/misc/e-activity-handler.h)
==============================================================================
--- /branches/kill-bonobo/widgets/misc/e-activity-handler.h	(original)
+++ branches/kill-bonobo/shell/e-activity-handler.h	Mon Sep  8 20:37:00 2008
@@ -23,10 +23,12 @@
 #ifndef _E_ACTIVITY_HANDLER_H_
 #define _E_ACTIVITY_HANDLER_H_
 
-#include "e-task-bar.h"
+#include "e-shell-taskbar.h"
 #include "e-util/e-logger.h"
 #include <glib-object.h>
 
+/* XXX Merge this into EShellTaskbar and rethink the API. */
+
 #ifdef __cplusplus
 extern "C" {
 #pragma }
@@ -62,7 +64,7 @@
 EActivityHandler *e_activity_handler_new  (void);
 
 void  e_activity_handler_attach_task_bar  (EActivityHandler *activity_hanlder,
-					   ETaskBar         *task_bar);
+					   EShellTaskbar    *shell_taskbar);
 
 void  e_activity_handler_set_message   (EActivityHandler *activity_handler,
 				        const char       *message);
@@ -70,11 +72,9 @@
 void  e_activity_handler_unset_message (EActivityHandler *activity_handler);
 
 guint  e_activity_handler_operation_started  (EActivityHandler *activity_handler,
-					      const char       *component_id,
 					      const char       *information,
 					      gboolean          cancellable);
 guint  e_activity_handler_cancelable_operation_started  (EActivityHandler *activity_handler,
-						      const char       *component_id,
 					      	      const char       *information,
 					      	      gboolean          cancellable,
 						      void (*cancel_func)(gpointer),
@@ -90,7 +90,6 @@
 
 void e_activity_handler_set_logger (EActivityHandler *handler, ELogger *logger);
 guint e_activity_handler_make_error (EActivityHandler *activity_handler,
-				      const char *component_id,
 				      int error_type,
 				      GtkWidget  *error);
 void

Modified: branches/kill-bonobo/shell/e-shell-content.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-content.c	(original)
+++ branches/kill-bonobo/shell/e-shell-content.c	Mon Sep  8 20:37:00 2008
@@ -20,35 +20,442 @@
 
 #include "e-shell-content.h"
 
-#include <e-search-bar.h>
+#include <glib/gi18n.h>
+
+#include <widgets/misc/e-action-combo-box.h>
+#include <widgets/misc/e-icon-entry.h>
+
+#include <e-shell-module.h>
+#include <e-shell-view.h>
+#include <e-shell-window-actions.h>
 
 #define E_SHELL_CONTENT_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
 	((obj), E_TYPE_SHELL_CONTENT, EShellContentPrivate))
 
 struct _EShellContentPrivate {
+
+	gpointer shell_view;  /* weak pointer */
+
+	RuleContext *search_context;
+	FilterRule *current_query;
+
+	/* Container for the following widgets */
 	GtkWidget *search_bar;
+
+	/* Search bar widgets */
+	GtkWidget *filter_label;
+	GtkWidget *filter_combo_box;
+	GtkWidget *search_label;
+	GtkWidget *search_entry;
+	GtkWidget *scope_label;
+	GtkWidget *scope_combo_box;
+
+	GtkStateType search_state;
+
+	GtkRadioAction *search_action;
+	GtkWidget *search_popup_menu;
+};
+
+enum {
+	PROP_0,
+	PROP_FILTER_ACTION,
+	PROP_FILTER_VALUE,
+	PROP_FILTER_VISIBLE,
+	PROP_SEARCH_ACTION,
+	PROP_SEARCH_CONTEXT,
+	PROP_SEARCH_TEXT,
+	PROP_SEARCH_VALUE,
+	PROP_SEARCH_VISIBLE,
+	PROP_SCOPE_ACTION,
+	PROP_SCOPE_VALUE,
+	PROP_SCOPE_VISIBLE,
+	PROP_SHELL_VIEW
 };
 
 static gpointer parent_class;
 
 static void
+shell_content_entry_activated_cb (EShellContent *shell_content,
+                                  GtkWidget *entry)
+{
+	EShellWindow *shell_window;
+	EShellView *shell_view;
+	GtkAction *action;
+
+	shell_view = e_shell_content_get_shell_view (shell_content);
+	shell_window = e_shell_view_get_shell_window (shell_view);
+
+	/* Verify the shell view is selected before proceeding. */
+	if (!e_shell_view_is_selected (shell_view))
+		return;
+
+	action = E_SHELL_WINDOW_ACTION_SEARCH_EXECUTE (shell_window);
+	gtk_action_activate (action);
+}
+
+static void
+shell_content_entry_changed_cb (EShellContent *shell_content,
+                                GtkWidget *entry)
+{
+	EShellWindow *shell_window;
+	EShellView *shell_view;
+	GtkStateType state;
+	GtkAction *action;
+	gboolean sensitive;
+	const gchar *text;
+
+	text = gtk_entry_get_text (GTK_ENTRY (entry));
+	state = shell_content->priv->search_state;
+
+	if (text != NULL && *text != '\0')
+		sensitive = (state != GTK_STATE_INSENSITIVE);
+	else
+		sensitive = (state == GTK_STATE_SELECTED);
+
+	shell_view = e_shell_content_get_shell_view (shell_content);
+	shell_window = e_shell_view_get_shell_window (shell_view);
+
+	/* Verify the shell view is selected before proceeding. */
+	if (!e_shell_view_is_selected (shell_view))
+		return;
+
+	action = E_SHELL_WINDOW_ACTION_SEARCH_CLEAR (shell_window);
+	gtk_action_set_sensitive (action, sensitive);
+}
+
+static gboolean
+shell_content_entry_focus_in_cb (EShellContent *shell_content,
+                                 GdkEventFocus *focus_event,
+                                 GtkWidget *entry)
+{
+	if (shell_content->priv->search_state == GTK_STATE_INSENSITIVE) {
+		gtk_entry_set_text (GTK_ENTRY (entry), "");
+		gtk_widget_modify_text (entry, GTK_STATE_NORMAL, NULL);
+		shell_content->priv->search_state = GTK_STATE_NORMAL;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+shell_content_entry_focus_out_cb (EShellContent *shell_content,
+                                  GdkEventFocus *focus_event,
+                                  GtkWidget *entry)
+{
+	/* FIXME */
+	return FALSE;
+}
+
+static gboolean
+shell_content_entry_key_press_cb (EShellContent *shell_content,
+                                  GdkEventKey *key_event,
+                                  GtkWidget *entry)
+{
+	/* FIXME */
+	return FALSE;
+}
+
+static void
+shell_content_init_search_context (EShellContent *shell_content)
+{
+	EShellView *shell_view;
+	EShellModule *shell_module;
+	EShellViewClass *shell_view_class;
+	RuleContext *context;
+	FilterRule *rule;
+	FilterPart *part;
+	gchar *system_filename;
+	gchar *user_filename;
+
+	shell_view = e_shell_content_get_shell_view (shell_content);
+	shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
+	shell_module = E_SHELL_MODULE (shell_view_class->type_module);
+
+	/* The filename for built-in searches is specified in a
+	 * module's EShellModuleInfo.  All built-in search rules
+	 * live in the same directory. */
+	system_filename = g_build_filename (
+		EVOLUTION_RULEDIR,
+		e_shell_module_get_searches (shell_module), NULL);
+
+	/* The filename for custom saved searches is always of
+	 * the form "$(shell_module_data_dir)/searches.xml". */
+	user_filename = g_build_filename (
+		e_shell_module_get_data_dir (shell_module),
+		"searches.xml", NULL);
+
+	context = rule_context_new ();
+	rule_context_add_part_set (
+		context, "partset", FILTER_TYPE_PART,
+		rule_context_add_part, rule_context_next_part);
+	rule_context_add_rule_set (
+		context, "ruleset", FILTER_TYPE_RULE,
+		rule_context_add_rule, rule_context_next_rule);
+	rule_context_load (context, system_filename, user_filename);
+
+	/* XXX Not sure why this is necessary. */
+	g_object_set_data_full (
+		G_OBJECT (context), "system", system_filename, g_free);
+	g_object_set_data_full (
+		G_OBJECT (context), "user", user_filename, g_free);
+
+	/* XXX I don't really understand what this does. */
+	rule = filter_rule_new ();
+	part = rule_context_next_part (context, NULL);
+	if (part == NULL)
+		g_warning (
+			"Could not load %s search: no parts",
+			shell_view_class->type_module->name);
+	else
+		filter_rule_add_part (rule, filter_part_clone (part));
+
+	g_free (system_filename);
+	g_free (user_filename);
+
+	shell_content->priv->search_context = context;
+}
+
+static void
+shell_content_set_shell_view (EShellContent *shell_content,
+                              EShellView *shell_view)
+{
+	g_return_if_fail (shell_content->priv->shell_view == NULL);
+
+	shell_content->priv->shell_view = shell_view;
+
+	g_object_add_weak_pointer (
+		G_OBJECT (shell_view),
+		&shell_content->priv->shell_view);
+}
+
+static void
+shell_content_set_property (GObject *object,
+                            guint property_id,
+                            const GValue *value,
+                            GParamSpec *pspec)
+{
+	switch (property_id) {
+		case PROP_FILTER_ACTION:
+			e_shell_content_set_filter_action (
+				E_SHELL_CONTENT (object),
+				g_value_get_object (value));
+			return;
+
+		case PROP_FILTER_VALUE:
+			e_shell_content_set_filter_value (
+				E_SHELL_CONTENT (object),
+				g_value_get_int (value));
+			return;
+
+		case PROP_FILTER_VISIBLE:
+			e_shell_content_set_filter_visible (
+				E_SHELL_CONTENT (object),
+				g_value_get_boolean (value));
+			return;
+
+		case PROP_SEARCH_ACTION:
+			e_shell_content_set_search_action (
+				E_SHELL_CONTENT (object),
+				g_value_get_object (value));
+			return;
+
+		case PROP_SEARCH_TEXT:
+			e_shell_content_set_search_text (
+				E_SHELL_CONTENT (object),
+				g_value_get_string (value));
+			return;
+
+		case PROP_SEARCH_VALUE:
+			e_shell_content_set_search_value (
+				E_SHELL_CONTENT (object),
+				g_value_get_int (value));
+			return;
+
+		case PROP_SEARCH_VISIBLE:
+			e_shell_content_set_search_visible (
+				E_SHELL_CONTENT (object),
+				g_value_get_boolean (value));
+			return;
+
+		case PROP_SCOPE_ACTION:
+			e_shell_content_set_scope_action (
+				E_SHELL_CONTENT (object),
+				g_value_get_object (value));
+			return;
+
+		case PROP_SCOPE_VALUE:
+			e_shell_content_set_scope_value (
+				E_SHELL_CONTENT (object),
+				g_value_get_int (value));
+			return;
+
+		case PROP_SCOPE_VISIBLE:
+			e_shell_content_set_scope_visible (
+				E_SHELL_CONTENT (object),
+				g_value_get_boolean (value));
+			return;
+
+		case PROP_SHELL_VIEW:
+			shell_content_set_shell_view (
+				E_SHELL_CONTENT (object),
+				g_value_get_object (value));
+			return;
+	}
+
+	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
+shell_content_get_property (GObject *object,
+                            guint property_id,
+                            GValue *value,
+                            GParamSpec *pspec)
+{
+	switch (property_id) {
+		case PROP_FILTER_ACTION:
+			g_value_set_object (
+				value, e_shell_content_get_filter_action (
+				E_SHELL_CONTENT (object)));
+			return;
+
+		case PROP_FILTER_VALUE:
+			g_value_set_int (
+				value, e_shell_content_get_filter_value (
+				E_SHELL_CONTENT (object)));
+			return;
+
+		case PROP_FILTER_VISIBLE:
+			g_value_set_boolean (
+				value, e_shell_content_get_filter_visible (
+				E_SHELL_CONTENT (object)));
+			return;
+
+		case PROP_SEARCH_ACTION:
+			g_value_set_object (
+				value, e_shell_content_get_search_action (
+				E_SHELL_CONTENT (object)));
+			return;
+
+		case PROP_SEARCH_CONTEXT:
+			g_value_set_object (
+				value, e_shell_content_get_search_context (
+				E_SHELL_CONTENT (object)));
+			return;
+
+		case PROP_SEARCH_TEXT:
+			g_value_set_string (
+				value, e_shell_content_get_search_text (
+				E_SHELL_CONTENT (object)));
+			return;
+
+		case PROP_SEARCH_VALUE:
+			g_value_set_int (
+				value, e_shell_content_get_search_value (
+				E_SHELL_CONTENT (object)));
+			return;
+
+		case PROP_SEARCH_VISIBLE:
+			g_value_set_boolean (
+				value, e_shell_content_get_search_visible (
+				E_SHELL_CONTENT (object)));
+			return;
+
+		case PROP_SCOPE_ACTION:
+			g_value_set_object (
+				value, e_shell_content_get_scope_action (
+				E_SHELL_CONTENT (object)));
+			return;
+
+		case PROP_SCOPE_VALUE:
+			g_value_set_int (
+				value, e_shell_content_get_scope_value (
+				E_SHELL_CONTENT (object)));
+			return;
+
+		case PROP_SCOPE_VISIBLE:
+			g_value_set_boolean (
+				value, e_shell_content_get_scope_visible (
+				E_SHELL_CONTENT (object)));
+			return;
+
+		case PROP_SHELL_VIEW:
+			g_value_set_object (
+				value, e_shell_content_get_shell_view (
+				E_SHELL_CONTENT (object)));
+			return;
+	}
+
+	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
 shell_content_dispose (GObject *object)
 {
 	EShellContentPrivate *priv;
 
 	priv = E_SHELL_CONTENT_GET_PRIVATE (object);
 
-	if (priv->search_bar != NULL) {
-		g_object_unref (priv->search_bar);
-		priv->search_bar = NULL;
+	if (priv->shell_view != NULL) {
+		g_object_remove_weak_pointer (
+			G_OBJECT (priv->shell_view), &priv->shell_view);
+		priv->shell_view = NULL;
+	}
+
+	if (priv->filter_label != NULL) {
+		g_object_unref (priv->filter_label);
+		priv->filter_label = NULL;
 	}
 
+        if (priv->filter_combo_box != NULL) {
+                g_object_unref (priv->filter_combo_box);
+                priv->filter_combo_box = NULL;
+        }
+
+	if (priv->search_context != NULL) {
+		g_object_unref (priv->search_context);
+		priv->search_context = NULL;
+	}
+
+        if (priv->search_label != NULL) {
+                g_object_unref (priv->search_label);
+                priv->search_label = NULL;
+        }
+
+        if (priv->search_entry != NULL) {
+                g_object_unref (priv->search_entry);
+                priv->search_entry = NULL;
+        }
+
+        if (priv->scope_label != NULL) {
+                g_object_unref (priv->scope_label);
+                priv->scope_label = NULL;
+        }
+
+        if (priv->scope_combo_box != NULL) {
+                g_object_unref (priv->scope_combo_box);
+                priv->scope_combo_box = NULL;
+        }
+
+        if (priv->search_action != NULL) {
+                g_object_unref (priv->search_action);
+                priv->search_action = NULL;
+        }
+
 	/* Chain up to parent's dispose() method. */
 	G_OBJECT_CLASS (parent_class)->dispose (object);
 }
 
 static void
+shell_content_constructed (GObject *object)
+{
+	EShellContent *shell_content;
+
+	shell_content = E_SHELL_CONTENT (object);
+	shell_content_init_search_context (shell_content);
+}
+
+static void
 shell_content_size_request (GtkWidget *widget,
                             GtkRequisition *requisition)
 {
@@ -72,7 +479,7 @@
 
 static void
 shell_content_size_allocate (GtkWidget *widget,
-                       GtkAllocation *allocation)
+                             GtkAllocation *allocation)
 {
 	EShellContentPrivate *priv;
 	GtkAllocation child_allocation;
@@ -104,7 +511,7 @@
 
 static void
 shell_content_remove (GtkContainer *container,
-                GtkWidget *widget)
+                      GtkWidget *widget)
 {
 	EShellContentPrivate *priv;
 
@@ -124,9 +531,9 @@
 
 static void
 shell_content_forall (GtkContainer *container,
-                gboolean include_internals,
-                GtkCallback callback,
-                gpointer callback_data)
+                      gboolean include_internals,
+                      GtkCallback callback,
+                      gpointer callback_data)
 {
 	EShellContentPrivate *priv;
 
@@ -151,7 +558,10 @@
 	g_type_class_add_private (class, sizeof (EShellContentPrivate));
 
 	object_class = G_OBJECT_CLASS (class);
+	object_class->set_property = shell_content_set_property;
+	object_class->get_property = shell_content_get_property;
 	object_class->dispose = shell_content_dispose;
+	object_class->constructed = shell_content_constructed;
 
 	widget_class = GTK_WIDGET_CLASS (class);
 	widget_class->size_request = shell_content_size_request;
@@ -160,21 +570,232 @@
 	container_class = GTK_CONTAINER_CLASS (class);
 	container_class->remove = shell_content_remove;
 	container_class->forall = shell_content_forall;
+
+	g_object_class_install_property (
+		object_class,
+		PROP_FILTER_ACTION,
+		g_param_spec_object (
+			"filter-action",
+			NULL,
+			NULL,
+			GTK_TYPE_RADIO_ACTION,
+			G_PARAM_READWRITE));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_FILTER_VALUE,
+		g_param_spec_int (
+			"filter-value",
+			NULL,
+			NULL,
+			G_MININT,
+			G_MAXINT,
+			0,
+			G_PARAM_READWRITE));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_FILTER_VISIBLE,
+		g_param_spec_boolean (
+			"filter-visible",
+			NULL,
+			NULL,
+			TRUE,
+			G_PARAM_READWRITE |
+			G_PARAM_CONSTRUCT));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_SEARCH_ACTION,
+		g_param_spec_object (
+			"search-action",
+			NULL,
+			NULL,
+			GTK_TYPE_RADIO_ACTION,
+			G_PARAM_READWRITE));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_SEARCH_CONTEXT,
+		g_param_spec_object (
+			"search-context",
+			NULL,
+			NULL,
+			RULE_TYPE_CONTEXT,
+			G_PARAM_READABLE));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_SEARCH_TEXT,
+		g_param_spec_string (
+			"search-text",
+			NULL,
+			NULL,
+			NULL,
+			G_PARAM_READWRITE));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_SEARCH_VALUE,
+		g_param_spec_int (
+			"search-value",
+			NULL,
+			NULL,
+			G_MININT,
+			G_MAXINT,
+			0,
+			G_PARAM_READWRITE));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_SEARCH_VISIBLE,
+		g_param_spec_boolean (
+			"search-visible",
+			NULL,
+			NULL,
+			TRUE,
+			G_PARAM_READWRITE |
+			G_PARAM_CONSTRUCT));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_SCOPE_ACTION,
+		g_param_spec_object (
+			"scope-action",
+			NULL,
+			NULL,
+			GTK_TYPE_RADIO_ACTION,
+			G_PARAM_READWRITE));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_SCOPE_VALUE,
+		g_param_spec_int (
+			"scope-value",
+			NULL,
+			NULL,
+			G_MININT,
+			G_MAXINT,
+			0,
+			G_PARAM_READWRITE));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_SCOPE_VISIBLE,
+		g_param_spec_boolean (
+			"scope-visible",
+			NULL,
+			NULL,
+			FALSE,
+			G_PARAM_READWRITE |
+			G_PARAM_CONSTRUCT));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_SHELL_VIEW,
+		g_param_spec_object (
+			"shell-view",
+			NULL,
+			NULL,
+			E_TYPE_SHELL_VIEW,
+			G_PARAM_READWRITE |
+			G_PARAM_CONSTRUCT_ONLY));
 }
 
 static void
 shell_content_init (EShellContent *shell_content)
 {
+	GtkBox *box;
+	GtkLabel *label;
+	GtkWidget *mnemonic;
 	GtkWidget *widget;
+	EIconEntry *icon_entry;
 
 	shell_content->priv = E_SHELL_CONTENT_GET_PRIVATE (shell_content);
 
 	GTK_WIDGET_SET_FLAGS (shell_content, GTK_NO_WINDOW);
 
-	widget = e_search_bar_new ();
+	/*** Build the Search Bar ***/
+
+	widget = gtk_hbox_new (FALSE, 3);
 	gtk_widget_set_parent (widget, GTK_WIDGET (shell_content));
-	shell_content->priv->search_bar = g_object_ref (widget);
+	shell_content->priv->search_bar = g_object_ref_sink (widget);
+	gtk_widget_show (widget);
+
+	box = GTK_BOX (widget);
+
+	/* Filter Combo Widgets */
+
+	/* Translators: The "Show:" label precedes a combo box that
+	 * allows the user to filter the current view.  Examples of
+	 * items that appear in the combo box are "Unread Messages",
+	 * "Important Messages", or "Active Appointments". */
+	widget = gtk_label_new_with_mnemonic (_("Sho_w:"));
+	gtk_box_pack_start (box, widget, FALSE, FALSE, 0);
+	shell_content->priv->filter_label = g_object_ref (widget);
+	gtk_widget_show (widget);
+
+	label = GTK_LABEL (widget);
+
+	widget = e_action_combo_box_new ();
+	gtk_label_set_mnemonic_widget (label, widget);
+	gtk_box_pack_start (box, widget, FALSE, FALSE, 0);
+	shell_content->priv->filter_combo_box = g_object_ref (widget);
+	gtk_widget_show (widget);
+
+	/* Scope Combo Widgets */
+
+	widget = e_action_combo_box_new ();
+	gtk_box_pack_end (box, widget, FALSE, FALSE, 0);
+	shell_content->priv->scope_combo_box = g_object_ref (widget);
+	gtk_widget_show (widget); 
+
+	mnemonic = widget;
+
+	/* Translators: This is part of the quick search interface.
+	 * example: Search: [_______________] in [ Current Folder ] */
+	widget = gtk_label_new_with_mnemonic (_("i_n"));
+	gtk_label_set_mnemonic_widget (GTK_LABEL (widget), mnemonic);
+	gtk_box_pack_end (box, widget, FALSE, FALSE, 0);
+	shell_content->priv->scope_label = g_object_ref (widget);
+	gtk_widget_show (widget);
+
+	/* Search Entry Widgets */
+
+	widget = e_icon_entry_new ();
+	gtk_box_pack_end (box, widget, FALSE, FALSE, 0);
+	shell_content->priv->search_entry = g_object_ref (widget);
+	shell_content->priv->search_state = GTK_STATE_NORMAL;
 	gtk_widget_show (widget);
+
+	icon_entry = E_ICON_ENTRY (widget);
+
+	/* Translators: This is part of the quick search interface.
+	 * example: Search: [_______________] in [ Current Folder ] */
+	widget = gtk_label_new_with_mnemonic (_("Sear_ch:"));
+	gtk_box_pack_end (box, widget, FALSE, FALSE, 0);
+	shell_content->priv->search_label = g_object_ref (widget);
+	gtk_widget_show (widget);
+
+	label = GTK_LABEL (widget);
+
+	widget = e_icon_entry_get_entry (icon_entry);
+	gtk_label_set_mnemonic_widget (label, widget);
+	g_signal_connect_swapped (
+		widget, "activate",
+		G_CALLBACK (shell_content_entry_activated_cb), shell_content);
+	g_signal_connect_swapped (
+		widget, "changed",
+		G_CALLBACK (shell_content_entry_changed_cb), shell_content);
+	g_signal_connect_swapped (
+		widget, "focus-in-event",
+		G_CALLBACK (shell_content_entry_focus_in_cb), shell_content);
+	g_signal_connect_swapped (
+		widget, "focus-out-event",
+		G_CALLBACK (shell_content_entry_focus_out_cb), shell_content);
+	g_signal_connect_swapped (
+		widget, "key-press-event",
+		G_CALLBACK (shell_content_entry_key_press_cb), shell_content);
 }
 
 GType
@@ -204,15 +825,278 @@
 }
 
 GtkWidget *
-e_shell_content_new (void)
+e_shell_content_new (EShellView *shell_view)
+{
+	g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL);
+
+	return g_object_new (
+		E_TYPE_SHELL_CONTENT, "shell-view", shell_view, NULL);
+}
+
+EShellView *
+e_shell_content_get_shell_view (EShellContent *shell_content)
 {
-	return g_object_new (E_TYPE_SHELL_CONTENT, NULL);
+	g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), NULL);
+
+	return E_SHELL_VIEW (shell_content->priv->shell_view);
 }
 
-GtkWidget *
-e_shell_content_get_search_bar (EShellContent *shell_content)
+GtkRadioAction *
+e_shell_content_get_filter_action (EShellContent *shell_content)
+{
+	EActionComboBox *combo_box;
+
+	g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), NULL);
+
+	combo_box = E_ACTION_COMBO_BOX (shell_content->priv->filter_combo_box);
+
+	return e_action_combo_box_get_action (combo_box);
+}
+
+void
+e_shell_content_set_filter_action (EShellContent *shell_content,
+                                   GtkRadioAction *filter_action)
+{
+	EActionComboBox *combo_box;
+
+	g_return_if_fail (E_IS_SHELL_CONTENT (shell_content));
+
+	combo_box = E_ACTION_COMBO_BOX (shell_content->priv->filter_combo_box);
+
+	e_action_combo_box_set_action (combo_box, filter_action);
+	g_object_notify (G_OBJECT (shell_content), "filter-action");
+}
+
+gint
+e_shell_content_get_filter_value (EShellContent *shell_content)
+{
+	EActionComboBox *combo_box;
+
+	g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), 0);
+
+	combo_box = E_ACTION_COMBO_BOX (shell_content->priv->filter_combo_box);
+
+	return e_action_combo_box_get_current_value (combo_box);
+}
+
+void
+e_shell_content_set_filter_value (EShellContent *shell_content,
+                                  gint filter_value)
+{
+	EActionComboBox *combo_box;
+
+	g_return_if_fail (E_IS_SHELL_CONTENT (shell_content));
+
+	combo_box = E_ACTION_COMBO_BOX (shell_content->priv->filter_combo_box);
+
+	e_action_combo_box_set_current_value (combo_box, filter_value);
+	g_object_notify (G_OBJECT (shell_content), "filter-value");
+}
+
+gboolean
+e_shell_content_get_filter_visible (EShellContent *shell_content)
+{
+	g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), FALSE);
+
+	return GTK_WIDGET_VISIBLE (shell_content->priv->filter_combo_box);
+}
+
+void
+e_shell_content_set_filter_visible (EShellContent *shell_content,
+                                    gboolean filter_visible)
+{
+	g_return_if_fail (E_IS_SHELL_CONTENT (shell_content));
+
+	if (filter_visible) {
+		gtk_widget_show (shell_content->priv->filter_label);
+		gtk_widget_show (shell_content->priv->filter_combo_box);
+	} else {
+		gtk_widget_hide (shell_content->priv->filter_label);
+		gtk_widget_hide (shell_content->priv->filter_combo_box);
+	}
+}
+
+GtkRadioAction *
+e_shell_content_get_search_action (EShellContent *shell_content)
 {
 	g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), NULL);
 
-	return shell_content->priv->search_bar;
+	return shell_content->priv->search_action;
+}
+
+void
+e_shell_content_set_search_action (EShellContent *shell_content,
+                                   GtkRadioAction *search_action)
+{
+	g_return_if_fail (E_IS_SHELL_CONTENT (shell_content));
+
+	if (search_action != NULL) {
+		g_return_if_fail (GTK_IS_RADIO_ACTION (search_action));
+		g_object_ref (search_action);
+	}
+
+	shell_content->priv->search_action = search_action;
+	g_object_notify (G_OBJECT (shell_content), "search-action");
+}
+
+RuleContext *
+e_shell_content_get_search_context (EShellContent *shell_content)
+{
+	g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), NULL);
+
+	return shell_content->priv->search_context;
+}
+
+const gchar *
+e_shell_content_get_search_text (EShellContent *shell_content)
+{
+	EIconEntry *icon_entry;
+	GtkWidget *text_entry;
+
+	g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), NULL);
+
+	if (shell_content->priv->search_state == GTK_STATE_INSENSITIVE)
+		return "";
+
+	icon_entry = E_ICON_ENTRY (shell_content->priv->search_entry);
+	text_entry = e_icon_entry_get_entry (icon_entry);
+
+	return gtk_entry_get_text (GTK_ENTRY (text_entry));
+}
+
+void
+e_shell_content_set_search_text (EShellContent *shell_content,
+                                 const gchar *search_text)
+{
+	EIconEntry *icon_entry;
+	GtkWidget *text_entry;
+
+	g_return_if_fail (E_IS_SHELL_CONTENT (shell_content));
+
+	icon_entry = E_ICON_ENTRY (shell_content->priv->search_entry);
+	text_entry = e_icon_entry_get_entry (icon_entry);
+
+	search_text = (search_text != NULL) ? search_text : "";
+	gtk_entry_set_text (GTK_ENTRY (text_entry), search_text);
+	g_object_notify (G_OBJECT (shell_content), "search-text");
+}
+
+gint
+e_shell_content_get_search_value (EShellContent *shell_content)
+{
+	g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), 0);
+
+	/* FIXME */
+	return 0;
+}
+
+void
+e_shell_content_set_search_value (EShellContent *shell_content,
+                                  gint search_value)
+{
+	g_return_if_fail (E_IS_SHELL_CONTENT (shell_content));
+
+	/* FIXME */
+
+	g_object_notify (G_OBJECT (shell_content), "search-value");
+}
+
+gboolean
+e_shell_content_get_search_visible (EShellContent *shell_content)
+{
+	g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), FALSE);
+
+	return GTK_WIDGET_VISIBLE (shell_content->priv->search_entry);
+}
+
+void
+e_shell_content_set_search_visible (EShellContent *shell_content,
+                                    gboolean search_visible)
+{
+	g_return_if_fail (E_IS_SHELL_CONTENT (shell_content));
+
+	if (search_visible) {
+		gtk_widget_show (shell_content->priv->search_label);
+		gtk_widget_show (shell_content->priv->search_entry);
+	} else {
+		gtk_widget_hide (shell_content->priv->search_label);
+		gtk_widget_hide (shell_content->priv->search_entry);
+	}
+}
+
+GtkRadioAction *
+e_shell_content_get_scope_action (EShellContent *shell_content)
+{
+	EActionComboBox *combo_box;
+
+	g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), NULL);
+
+	combo_box = E_ACTION_COMBO_BOX (shell_content->priv->scope_combo_box);
+
+	return e_action_combo_box_get_action (combo_box);
+}
+
+void
+e_shell_content_set_scope_action (EShellContent *shell_content,
+                                  GtkRadioAction *scope_action)
+{
+	EActionComboBox *combo_box;
+
+	g_return_if_fail (E_IS_SHELL_CONTENT (shell_content));
+
+	combo_box = E_ACTION_COMBO_BOX (shell_content->priv->scope_combo_box);
+
+	e_action_combo_box_set_action (combo_box, scope_action);
+	g_object_notify (G_OBJECT (shell_content), "scope-action");
+}
+
+gint
+e_shell_content_get_scope_value (EShellContent *shell_content)
+{
+	EActionComboBox *combo_box;
+
+	g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), 0);
+
+	combo_box = E_ACTION_COMBO_BOX (shell_content->priv->scope_combo_box);
+
+	return e_action_combo_box_get_current_value (combo_box);
+}
+
+void
+e_shell_content_set_scope_value (EShellContent *shell_content,
+                                 gint scope_value)
+{
+	EActionComboBox *combo_box;
+
+	g_return_if_fail (E_IS_SHELL_CONTENT (shell_content));
+
+	combo_box = E_ACTION_COMBO_BOX (shell_content->priv->scope_combo_box);
+
+	e_action_combo_box_set_current_value (combo_box, scope_value);
+	g_object_notify (G_OBJECT (shell_content), "scope-value");
+}
+
+gboolean
+e_shell_content_get_scope_visible (EShellContent *shell_content)
+{
+	g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), FALSE);
+
+	return GTK_WIDGET_VISIBLE (shell_content->priv->scope_combo_box);
+}
+
+void
+e_shell_content_set_scope_visible (EShellContent *shell_content,
+                                   gboolean scope_visible)
+{
+	g_return_if_fail (E_IS_SHELL_CONTENT (shell_content));
+
+	if (scope_visible) {
+		gtk_widget_show (shell_content->priv->scope_label);
+		gtk_widget_show (shell_content->priv->scope_combo_box);
+	} else {
+		gtk_widget_hide (shell_content->priv->scope_label);
+		gtk_widget_hide (shell_content->priv->scope_combo_box);
+	}
+
+	g_object_notify (G_OBJECT (shell_content), "scope-visible");
 }

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	Mon Sep  8 20:37:00 2008
@@ -22,6 +22,7 @@
 #define E_SHELL_CONTENT_H
 
 #include <gtk/gtk.h>
+#include <filter/rule-context.h>
 
 /* Standard GObject macros */
 #define E_TYPE_SHELL_CONTENT \
@@ -44,6 +45,9 @@
 
 G_BEGIN_DECLS
 
+/* Avoid including <e-shell-view.h> */
+struct _EShellView;
+
 typedef struct _EShellContent EShellContent;
 typedef struct _EShellContentClass EShellContentClass;
 typedef struct _EShellContentPrivate EShellContentPrivate;
@@ -58,8 +62,57 @@
 };
 
 GType		e_shell_content_get_type	(void);
-GtkWidget *	e_shell_content_new		(void);
-GtkWidget *	e_shell_content_get_search_bar	(EShellContent *shell_content);
+GtkWidget *	e_shell_content_new		(struct _EShellView *shell_view);
+struct _EShellView *
+		e_shell_content_get_shell_view	(EShellContent *shell_content);
+RuleContext *	e_shell_content_get_context	(EShellContent *shell_content);
+void		e_shell_content_set_context	(EShellContent *shell_content,
+						 RuleContext *context);
+GtkRadioAction *e_shell_content_get_filter_action
+						(EShellContent *shell_content);
+void		e_shell_content_set_filter_action
+						(EShellContent *shell_content,
+						 GtkRadioAction *filter_action);
+gint		e_shell_content_get_filter_value(EShellContent *shell_content);
+void		e_shell_content_set_filter_value(EShellContent *shell_content,
+						 gint filter_value);
+gboolean	e_shell_content_get_filter_visible
+						(EShellContent *shell_content);
+void		e_shell_content_set_filter_visible
+						(EShellContent *shell_content,
+						 gboolean filter_visible);
+GtkRadioAction *e_shell_content_get_search_action
+						(EShellContent *shell_content);
+void		e_shell_content_set_search_action
+						(EShellContent *shell_content,
+						 GtkRadioAction *search_action);
+RuleContext *	e_shell_content_get_search_context
+						(EShellContent *shell_content);
+const gchar *	e_shell_content_get_search_text	(EShellContent *shell_content);
+void		e_shell_content_set_search_text	(EShellContent *shell_content,
+						 const gchar *search_text);
+gint		e_shell_content_get_search_value(EShellContent *shell_content);
+void		e_shell_content_set_search_value(EShellContent *shell_content,
+						 gint search_value);
+gboolean	e_shell_content_get_search_visible
+						(EShellContent *shell_content);
+void		e_shell_content_set_search_visible
+						(EShellContent *shell_content,
+						 gboolean search_visible);
+GtkRadioAction *e_shell_content_get_scope_action(EShellContent *shell_content);
+void		e_shell_content_set_scope_action(EShellContent *shell_content,
+						 GtkRadioAction *scope_action);
+gint		e_shell_content_get_scope_value	(EShellContent *shell_content);
+void		e_shell_content_set_scope_value	(EShellContent *shell_content,
+						 gint scope_value);
+gboolean	e_shell_content_get_scope_visible
+						(EShellContent *shell_content);
+void		e_shell_content_set_scope_visible
+						(EShellContent *shell_content,
+						 gboolean scope_visible);
+void		e_shell_content_save_search_dialog
+						(EShellContent *shell_content,
+						 const gchar *filename);
 
 G_END_DECLS
 

Modified: branches/kill-bonobo/shell/e-shell-registry.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-registry.c	(original)
+++ branches/kill-bonobo/shell/e-shell-registry.c	Mon Sep  8 20:37:00 2008
@@ -129,7 +129,9 @@
 {
 	EShellModule *shell_module;
 
-	g_return_val_if_fail (name != NULL, NULL);
+	/* Handle NULL arguments silently. */
+	if (name == NULL)
+		return NULL;
 
 	shell_module = e_shell_registry_get_module_by_name (name);
 

Modified: branches/kill-bonobo/shell/e-shell-sidebar.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-sidebar.c	(original)
+++ branches/kill-bonobo/shell/e-shell-sidebar.c	Mon Sep  8 20:37:00 2008
@@ -20,11 +20,16 @@
 
 #include "e-shell-sidebar.h"
 
+#include <e-shell-view.h>
+
 #define E_SHELL_SIDEBAR_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
 	((obj), E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate))
 
 struct _EShellSidebarPrivate {
+
+	gpointer shell_view;  /* weak pointer */
+
 	GtkWidget *event_box;
 	GtkWidget *image;
 	GtkWidget *primary_label;
@@ -37,12 +42,44 @@
 	PROP_0,
 	PROP_ICON_NAME,
 	PROP_PRIMARY_TEXT,
-	PROP_SECONDARY_TEXT
+	PROP_SECONDARY_TEXT,
+	PROP_SHELL_VIEW
 };
 
 static gpointer parent_class;
 
 static void
+shell_sidebar_init_icon_and_text (EShellSidebar *shell_sidebar)
+{
+	EShellView *shell_view;
+	EShellViewClass *shell_view_class;
+	const gchar *icon_name;
+	const gchar *primary_text;
+
+	shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
+	shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
+
+	icon_name = shell_view_class->icon_name;
+	e_shell_sidebar_set_icon_name (shell_sidebar, icon_name);
+
+	primary_text = shell_view_class->label;
+	e_shell_sidebar_set_primary_text (shell_sidebar, primary_text);
+}
+
+static void
+shell_sidebar_set_shell_view (EShellSidebar *shell_sidebar,
+                              EShellView *shell_view)
+{
+	g_return_if_fail (shell_sidebar->priv->shell_view == NULL);
+
+	shell_sidebar->priv->shell_view = shell_view;
+
+	g_object_add_weak_pointer (
+		G_OBJECT (shell_view),
+		&shell_sidebar->priv->shell_view);
+}
+
+static void
 shell_sidebar_set_property (GObject *object,
                             guint property_id,
                             const GValue *value,
@@ -66,6 +103,12 @@
 				E_SHELL_SIDEBAR (object),
 				g_value_get_string (value));
 			return;
+
+		case PROP_SHELL_VIEW:
+			shell_sidebar_set_shell_view (
+				E_SHELL_SIDEBAR (object),
+				g_value_get_object (value));
+			return;
 	}
 
 	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -95,6 +138,12 @@
 				value, e_shell_sidebar_get_secondary_text (
 				E_SHELL_SIDEBAR (object)));
 			return;
+
+		case PROP_SHELL_VIEW:
+			g_value_set_object (
+				value, e_shell_sidebar_get_shell_view (
+				E_SHELL_SIDEBAR (object)));
+			return;
 	}
 
 	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -107,6 +156,12 @@
 
 	priv = E_SHELL_SIDEBAR_GET_PRIVATE (object);
 
+	if (priv->shell_view != NULL) {
+		g_object_remove_weak_pointer (
+			G_OBJECT (priv->shell_view), &priv->shell_view);
+		priv->shell_view = NULL;
+	}
+
 	if (priv->event_box != NULL) {
 		g_object_unref (priv->event_box);
 		priv->event_box = NULL;
@@ -146,6 +201,15 @@
 }
 
 static void
+shell_sidebar_constructed (GObject *object)
+{
+	EShellSidebar *shell_sidebar;
+
+	shell_sidebar = E_SHELL_SIDEBAR (object);
+	shell_sidebar_init_icon_and_text (shell_sidebar);
+}
+
+static void
 shell_sidebar_size_request (GtkWidget *widget,
                             GtkRequisition *requisition)
 {
@@ -252,6 +316,7 @@
 	object_class->get_property = shell_sidebar_get_property;
 	object_class->dispose = shell_sidebar_dispose;
 	object_class->finalize = shell_sidebar_finalize;
+	object_class->constructed = shell_sidebar_constructed;
 
 	widget_class = GTK_WIDGET_CLASS (class);
 	widget_class->size_request = shell_sidebar_size_request;
@@ -269,8 +334,7 @@
 			NULL,
 			NULL,
 			NULL,
-			G_PARAM_READWRITE |
-			G_PARAM_CONSTRUCT));
+			G_PARAM_READWRITE));
 
 	g_object_class_install_property (
 		object_class,
@@ -280,8 +344,7 @@
 			NULL,
 			NULL,
 			NULL,
-			G_PARAM_READWRITE |
-			G_PARAM_CONSTRUCT));
+			G_PARAM_READWRITE));
 
 	g_object_class_install_property (
 		object_class,
@@ -291,8 +354,18 @@
 			NULL,
 			NULL,
 			NULL,
+			G_PARAM_READWRITE));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_SHELL_VIEW,
+		g_param_spec_object (
+			"shell-view",
+			NULL,
+			NULL,
+			E_TYPE_SHELL_VIEW,
 			G_PARAM_READWRITE |
-			G_PARAM_CONSTRUCT));
+			G_PARAM_CONSTRUCT_ONLY));
 }
 
 static void
@@ -372,9 +445,20 @@
 }
 
 GtkWidget *
-e_shell_sidebar_new (void)
+e_shell_sidebar_new (EShellView *shell_view)
+{
+	g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL);
+
+	return g_object_new (
+		E_TYPE_SHELL_SIDEBAR, "shell-view", shell_view, NULL);
+}
+
+EShellView *
+e_shell_sidebar_get_shell_view (EShellSidebar *shell_sidebar)
 {
-	return g_object_new (E_TYPE_SHELL_SIDEBAR, NULL);
+	g_return_val_if_fail (E_IS_SHELL_SIDEBAR (shell_sidebar), NULL);
+
+	return E_SHELL_VIEW (shell_sidebar->priv->shell_view);
 }
 
 const gchar *

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	Mon Sep  8 20:37:00 2008
@@ -46,6 +46,9 @@
 
 G_BEGIN_DECLS
 
+/* Avoid including <e-shell-view.h> */
+struct _EShellView;
+
 typedef struct _EShellSidebar EShellSidebar;
 typedef struct _EShellSidebarClass EShellSidebarClass;
 typedef struct _EShellSidebarPrivate EShellSidebarPrivate;
@@ -60,7 +63,9 @@
 };
 
 GType		e_shell_sidebar_get_type	(void);
-GtkWidget *	e_shell_sidebar_new		(void);
+GtkWidget *	e_shell_sidebar_new		(struct _EShellView *shell_view);
+struct _EShellView *
+		e_shell_sidebar_get_shell_view	(EShellSidebar *shell_sidebar);
 const gchar *	e_shell_sidebar_get_icon_name	(EShellSidebar *shell_sidebar);
 void		e_shell_sidebar_set_icon_name	(EShellSidebar *shell_sidebar,
 						 const gchar *icon_name);

Modified: branches/kill-bonobo/shell/e-shell-view.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-view.c	(original)
+++ branches/kill-bonobo/shell/e-shell-view.c	Mon Sep  8 20:37:00 2008
@@ -23,10 +23,6 @@
 #include <string.h>
 #include <glib/gi18n.h>
 
-#include <filter/rule-context.h>
-#include <widgets/misc/e-search-bar.h>
-#include <widgets/misc/e-task-bar.h>
-
 #include <e-shell-content.h>
 #include <e-shell-module.h>
 #include <e-shell-sidebar.h>
@@ -38,9 +34,11 @@
 	((obj), E_TYPE_SHELL_VIEW, EShellViewPrivate))
 
 struct _EShellViewPrivate {
+
+	gpointer shell_window;  /* weak pointer */
+
 	gchar *title;
 	gint page_num;
-	gpointer window;  /* weak pointer */
 
 	GtkWidget *content;
 	GtkWidget *sidebar;
@@ -53,8 +51,8 @@
 	PROP_0,
 	PROP_PAGE_NUM,
 	PROP_TITLE,
-	PROP_VIEW_INSTANCE,
-	PROP_WINDOW
+	PROP_SHELL_WINDOW,
+	PROP_VIEW_INSTANCE
 };
 
 enum {
@@ -66,70 +64,6 @@
 static gulong signals[LAST_SIGNAL];
 
 static void
-shell_view_setup_search_context (EShellView *shell_view)
-{
-	RuleContext *context;
-	EShellViewClass *class;
-	EShellModule *shell_module;
-	FilterRule *rule;
-	FilterPart *part;
-	GtkWidget *widget;
-	gchar *system_filename;
-	gchar *user_filename;
-
-	class = E_SHELL_VIEW_GET_CLASS (shell_view);
-	shell_module = E_SHELL_MODULE (class->type_module);
-
-	/* The filename for built-in searches is specified in a
-	 * module's EShellModuleInfo.  All built-in search rules
-	 * live in the same directory. */
-	system_filename = g_build_filename (
-		EVOLUTION_RULEDIR,
-		e_shell_module_get_searches (shell_module), NULL);
-
-	/* The filename for custom saved searches is always of
-	 * the form "$(shell_module_data_dir)/searches.xml". */
-	user_filename = g_build_filename (
-		e_shell_module_get_data_dir (shell_module),
-		"searches.xml", NULL);
-
-	context = rule_context_new ();
-	rule_context_add_part_set (
-		context, "partset", FILTER_TYPE_PART,
-		rule_context_add_part, rule_context_next_part);
-	rule_context_add_rule_set (
-		context, "ruleset", FILTER_TYPE_RULE,
-		rule_context_add_rule, rule_context_next_rule);
-	rule_context_load (context, system_filename, user_filename);
-
-	/* XXX Not sure why this is necessary. */
-	g_object_set_data_full (
-		G_OBJECT (context), "system", system_filename, g_free);
-	g_object_set_data_full (
-		G_OBJECT (context), "user", user_filename, g_free);
-
-	/* XXX I don't really understand what this does. */
-	rule = filter_rule_new ();
-	part = rule_context_next_part (context, NULL);
-	if (part == NULL)
-		g_warning (
-			"Could not load %s search; no parts.",
-			class->type_module->name);
-	else
-		filter_rule_add_part (rule, filter_part_clone (part));
-
-	g_free (system_filename);
-	g_free (user_filename);
-
-	/* Hand the context off to the search bar. */
-	widget = e_shell_view_get_content_widget (shell_view);
-	widget = e_shell_content_get_search_bar (E_SHELL_CONTENT (widget));
-	e_search_bar_set_context (E_SEARCH_BAR (widget), context);
-
-	g_object_unref (context);
-}
-
-static void
 shell_view_set_page_num (EShellView *shell_view,
                          gint page_num)
 {
@@ -137,15 +71,16 @@
 }
 
 static void
-shell_view_set_window (EShellView *shell_view,
-                       GtkWidget *window)
+shell_view_set_shell_window (EShellView *shell_view,
+                             GtkWidget *shell_window)
 {
-	g_return_if_fail (GTK_IS_WINDOW (window));
+	g_return_if_fail (shell_view->priv->shell_window == NULL);
 
-	shell_view->priv->window = window;
+	shell_view->priv->shell_window = shell_window;
 
 	g_object_add_weak_pointer (
-		G_OBJECT (window), &shell_view->priv->window);
+		G_OBJECT (shell_window),
+		&shell_view->priv->shell_window);
 }
 
 static void
@@ -167,14 +102,14 @@
 				g_value_get_string (value));
 			return;
 
-		case PROP_VIEW_INSTANCE:
-			e_shell_view_set_view_instance (
+		case PROP_SHELL_WINDOW:
+			shell_view_set_shell_window (
 				E_SHELL_VIEW (object),
 				g_value_get_object (value));
 			return;
 
-		case PROP_WINDOW:
-			shell_view_set_window (
+		case PROP_VIEW_INSTANCE:
+			e_shell_view_set_view_instance (
 				E_SHELL_VIEW (object),
 				g_value_get_object (value));
 			return;
@@ -202,15 +137,15 @@
 				E_SHELL_VIEW (object)));
 			return;
 
-		case PROP_VIEW_INSTANCE:
+		case PROP_SHELL_WINDOW:
 			g_value_set_object (
-				value, e_shell_view_get_view_instance (
+				value, e_shell_view_get_shell_window (
 				E_SHELL_VIEW (object)));
 			return;
 
-		case PROP_WINDOW:
+		case PROP_VIEW_INSTANCE:
 			g_value_set_object (
-				value, e_shell_view_get_window (
+				value, e_shell_view_get_view_instance (
 				E_SHELL_VIEW (object)));
 			return;
 	}
@@ -225,10 +160,10 @@
 
 	priv = E_SHELL_VIEW_GET_PRIVATE (object);
 
-	if (priv->window != NULL) {
+	if (priv->shell_window != NULL) {
 		g_object_remove_weak_pointer (
-			G_OBJECT (priv->window), &priv->window);
-		priv->window = NULL;
+			G_OBJECT (priv->shell_window), &priv->shell_window);
+		priv->shell_window = NULL;
 	}
 
 	if (priv->content != NULL) {
@@ -271,19 +206,25 @@
 static void
 shell_view_constructed (GObject *object)
 {
-	EShellViewClass *class;
 	EShellView *shell_view;
-	GtkWidget *sidebar;
+	GtkWidget *widget;
 
 	shell_view = E_SHELL_VIEW (object);
-	class = E_SHELL_VIEW_GET_CLASS (object);
-	sidebar = e_shell_view_get_sidebar_widget (shell_view);
-	e_shell_sidebar_set_icon_name (
-		E_SHELL_SIDEBAR (sidebar), class->icon_name);
-	e_shell_sidebar_set_primary_text (
-		E_SHELL_SIDEBAR (sidebar), class->label);
 
-	shell_view_setup_search_context (shell_view);
+	/* We do this AFTER instance initialization so the
+	 * E_SHELL_VIEW_GET_CLASS() macro works properly. */
+
+	widget = e_shell_content_new (shell_view);
+	shell_view->priv->content = g_object_ref_sink (widget);
+	gtk_widget_show (widget);
+
+	widget = e_shell_sidebar_new (shell_view);
+	shell_view->priv->sidebar = g_object_ref_sink (widget);
+	gtk_widget_show (widget);
+
+	widget = e_shell_taskbar_new (shell_view);
+	shell_view->priv->taskbar = g_object_ref_sink (widget);
+	gtk_widget_show (widget);
 
 	/* XXX GObjectClass doesn't implement constructed(), so we will.
 	 *     Then subclasses won't have to check the function pointer
@@ -333,6 +274,17 @@
 
 	g_object_class_install_property (
 		object_class,
+		PROP_SHELL_WINDOW,
+		g_param_spec_object (
+			"shell-window",
+			_("Shell Window"),
+			_("The window to which the shell view belongs"),
+			E_TYPE_SHELL_WINDOW,
+			G_PARAM_READWRITE |
+			G_PARAM_CONSTRUCT_ONLY));
+
+	g_object_class_install_property (
+		object_class,
 		PROP_VIEW_INSTANCE,
 		g_param_spec_object (
 			"view-instance",
@@ -341,17 +293,6 @@
 			GAL_VIEW_INSTANCE_TYPE,
 			G_PARAM_READWRITE));
 
-	g_object_class_install_property (
-		object_class,
-		PROP_WINDOW,
-		g_param_spec_object (
-			"window",
-			_("Window"),
-			_("The window to which the shell view belongs"),
-			GTK_TYPE_WINDOW,
-			G_PARAM_READWRITE |
-			G_PARAM_CONSTRUCT_ONLY));
-
 	signals[CHANGED] = g_signal_new (
 		"changed",
 		G_OBJECT_CLASS_TYPE (object_class),
@@ -365,21 +306,7 @@
 static void
 shell_view_init (EShellView *shell_view)
 {
-	GtkWidget *widget;
-
 	shell_view->priv = E_SHELL_VIEW_GET_PRIVATE (shell_view);
-
-	widget = e_shell_content_new ();
-	shell_view->priv->content = g_object_ref_sink (widget);
-	gtk_widget_show (widget);
-
-	widget = e_shell_sidebar_new ();
-	shell_view->priv->sidebar = g_object_ref_sink (widget);
-	gtk_widget_show (widget);
-
-	widget = e_task_bar_new ();
-	shell_view->priv->taskbar = g_object_ref_sink (widget);
-	gtk_widget_show (widget);
 }
 
 GType
@@ -478,11 +405,11 @@
 }
 
 EShellWindow *
-e_shell_view_get_window (EShellView *shell_view)
+e_shell_view_get_shell_window (EShellView *shell_view)
 {
 	g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL);
 
-	return E_SHELL_WINDOW (shell_view->priv->window);
+	return E_SHELL_WINDOW (shell_view->priv->shell_window);
 }
 
 gboolean
@@ -496,7 +423,7 @@
 	g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE);
 
 	class = E_SHELL_VIEW_GET_CLASS (shell_view);
-	shell_window = e_shell_view_get_window (shell_view);
+	shell_window = e_shell_view_get_shell_window (shell_view);
 	this_view_name = e_shell_view_get_name (shell_view);
 	curr_view_name = e_shell_window_get_current_view (shell_window);
 	g_return_val_if_fail (curr_view_name != NULL, FALSE);
@@ -512,28 +439,28 @@
 	return shell_view->priv->page_num;
 }
 
-GtkWidget *
-e_shell_view_get_content_widget (EShellView *shell_view)
+EShellContent *
+e_shell_view_get_content (EShellView *shell_view)
 {
 	g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL);
 
-	return shell_view->priv->content;
+	return E_SHELL_CONTENT (shell_view->priv->content);
 }
 
-GtkWidget *
-e_shell_view_get_sidebar_widget (EShellView *shell_view)
+EShellSidebar *
+e_shell_view_get_sidebar (EShellView *shell_view)
 {
 	g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL);
 
-	return shell_view->priv->sidebar;
+	return E_SHELL_SIDEBAR (shell_view->priv->sidebar);
 }
 
-GtkWidget *
-e_shell_view_get_taskbar_widget (EShellView *shell_view)
+EShellTaskbar *
+e_shell_view_get_taskbar (EShellView *shell_view)
 {
 	g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL);
 
-	return shell_view->priv->taskbar;
+	return E_SHELL_TASKBAR (shell_view->priv->taskbar);
 }
 
 void

Modified: branches/kill-bonobo/shell/e-shell-view.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell-view.h	(original)
+++ branches/kill-bonobo/shell/e-shell-view.h	Mon Sep  8 20:37:00 2008
@@ -22,6 +22,9 @@
 #define E_SHELL_VIEW_H
 
 #include <e-shell-common.h>
+#include <e-shell-content.h>
+#include <e-shell-sidebar.h>
+#include <e-shell-taskbar.h>
 #include <e-shell-window.h>
 
 #include <gal-view-instance.h>
@@ -89,12 +92,12 @@
 		e_shell_view_get_view_instance	(EShellView *shell_view);
 void		e_shell_view_set_view_instance	(EShellView *shell_view,
 						 GalViewInstance *instance);
-EShellWindow *	e_shell_view_get_window		(EShellView *shell_view);
+EShellWindow *	e_shell_view_get_shell_window	(EShellView *shell_view);
 gboolean	e_shell_view_is_selected	(EShellView *shell_view);
 gint		e_shell_view_get_page_num	(EShellView *shell_view);
-GtkWidget *	e_shell_view_get_content_widget	(EShellView *shell_view);
-GtkWidget *	e_shell_view_get_sidebar_widget	(EShellView *shell_view);
-GtkWidget *	e_shell_view_get_taskbar_widget	(EShellView *shell_view);
+EShellContent *	e_shell_view_get_content	(EShellView *shell_view);
+EShellSidebar *	e_shell_view_get_sidebar	(EShellView *shell_view);
+EShellTaskbar *	e_shell_view_get_taskbar	(EShellView *shell_view);
 void		e_shell_view_changed		(EShellView *shell_view);
 
 G_END_DECLS

Modified: branches/kill-bonobo/shell/e-shell-window-actions.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-window-actions.c	(original)
+++ branches/kill-bonobo/shell/e-shell-window-actions.c	Mon Sep  8 20:37:00 2008
@@ -868,37 +868,31 @@
 action_search_clear_cb (GtkAction *action,
                         EShellWindow *shell_window)
 {
+	EShellContent *shell_content;
 	EShellView *shell_view;
-	GtkWidget *widget;
 	const gchar *view_name;
 
-	/* Dig up the search bar. */
 	view_name = e_shell_window_get_current_view (shell_window);
 	shell_view = e_shell_window_get_view (shell_window, view_name);
-	widget = e_shell_view_get_content_widget (shell_view);
-	widget = e_shell_content_get_search_bar (E_SHELL_CONTENT (widget));
-
-	e_search_bar_set_search_text (E_SEARCH_BAR (widget), NULL);
+	shell_content = e_shell_view_get_content (shell_view);
+	e_shell_content_set_search_text (shell_content, "");
 }
 
 static void
 action_search_edit_cb (GtkAction *action,
                        EShellWindow *shell_window)
 {
+	EShellContent *shell_content;
 	EShellView *shell_view;
 	RuleContext *context;
 	RuleEditor *editor;
-	GtkWidget *widget;
 	const gchar *filename;
 	const gchar *view_name;
 
-	/* Dig up the search bar. */
 	view_name = e_shell_window_get_current_view (shell_window);
 	shell_view = e_shell_window_get_view (shell_window, view_name);
-	widget = e_shell_view_get_content_widget (shell_view);
-	widget = e_shell_content_get_search_bar (E_SHELL_CONTENT (widget));
-
-	context = e_search_bar_get_context (E_SEARCH_BAR (widget));
+	shell_content = e_shell_view_get_content (shell_view);
+	context = e_shell_content_get_search_context (shell_content);
 	g_return_if_fail (context != NULL);
 
 	/* XXX I don't know why the RuleContext can't just store
@@ -1621,12 +1615,16 @@
 	GtkActionGroup *action_group;
 	GtkUIManager *ui_manager;
 	EShellSwitcher *switcher;
+	GList *list;
+	const gchar *current_view;
+	gint current_value = 0;
 	guint n_children, ii;
 	guint merge_id;
 
 	g_return_if_fail (E_IS_SHELL_WINDOW (shell_window));
 
 	action_group = shell_window->priv->shell_view_actions;
+	current_view = e_shell_window_get_current_view (shell_window);
 	children = g_type_children (E_TYPE_SHELL_VIEW, &n_children);
 	switcher = E_SHELL_SWITCHER (shell_window->priv->switcher);
 	ui_manager = e_shell_window_get_ui_manager (shell_window);
@@ -1634,7 +1632,12 @@
 
 	/* Construct a group of radio actions from the various EShellView
 	 * subclasses and register them with our ESidebar.  These actions
-	 * are manifested as switcher buttons and View->Window menu items. */
+	 * 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. */
 
 	for (ii = 0; ii < n_children; ii++) {
 		EShellViewClass *class;
@@ -1664,6 +1667,10 @@
 		action_name = g_strdup_printf ("shell-view-%s", view_name);
 		tooltip = g_strdup_printf (_("Switch to %s"), class->label);
 
+		/* Does this action represent the current view? */
+		if (strcmp (view_name, current_view) == 0)
+			current_value = ii;
+
 		/* Note, we have to set "icon-name" separately because
 		 * gtk_radio_action_new() expects a "stock-id".  Sadly,
 		 * GTK+ still distinguishes between the two. */
@@ -1680,18 +1687,6 @@
 			G_OBJECT (action),
 			"view-name", (gpointer) view_name);
 
-		if (group == NULL) {
-
-			/* First view is the default. */
-			shell_window->priv->default_view = view_name;
-
-			/* Only listen to the first action. */
-			g_signal_connect (
-				action, "changed",
-				G_CALLBACK (action_shell_view_cb),
-				shell_window);
-		}
-
 		gtk_radio_action_set_group (action, group);
 		group = gtk_radio_action_get_group (action);
 
@@ -1719,6 +1714,26 @@
 		g_type_class_unref (class);
 	}
 
+	list = gtk_action_group_list_actions (action_group);
+	if (list != NULL) {
+		GObject *object = list->data;
+		const gchar *view_name;
+
+		/* First view is the default. */
+		view_name = g_object_get_data (object, "view-name");
+		shell_window->priv->default_view = view_name;
+
+		g_signal_connect (
+			object, "changed",
+			G_CALLBACK (action_shell_view_cb),
+			shell_window);
+
+		/* Sync up with the current shell view. */
+		gtk_radio_action_set_current_value (
+			GTK_RADIO_ACTION (object), current_value);
+	}
+	g_list_free (list);
+
 	g_free (children);
 }
 

Modified: branches/kill-bonobo/shell/e-shell-window-private.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-window-private.c	(original)
+++ branches/kill-bonobo/shell/e-shell-window-private.c	Mon Sep  8 20:37:00 2008
@@ -340,6 +340,10 @@
 	gconf_bridge_bind_window (
 		bridge, key, GTK_WINDOW (shell_window), TRUE, FALSE);
 
+	object = G_OBJECT (shell_window);
+	key = "/apps/evolution/shell/view_defaults/component_id";
+	gconf_bridge_bind_property (bridge, key, object, "current-view");
+
 	object = G_OBJECT (priv->content_pane);
 	key = "/apps/evolution/shell/view_defaults/folder_bar/width";
 	gconf_bridge_bind_property_delayed (bridge, key, object, "position");

Modified: branches/kill-bonobo/shell/e-shell-window.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-window.c	(original)
+++ branches/kill-bonobo/shell/e-shell-window.c	Mon Sep  8 20:37:00 2008
@@ -79,7 +79,7 @@
 
 	shell_view = g_object_new (
 		shell_view_type, "page-num", page_num,
-		"title", title, "window", shell_window, NULL);
+		"title", title, "shell-window", shell_window, NULL);
 
 	name = e_shell_view_get_name (shell_view);
 	loaded_views = shell_window->priv->loaded_views;
@@ -88,15 +88,15 @@
 	/* Add pages to the various shell window notebooks. */
 
 	notebook = GTK_NOTEBOOK (shell_window->priv->content_notebook);
-	widget = e_shell_view_get_content_widget (shell_view);
+	widget = GTK_WIDGET (e_shell_view_get_content (shell_view));
 	gtk_notebook_append_page (notebook, widget, NULL);
 
 	notebook = GTK_NOTEBOOK (shell_window->priv->sidebar_notebook);
-	widget = e_shell_view_get_sidebar_widget (shell_view);
+	widget = GTK_WIDGET (e_shell_view_get_sidebar (shell_view));
 	gtk_notebook_append_page (notebook, widget, NULL);
 
 	notebook = GTK_NOTEBOOK (shell_window->priv->status_notebook);
-	widget = e_shell_view_get_taskbar_widget (shell_view);
+	widget = GTK_WIDGET (e_shell_view_get_taskbar (shell_view));
 	gtk_notebook_append_page (notebook, widget, NULL);
 
 	g_signal_connect_swapped (
@@ -242,8 +242,7 @@
 			NULL,
 			NULL,
 			NULL,
-			G_PARAM_READWRITE |
-			G_PARAM_CONSTRUCT));
+			G_PARAM_READWRITE));
 
 	g_object_class_install_property (
 		object_class,

Modified: branches/kill-bonobo/shell/main.c
==============================================================================
--- branches/kill-bonobo/shell/main.c	(original)
+++ branches/kill-bonobo/shell/main.c	Mon Sep  8 20:37:00 2008
@@ -34,7 +34,6 @@
 #include "e-util/e-bconf-map.h"
 
 #include <e-util/e-icon-factory.h>
-#include "e-shell-constants.h"
 #include "e-shell-registry.h"
 #include "e-util/e-profile-event.h"
 #include "e-util/e-util.h"
@@ -99,7 +98,7 @@
 static gboolean idle_cb (gchar **uris);
 
 static EShell *global_shell;
-static char *default_component_id = NULL;
+static char *requested_view = NULL;
 static char *evolution_debug_log = NULL;
 static gchar **remaining_args;
 
@@ -281,21 +280,35 @@
 static gboolean
 idle_cb (gchar **uris)
 {
+	GtkWidget *shell_window;
+	const gchar *initial_view;
+
 	g_return_val_if_fail (uris == NULL || g_strv_length (uris) > 0, FALSE);
 
 #ifdef KILL_PROCESS_CMD
 	kill_old_dataserver ();
 #endif
 
-	if (uris != NULL)
+	if (uris != NULL) {
 		open_uris (uris);
-	else {
-		GtkWidget *shell_window;
+		return FALSE;
+	}
+
+	initial_view = e_shell_registry_get_canonical_name (requested_view);
 
-		shell_window = e_shell_create_window (global_shell);
-		/* XXX Switch to default_component_id. */
+	if (initial_view != NULL) {
+		GConfClient *client;
+		const gchar *key;
+
+		client = gconf_client_get_default ();
+		key = "/apps/evolution/shell/view_defaults/component_id";
+		requested_view = gconf_client_set_string (
+			client, key, initial_view, NULL);
+		g_object_unref (client);
 	}
 
+	shell_window = e_shell_create_window (global_shell);
+
 #if 0  /* MBARNES */
 	if (shell == NULL) {
 		/*there is another instance but because we don't open any windows
@@ -366,7 +379,7 @@
 #endif
 
 static const GOptionEntry options[] = {
-	{ "component", 'c', 0, G_OPTION_ARG_STRING, &default_component_id,
+	{ "component", 'c', 0, G_OPTION_ARG_STRING, &requested_view,
 	  N_("Start Evolution activating the specified component"), NULL },
 	{ "offline", '\0', 0, G_OPTION_ARG_NONE, &start_offline,
 	  N_("Start in offline mode"), NULL },

Modified: branches/kill-bonobo/shell/test/e-test-shell-view.c
==============================================================================
--- branches/kill-bonobo/shell/test/e-test-shell-view.c	(original)
+++ branches/kill-bonobo/shell/test/e-test-shell-view.c	Mon Sep  8 20:37:00 2008
@@ -43,14 +43,42 @@
 }
 
 static void
+test_shell_view_constructed (GObject *object)
+{
+	EShellContent *shell_content;
+	EShellSidebar *shell_sidebar;
+	EShellView *shell_view;
+	GtkWidget *widget;
+
+	/* Chain up to parent's constructed() method. */
+	G_OBJECT_CLASS (parent_class)->constructed (object);
+
+	shell_view = E_SHELL_VIEW (object);
+	shell_content = e_shell_view_get_content (shell_view);
+	shell_sidebar = e_shell_view_get_sidebar (shell_view);
+
+	widget = gtk_label_new ("Content Widget");
+	gtk_container_add (GTK_CONTAINER (shell_content), widget);
+	gtk_widget_show (widget);
+
+	widget = gtk_label_new ("Sidebar Widget");
+	gtk_container_add (GTK_CONTAINER (shell_sidebar), widget);
+	gtk_widget_show (widget);
+}
+
+static void
 test_shell_view_class_init (ETestShellViewClass *class,
                             GTypeModule *type_module)
 {
+	GObjectClass *object_class;
 	EShellViewClass *shell_view_class;
 
 	parent_class = g_type_class_peek_parent (class);
 	g_type_class_add_private (class, sizeof (ETestShellViewPrivate));
 
+	object_class = G_OBJECT_CLASS (class);
+	object_class->constructed = test_shell_view_constructed;
+
 	shell_view_class = E_SHELL_VIEW_CLASS (class);
 	shell_view_class->label = "Test";
 	shell_view_class->icon_name = "face-monkey";
@@ -61,24 +89,8 @@
 static void
 test_shell_view_init (ETestShellView *test_shell_view)
 {
-	EShellView *shell_view;
-	GtkWidget *container;
-	GtkWidget *widget;
-
 	test_shell_view->priv =
 		E_TEST_SHELL_VIEW_GET_PRIVATE (test_shell_view);
-
-	shell_view = E_SHELL_VIEW (test_shell_view);
-
-	container = e_shell_view_get_content_widget (shell_view);
-	widget = gtk_label_new ("Content Widget");
-	gtk_container_add (GTK_CONTAINER (container), widget);
-	gtk_widget_show (widget);
-
-	container = e_shell_view_get_sidebar_widget (shell_view);
-	widget = gtk_label_new ("Sidebar Widget");
-	gtk_container_add (GTK_CONTAINER (container), widget);
-	gtk_widget_show (widget);
 }
 
 GType

Modified: branches/kill-bonobo/widgets/misc/Makefile.am
==============================================================================
--- branches/kill-bonobo/widgets/misc/Makefile.am	(original)
+++ branches/kill-bonobo/widgets/misc/Makefile.am	Mon Sep  8 20:37:00 2008
@@ -37,7 +37,6 @@
 	$(pilot_headers)			\
 	e-account-combo-box.h			\
 	e-action-combo-box.h			\
-	e-activity-handler.h			\
 	e-attachment.h				\
 	e-attachment-bar.h			\
 	e-spinner.c				\
@@ -59,7 +58,6 @@
 	e-preferences-window.h			\
 	e-online-button.h			\
 	e-search-bar.h				\
-	e-task-bar.h				\
 	e-task-widget.h				\
 	e-send-options.h			\
 	e-url-entry.h				\
@@ -86,7 +84,6 @@
 	$(pilot_sources)			\
 	e-account-combo-box.c			\
 	e-action-combo-box.c			\
-	e-activity-handler.c			\
 	e-calendar.c				\
 	e-attachment.c				\
 	e-attachment-bar.c			\
@@ -106,7 +103,6 @@
 	e-preferences-window.c			\
 	e-online-button.c			\
 	e-search-bar.c				\
-	e-task-bar.c				\
 	e-task-widget.c				\
 	e-send-options.c			\
 	e-url-entry.c				\

Modified: branches/kill-bonobo/widgets/misc/e-task-widget.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-task-widget.c	(original)
+++ branches/kill-bonobo/widgets/misc/e-task-widget.c	Mon Sep  8 20:37:00 2008
@@ -33,8 +33,6 @@
 #define SPACING 2
 
 struct _ETaskWidgetPrivate {
-	char *component_id;
-
 	GtkWidget *label;
 	GtkWidget *box;
 	GtkWidget *image;
@@ -56,7 +54,6 @@
 	task_widget = E_TASK_WIDGET (object);
 	priv = task_widget->priv;
 
-	g_free (priv->component_id);
 	g_free (priv);
 
 	(* G_OBJECT_CLASS (e_task_widget_parent_class)->finalize) (object);
@@ -78,7 +75,6 @@
 
 	priv = g_new (ETaskWidgetPrivate, 1);
 
-	priv->component_id = NULL;
 	priv->label        = NULL;
 	priv->image        = NULL;
 	priv->box	   = NULL;
@@ -115,7 +111,6 @@
 
 void
 e_task_widget_construct (ETaskWidget *task_widget,
-			 const char *component_id,
 			 const char *information,
 			 void (*cancel_func) (gpointer data),
 			 gpointer data)
@@ -126,13 +121,10 @@
 
 	g_return_if_fail (task_widget != NULL);
 	g_return_if_fail (E_IS_TASK_WIDGET (task_widget));
-	g_return_if_fail (component_id != NULL);
 	g_return_if_fail (information != NULL);
 
 	priv = task_widget->priv;
 
-	priv->component_id = g_strdup (component_id);
-
 	frame = gtk_frame_new (NULL);
 	gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
 	gtk_container_add (GTK_CONTAINER (task_widget), frame);
@@ -183,8 +175,7 @@
 }
 
 GtkWidget *
-e_task_widget_new_with_cancel (const char *component_id,
-                               const char *information,
+e_task_widget_new_with_cancel (const char *information,
                                void (*cancel_func) (gpointer data),
                                gpointer data)
 {
@@ -193,21 +184,20 @@
 	g_return_val_if_fail (information != NULL, NULL);
 
 	task_widget = g_object_new (e_task_widget_get_type (), NULL);
-	e_task_widget_construct (task_widget, component_id, information, cancel_func, data);
+	e_task_widget_construct (task_widget, information, cancel_func, data);
 
 	return GTK_WIDGET (task_widget);
 }
 
 GtkWidget *
-e_task_widget_new (const char *component_id,
-		   const char *information)
+e_task_widget_new (const char *information)
 {
 	ETaskWidget *task_widget;
 
 	g_return_val_if_fail (information != NULL, NULL);
 
 	task_widget = g_object_new (e_task_widget_get_type (), NULL);
-	e_task_widget_construct (task_widget, component_id, information, NULL, NULL);
+	e_task_widget_construct (task_widget, information, NULL, NULL);
 
 	return GTK_WIDGET (task_widget);
 }
@@ -281,14 +271,3 @@
 	g_return_if_fail (task_widget != NULL);
 	g_return_if_fail (E_IS_TASK_WIDGET (task_widget));
 }
-
-
-const char *
-e_task_widget_get_component_id  (ETaskWidget *task_widget)
-{
-	g_return_val_if_fail (task_widget != NULL, NULL);
-	g_return_val_if_fail (E_IS_TASK_WIDGET (task_widget), NULL);
-
-	return task_widget->priv->component_id;
-}
-

Modified: branches/kill-bonobo/widgets/misc/e-task-widget.h
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-task-widget.h	(original)
+++ branches/kill-bonobo/widgets/misc/e-task-widget.h	Mon Sep  8 20:37:00 2008
@@ -55,14 +55,11 @@
 
 GType		e_task_widget_get_type		(void);
 void		e_task_widget_construct		(ETaskWidget *task_widget,
-						 const char *component_id,
 						 const char *information,
 						 void (*cancel_func) (gpointer data),
 						 gpointer data);
-GtkWidget *	e_task_widget_new		(const char *component_id,
-						 const char *information);
-GtkWidget *	e_task_widget_new_with_cancel	(const char *component_id,
-						 const char *information,
+GtkWidget *	e_task_widget_new		(const char *information);
+GtkWidget *	e_task_widget_new_with_cancel	(const char *information,
 						 void (*cancel_func) (gpointer data),
 						 gpointer data);
 void		e_task_widget_update		(ETaskWidget *task_widget,
@@ -73,7 +70,6 @@
 						 const char *text);
 void		e_task_wiget_alert		(ETaskWidget *task_widget);
 void		e_task_wiget_unalert		(ETaskWidget *task_widget);
-const char *	e_task_widget_get_component_id	(ETaskWidget *task_widget);
 
 #ifdef __cplusplus
 }



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