evolution r35255 - in branches/mbarnes-composer: . addressbook addressbook/gui/component addressbook/gui/contact-editor addressbook/gui/contact-list-editor addressbook/gui/widgets calendar calendar/gui composer e-util help help/C help/C/figures help/cs help/es help/es/figures help/fr help/fr/figures help/oc help/sv mail mail/default mail/default/ko mail/importers plugins/bogo-junk-plugin plugins/exchange-operations plugins/face plugins/groupwise-features plugins/mono plugins/plugin-manager plugins/sa-junk-plugin plugins/tnef-attachments po shell smime smime/lib widgets/misc



Author: mbarnes
Date: Wed Mar 26 19:54:10 2008
New Revision: 35255
URL: http://svn.gnome.org/viewvc/evolution?rev=35255&view=rev

Log:
Merge revisions 35089:35254 from trunk.


Added:
   branches/mbarnes-composer/help/C/figures/evo_label_a.png
      - copied unchanged from r35254, /trunk/help/C/figures/evo_label_a.png
   branches/mbarnes-composer/help/cs/
      - copied from r35254, /trunk/help/cs/
   branches/mbarnes-composer/help/es/figures/
      - copied from r35254, /trunk/help/es/figures/
   branches/mbarnes-composer/help/fr/figures/evo_crash_recovery.png
      - copied unchanged from r35254, /trunk/help/fr/figures/evo_crash_recovery.png
   branches/mbarnes-composer/help/fr/figures/evo_debuglogs_a.png
      - copied unchanged from r35254, /trunk/help/fr/figures/evo_debuglogs_a.png
   branches/mbarnes-composer/help/fr/figures/evo_labels_a.png
      - copied unchanged from r35254, /trunk/help/fr/figures/evo_labels_a.png
   branches/mbarnes-composer/help/fr/figures/evo_message_filters_a.png
      - copied unchanged from r35254, /trunk/help/fr/figures/evo_message_filters_a.png
   branches/mbarnes-composer/help/fr/figures/evo_newmail.png
      - copied unchanged from r35254, /trunk/help/fr/figures/evo_newmail.png
   branches/mbarnes-composer/help/fr/figures/evo_select_add_folder.png
      - copied unchanged from r35254, /trunk/help/fr/figures/evo_select_add_folder.png
   branches/mbarnes-composer/help/fr/figures/evo_select_folder.png
      - copied unchanged from r35254, /trunk/help/fr/figures/evo_select_folder.png
   branches/mbarnes-composer/help/fr/figures/google_cal_view.png
      - copied unchanged from r35254, /trunk/help/fr/figures/google_cal_view.png
   branches/mbarnes-composer/mail/default/ko/   (props changed)
      - copied from r35254, /trunk/mail/default/ko/
   branches/mbarnes-composer/mail/em-network-prefs.c
      - copied unchanged from r35254, /trunk/mail/em-network-prefs.c
   branches/mbarnes-composer/mail/em-network-prefs.h
      - copied unchanged from r35254, /trunk/mail/em-network-prefs.h
   branches/mbarnes-composer/po/be latin po
      - copied unchanged from r35254, /trunk/po/be latin po
Modified:
   branches/mbarnes-composer/ChangeLog
   branches/mbarnes-composer/NEWS
   branches/mbarnes-composer/addressbook/ChangeLog
   branches/mbarnes-composer/addressbook/gui/component/addressbook-component.c
   branches/mbarnes-composer/addressbook/gui/component/addressbook-migrate.c
   branches/mbarnes-composer/addressbook/gui/contact-editor/e-contact-quick-add.c
   branches/mbarnes-composer/addressbook/gui/contact-editor/e-contact-quick-add.h
   branches/mbarnes-composer/addressbook/gui/contact-list-editor/e-contact-list-editor.c
   branches/mbarnes-composer/addressbook/gui/widgets/eab-popup-control.c
   branches/mbarnes-composer/addressbook/gui/widgets/eab-popup-control.h
   branches/mbarnes-composer/calendar/ChangeLog
   branches/mbarnes-composer/calendar/gui/cal-search-bar.c
   branches/mbarnes-composer/calendar/gui/calendar-component.c
   branches/mbarnes-composer/calendar/gui/e-calendar-view.c
   branches/mbarnes-composer/calendar/gui/e-calendar-view.h
   branches/mbarnes-composer/calendar/gui/e-day-view-main-item.c
   branches/mbarnes-composer/calendar/gui/e-day-view-time-item.c
   branches/mbarnes-composer/calendar/gui/e-day-view-top-item.c
   branches/mbarnes-composer/calendar/gui/e-day-view.c
   branches/mbarnes-composer/calendar/gui/e-memos.c
   branches/mbarnes-composer/calendar/gui/e-week-view-event-item.c
   branches/mbarnes-composer/calendar/gui/e-week-view-main-item.c
   branches/mbarnes-composer/calendar/gui/gnome-cal.c
   branches/mbarnes-composer/calendar/gui/memos-component.c
   branches/mbarnes-composer/calendar/gui/migration.c
   branches/mbarnes-composer/calendar/gui/tasks-component.c
   branches/mbarnes-composer/composer/ChangeLog
   branches/mbarnes-composer/configure.in
   branches/mbarnes-composer/e-util/ChangeLog
   branches/mbarnes-composer/e-util/e-mktemp.c
   branches/mbarnes-composer/e-util/e-plugin.c
   branches/mbarnes-composer/e-util/e-plugin.h
   branches/mbarnes-composer/e-util/e-profile-event.c
   branches/mbarnes-composer/e-util/e-util.c
   branches/mbarnes-composer/e-util/e-util.h
   branches/mbarnes-composer/evolution-zip.in
   branches/mbarnes-composer/help/C/evolution.xml
   branches/mbarnes-composer/help/ChangeLog
   branches/mbarnes-composer/help/Makefile.am
   branches/mbarnes-composer/help/es/es.po
   branches/mbarnes-composer/help/fr/figures/evo_attachreminder_plugin.png
   branches/mbarnes-composer/help/fr/figures/mailer_preferences.png
   branches/mbarnes-composer/help/fr/fr.po
   branches/mbarnes-composer/help/oc/oc.po
   branches/mbarnes-composer/help/sv/sv.po
   branches/mbarnes-composer/mail/ChangeLog
   branches/mbarnes-composer/mail/GNOME_Evolution_Mail.server.in.in
   branches/mbarnes-composer/mail/Makefile.am
   branches/mbarnes-composer/mail/default/Makefile.am
   branches/mbarnes-composer/mail/em-folder-browser.c
   branches/mbarnes-composer/mail/em-folder-tree-model.c
   branches/mbarnes-composer/mail/em-folder-tree.c
   branches/mbarnes-composer/mail/em-folder-view.c
   branches/mbarnes-composer/mail/em-folder-view.h
   branches/mbarnes-composer/mail/em-format-html.c
   branches/mbarnes-composer/mail/em-format.c
   branches/mbarnes-composer/mail/em-icon-stream.c
   branches/mbarnes-composer/mail/em-message-browser.c
   branches/mbarnes-composer/mail/em-message-browser.h
   branches/mbarnes-composer/mail/em-migrate.c
   branches/mbarnes-composer/mail/em-popup.c
   branches/mbarnes-composer/mail/em-utils.c
   branches/mbarnes-composer/mail/em-utils.h
   branches/mbarnes-composer/mail/evolution-mail.schemas.in
   branches/mbarnes-composer/mail/importers/mail-importer.c
   branches/mbarnes-composer/mail/mail-autofilter.c
   branches/mbarnes-composer/mail/mail-component-factory.c
   branches/mbarnes-composer/mail/mail-component.c
   branches/mbarnes-composer/mail/mail-config-factory.c
   branches/mbarnes-composer/mail/mail-config.c
   branches/mbarnes-composer/mail/mail-config.glade
   branches/mbarnes-composer/mail/mail-folder-cache.c
   branches/mbarnes-composer/mail/mail-ops.c
   branches/mbarnes-composer/mail/mail-session.c
   branches/mbarnes-composer/mail/mail-tools.c
   branches/mbarnes-composer/mail/mail-vfolder.c
   branches/mbarnes-composer/plugins/bogo-junk-plugin/ChangeLog
   branches/mbarnes-composer/plugins/bogo-junk-plugin/org-gnome-bogo-junk-plugin.eplug.xml
   branches/mbarnes-composer/plugins/exchange-operations/ChangeLog
   branches/mbarnes-composer/plugins/exchange-operations/exchange-folder-subscription.c
   branches/mbarnes-composer/plugins/exchange-operations/exchange-send-options.c
   branches/mbarnes-composer/plugins/face/ChangeLog
   branches/mbarnes-composer/plugins/face/face.c
   branches/mbarnes-composer/plugins/groupwise-features/ChangeLog
   branches/mbarnes-composer/plugins/groupwise-features/proxy.c
   branches/mbarnes-composer/plugins/groupwise-features/share-folder.c
   branches/mbarnes-composer/plugins/mono/ChangeLog
   branches/mbarnes-composer/plugins/mono/mono-plugin.c
   branches/mbarnes-composer/plugins/mono/org-gnome-evolution-mono.eplug.xml
   branches/mbarnes-composer/plugins/plugin-manager/ChangeLog
   branches/mbarnes-composer/plugins/plugin-manager/org-gnome-plugin-manager.eplug.xml
   branches/mbarnes-composer/plugins/plugin-manager/plugin-manager.c
   branches/mbarnes-composer/plugins/sa-junk-plugin/ChangeLog
   branches/mbarnes-composer/plugins/sa-junk-plugin/em-junk-filter.c
   branches/mbarnes-composer/plugins/sa-junk-plugin/org-gnome-sa-junk-plugin.eplug.xml
   branches/mbarnes-composer/plugins/tnef-attachments/ChangeLog
   branches/mbarnes-composer/plugins/tnef-attachments/Makefile.am
   branches/mbarnes-composer/plugins/tnef-attachments/tnef-plugin.c
   branches/mbarnes-composer/po/ChangeLog
   branches/mbarnes-composer/po/LINGUAS
   branches/mbarnes-composer/po/bg.po
   branches/mbarnes-composer/po/bn_IN.po
   branches/mbarnes-composer/po/cs.po
   branches/mbarnes-composer/po/da.po
   branches/mbarnes-composer/po/de.po
   branches/mbarnes-composer/po/el.po
   branches/mbarnes-composer/po/en_GB.po
   branches/mbarnes-composer/po/es.po
   branches/mbarnes-composer/po/et.po
   branches/mbarnes-composer/po/eu.po
   branches/mbarnes-composer/po/fr.po
   branches/mbarnes-composer/po/gu.po
   branches/mbarnes-composer/po/hi.po
   branches/mbarnes-composer/po/hu.po
   branches/mbarnes-composer/po/it.po
   branches/mbarnes-composer/po/ja.po
   branches/mbarnes-composer/po/ko.po
   branches/mbarnes-composer/po/lt.po
   branches/mbarnes-composer/po/mr.po
   branches/mbarnes-composer/po/nl.po
   branches/mbarnes-composer/po/nn.po
   branches/mbarnes-composer/po/oc.po
   branches/mbarnes-composer/po/pa.po
   branches/mbarnes-composer/po/pt_BR.po
   branches/mbarnes-composer/po/ru.po
   branches/mbarnes-composer/po/sv.po
   branches/mbarnes-composer/po/te.po
   branches/mbarnes-composer/po/uk.po
   branches/mbarnes-composer/po/zh_CN.po
   branches/mbarnes-composer/po/zh_HK.po
   branches/mbarnes-composer/po/zh_TW.po
   branches/mbarnes-composer/shell/ChangeLog
   branches/mbarnes-composer/shell/apps_evolution_shell.schemas.in
   branches/mbarnes-composer/shell/e-shell-window-commands.c
   branches/mbarnes-composer/shell/main.c
   branches/mbarnes-composer/smime/ChangeLog
   branches/mbarnes-composer/smime/lib/e-cert-db.c
   branches/mbarnes-composer/widgets/misc/ChangeLog
   branches/mbarnes-composer/widgets/misc/e-attachment.c
   branches/mbarnes-composer/widgets/misc/e-calendar-item.c
   branches/mbarnes-composer/widgets/misc/e-search-bar.c

Modified: branches/mbarnes-composer/NEWS
==============================================================================
--- branches/mbarnes-composer/NEWS	(original)
+++ branches/mbarnes-composer/NEWS	Wed Mar 26 19:54:10 2008
@@ -1,3 +1,99 @@
+Evolution 2.21.93 2008-03-10
+----------------------------
+
+Bug Fixes:
+	#282466: (Novell Bugzilla) Handle CIDs of broken cases too (Srinivasa Ragavan)
+	#351672: Dragging imap message when another is copying locks X (Matthew Barnes)
+	#520745: Fix format-string vulnerability (Tor Lillqvist/Srinivasa Ragavan)
+
+Other Contributors:
+	Changes for Windows. Misc simplification and cleanup. (Tor Lillqvist)
+	Updated contributors list (Johnny Jacob)
+
+Updated Translations:
+	Luca Ferretti (it)
+	Ivar Smolin (et)
+	Ankit Patel (gu)
+	StÃphane Raimbault (fr)
+	Gabor Kelemen (hu)
+	Ãsmund SkjÃveland (nn)
+	Hendrik Richter (de)
+	Takeshi AIHANA (ja)
+	Tino Meinen (nl)
+	Sandeep Shedmake (mr)
+	Ihar Hrachyshka, AleÅNavicki (be latin)
+	Changwoo Ryu (ko)
+	Chao-Hsiung Liao (zh_HK,zh_TW)
+	Maxim Dziumanenko (uk)
+	Kenneth Nielsen (da)
+	Kostas Papadimas (el)
+	Guntupalli Karunakar (hi)
+	Runa Bhattacharjee (bn_IN)
+	Gintautas Miliauskas (lt)
+	Petr Kovar (cs)
+	Vasiliy Faronov (ru)
+
+Evolution 2.21.92 2008-02-25
+----------------------------
+
+Bug Fixes:
+	#153807: (Novell Bugzilla) Patch from OpenSUSE (Srinivasa Ragavan)
+	#159736: (Novell Bugzilla) Fix a crash when dbus daemon restarts (Jeffrey Stedfast)
+	#167638: Quit evolution quickly (Jeffrey Stedfast)
+	#173186: (Novell Bugzilla) Fix a crash while quitting (Jeffrey Stedfast)
+	#178778: (Novell Bugzilla) Fix a crash when creating an appointment (Michael Meeks)
+	#209353: Allow paste text on mouse middle button click (Milan Crha)
+	#209353: Pass Home/End keys to cell when editing (Milan Crha)
+	#294999: (Novell Bugzilla) Fix subscribing to other user's exchange folder (Srinivasa Ragavan)
+	#339266: Do not show folder size in offline mode (Sushma Rai)
+	#358697: (Novell Bugzilla) Make sure the default search filter for sent/draft/outbox is "Recipients Contain" (Srinivasa Ragavan)
+	#383438: Report "mouse over" even with no text entered (Milan Crha)
+	#440426: Unset also default_client if removing it (Milan Crha)
+	#469292: Add empty line only when top posting is enabled (Srinivasa Ragavan)
+	#471779: Sort timezone entries alphabetically (Suman)
+	#512776: Fix a startup issue (Milan Crha)
+	#516408: Free memory returned my libical (Chenthill)
+	#514836: Fix importing contact lists into a attendee lists for a meeting (Milan Crha)
+	#514987: New sorting by Status based on the index in popup, not on the text (Milan Crha)
+	#515659: "Highlight quotations with" checkbox doesn't do anything (Paul Bolle)
+	#515744: Memory leak fix (Milan Crha)
+	#516234: Removed a stray printf() statement (Aidan Delaney)
+	#516279: Don't allow newlines in the password dialog title.  Use a fixed string instead (Matthew Barnes)
+	#516349: Do not force black text in quotation part of the message (Milan Crha)
+	#516453: Change Not Started status back to Canceled when Canceled requested (Milan Crha)
+	#516648: Use "pkill -x" to kill processes on Solaris (Jeff Cai)
+	#516648: Use $HOME instead of "~" (Jeff Cai)
+	#517072: Properly escape text (Paul Bolle)
+	#517082: Fix small leak (Paul Bolle)
+	#517129: Fix build break of pl translation (Akhil Laddha)
+	#517458: Handle broken UIDs (Srinivasa Ragavan)
+
+Updated Translations:
+	Reinout van Schouwen (nl)
+	Arangel Angov (mk)
+	Changwoo Ryu (ko)
+	Daniel Nylander (sv)
+	Jorge Gonzalez (es)
+	Ignacio Casal Quinteiro (gl)
+	Nguyán ThÃi Ngác Duy (vi)
+	Wadim Dziedzic (pl)
+	Kjartan Maraas (nb)
+	Djihed Afifi (ar)
+	David Lodge (en_GB)
+	Inaki Larranaga Murgoitio (eu)
+	Baris Cicek (tr)
+	David Planella (ca)
+	Pawan Chitrakar (ne)
+	Duarte Loreto (pt)
+	Andre Klapper (de)
+	Yannig Marchegay (oc)
+	Theppitak Karoonboonyanan (th)
+	Ilkka Tuohela (fi)
+	Abou Manal (ar)
+	Ivar Smolin (et)
+	Luca Ferretti (it)
+	Takeshi AIHANA (ja)
+
 Evolution 2.21.91 2008-02-11
 ----------------------------
 

Modified: branches/mbarnes-composer/addressbook/gui/component/addressbook-component.c
==============================================================================
--- branches/mbarnes-composer/addressbook/gui/component/addressbook-component.c	(original)
+++ branches/mbarnes-composer/addressbook/gui/component/addressbook-component.c	Wed Mar 26 19:54:10 2008
@@ -76,6 +76,7 @@
 	ESourceGroup *on_ldap_servers;
 	ESource *personal_source;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 
 	on_this_computer = NULL;
 	on_ldap_servers = NULL;
@@ -86,9 +87,8 @@
 		return;
 	}
 
-	base_uri = g_build_filename (addressbook_component_peek_base_directory (component),
-				     "addressbook", "local",
-				     NULL);
+	base_dir = addressbook_component_peek_base_directory (component);
+	base_uri = g_build_filename (base_dir, "local", NULL);
 
 	base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
 
@@ -486,7 +486,7 @@
 	/* EPFIXME: Should use a custom one instead? */
 	priv->gconf_client = gconf_client_get_default ();
 
-	priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
+	priv->base_directory = g_build_filename (e_get_user_data_dir (), "addressbook", NULL);
 
 	component->priv = priv;
 

Modified: branches/mbarnes-composer/addressbook/gui/component/addressbook-migrate.c
==============================================================================
--- branches/mbarnes-composer/addressbook/gui/component/addressbook-migrate.c	(original)
+++ branches/mbarnes-composer/addressbook/gui/component/addressbook-migrate.c	Wed Mar 26 19:54:10 2008
@@ -449,14 +449,14 @@
 	GSList *groups;
 	ESourceGroup *group;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 
 	*on_this_computer = NULL;
 	*on_ldap_servers = NULL;
 	*personal_source = NULL;
 
-	base_uri = g_build_filename (addressbook_component_peek_base_directory (context->component),
-				     "addressbook", "local",
-				     NULL);
+	base_dir = addressbook_component_peek_base_directory (context->component);
+	base_uri = g_build_filename (base_dir, "local", NULL);
 
 	base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
 
@@ -1171,7 +1171,7 @@
 
 			old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Contacts", NULL);
 			new_path = g_build_filename (addressbook_component_peek_base_directory (component),
-						     "addressbook", "local", "system", NULL);
+						     "local", "system", NULL);
 			migrate_pilot_data (old_path, new_path);
 			g_free (new_path);
 			g_free (old_path);

Modified: branches/mbarnes-composer/addressbook/gui/contact-editor/e-contact-quick-add.c
==============================================================================
--- branches/mbarnes-composer/addressbook/gui/contact-editor/e-contact-quick-add.c	(original)
+++ branches/mbarnes-composer/addressbook/gui/contact-editor/e-contact-quick-add.c	Wed Mar 26 19:54:10 2008
@@ -49,6 +49,7 @@
 struct _QuickAdd {
 	gchar *name;
 	gchar *email;
+	gchar *vcard;
 	EContact *contact;
 	EBook *book;
 
@@ -92,6 +93,7 @@
 		if (qa->refs == 0) {
 			g_free (qa->name);
 			g_free (qa->email);
+			g_free (qa->vcard);
 			g_object_unref (qa->contact);
 			g_free (qa);
 		}
@@ -119,6 +121,16 @@
 }
 
 static void
+quick_add_set_vcard (QuickAdd *qa, const gchar *vcard)
+{
+	if (vcard == qa->vcard)
+		return;
+
+	g_free (qa->vcard);
+	qa->vcard = g_strdup (vcard);
+}
+
+static void
 merge_cb (EBook *book, EBookStatus status, gpointer closure)
 {
 	QuickAdd *qa = (QuickAdd *) closure;
@@ -232,7 +244,7 @@
 	QuickAdd *qa = (QuickAdd *) closure;
 
 	/* Get data out of entries. */
-	if (button == GTK_RESPONSE_OK || button == QUICK_ADD_RESPONSE_EDIT_FULL) {
+	if (!qa->vcard && (button == GTK_RESPONSE_OK || button == QUICK_ADD_RESPONSE_EDIT_FULL)) {
 		gchar *name = NULL;
 		gchar *email = NULL;
 
@@ -341,11 +353,16 @@
 	if (qa->name)
 		gtk_entry_set_text (GTK_ENTRY (qa->name_entry), qa->name);
 
-
 	qa->email_entry = gtk_entry_new ();
 	if (qa->email)
 		gtk_entry_set_text (GTK_ENTRY (qa->email_entry), qa->email);
 
+	if (qa->vcard) {
+		/* when adding vCard, then do not allow change name or email */
+		gtk_widget_set_sensitive (qa->name_entry, FALSE);
+		gtk_widget_set_sensitive (qa->email_entry, FALSE);
+	}
+
 	gconf_client = gconf_client_get_default ();
 	source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/addressbook/sources");
 	g_object_unref (gconf_client);
@@ -555,3 +572,58 @@
 	g_free (name);
 	g_free (email);
 }
+
+void
+e_contact_quick_add_vcard (const gchar *vcard, EContactQuickAddCallback cb, gpointer closure)
+{
+	QuickAdd *qa;
+	GtkWidget *dialog;
+	EContact *contact;
+
+	/* We need to have *something* to work with. */
+	if (vcard == NULL) {
+		if (cb)
+			cb (NULL, closure);
+		return;
+	}
+
+	qa = quick_add_new ();
+	qa->cb = cb;
+	qa->closure = closure;
+	quick_add_set_vcard (qa, vcard);
+
+	contact = e_contact_new_from_vcard (qa->vcard);
+
+	if (contact) {
+		GList *emails;
+		char *name;
+		EContactName *contact_name;
+
+		g_object_unref (qa->contact);
+		qa->contact = contact;
+
+		contact_name = e_contact_get (qa->contact, E_CONTACT_NAME);
+		name = e_contact_name_to_string (contact_name);
+		quick_add_set_name (qa, name);
+		g_free (name);
+		e_contact_name_free (contact_name);
+
+		emails = e_contact_get (qa->contact, E_CONTACT_EMAIL);
+		if (emails) {
+			quick_add_set_email (qa, emails->data);
+
+			g_list_foreach (emails, (GFunc)g_free, NULL);
+			g_list_free (emails);
+		}
+	} else {
+		if (cb)
+			cb (NULL, closure);
+
+		quick_add_unref (qa);
+		g_warning ("Contact's vCard parsing failed!");
+		return;
+	}
+
+	dialog = build_quick_add_dialog (qa);
+	gtk_widget_show_all (dialog);
+}

Modified: branches/mbarnes-composer/addressbook/gui/contact-editor/e-contact-quick-add.h
==============================================================================
--- branches/mbarnes-composer/addressbook/gui/contact-editor/e-contact-quick-add.h	(original)
+++ branches/mbarnes-composer/addressbook/gui/contact-editor/e-contact-quick-add.h	Wed Mar 26 19:54:10 2008
@@ -36,5 +36,7 @@
 
 void e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, gpointer closure);
 
+void e_contact_quick_add_vcard (const gchar *vcard, EContactQuickAddCallback cb, gpointer closure);
+
 #endif /* __E_CONTACT_QUICK_ADD_H__ */
 

Modified: branches/mbarnes-composer/addressbook/gui/contact-list-editor/e-contact-list-editor.c
==============================================================================
--- branches/mbarnes-composer/addressbook/gui/contact-list-editor/e-contact-list-editor.c	(original)
+++ branches/mbarnes-composer/addressbook/gui/contact-list-editor/e-contact-list-editor.c	Wed Mar 26 19:54:10 2008
@@ -895,7 +895,7 @@
 
 	e_name_selector_model_add_section (
 		e_name_selector_peek_model (name_selector),
-		"Members", "Members", NULL);
+		"Members", _("_Members"), NULL);
 
 	name_selector_entry = e_name_selector_peek_section_entry (
 		name_selector, "Members");

Modified: branches/mbarnes-composer/addressbook/gui/widgets/eab-popup-control.c
==============================================================================
--- branches/mbarnes-composer/addressbook/gui/widgets/eab-popup-control.c	(original)
+++ branches/mbarnes-composer/addressbook/gui/widgets/eab-popup-control.c	Wed Mar 26 19:54:10 2008
@@ -57,6 +57,7 @@
 
 static void eab_popup_control_set_name (EABPopupControl *pop, const gchar *name);
 static void eab_popup_control_set_email (EABPopupControl *pop, const gchar *email);
+static void eab_popup_control_set_vcard (EABPopupControl *pop, const gchar *vcard);
 
 static GtkObjectClass *parent_class;
 
@@ -110,6 +111,9 @@
 
 	g_free (pop->email);
 	pop->email = NULL;
+
+	g_free (pop->vcard);
+	pop->vcard = NULL;
 }
 
 static void
@@ -253,6 +257,26 @@
 	eab_popup_control_schedule_refresh (pop);
 }
 
+static void
+eab_popup_control_set_vcard (EABPopupControl *pop, const gchar *vcard)
+{
+	g_return_if_fail (pop && EAB_IS_POPUP_CONTROL (pop));
+
+	/* We only allow the vcard to be set once. */
+	if (pop->vcard)
+		return;
+
+	g_free (pop->name);
+	g_free (pop->email);
+
+	pop->name = NULL;
+	pop->email = NULL;
+
+	pop->vcard = g_strdup (vcard);
+
+	eab_popup_control_schedule_refresh (pop);
+}
+
 void
 eab_popup_control_construct (EABPopupControl *pop)
 {
@@ -332,7 +356,9 @@
 static void
 eab_popup_control_no_matches (EABPopupControl *pop)
 {
-	if (pop->email && *pop->email) {
+	if (pop->vcard && *pop->vcard)
+		e_contact_quick_add_vcard (pop->vcard, NULL, NULL);
+	else if (pop->email && *pop->email) {
 		if (pop->name && *pop->name)
 			e_contact_quick_add (pop->name, pop->email, NULL, NULL);
 		else
@@ -361,7 +387,8 @@
 enum {
 	PROPERTY_NAME,
 	PROPERTY_EMAIL,
-	PROPERTY_TRANSITORY
+	PROPERTY_TRANSITORY,
+	PROPERTY_VCARD
 };
 
 static void
@@ -379,6 +406,10 @@
 		eab_popup_control_set_email (pop, BONOBO_ARG_GET_STRING (arg));
 		break;
 
+	case PROPERTY_VCARD:
+		eab_popup_control_set_vcard (pop, BONOBO_ARG_GET_STRING (arg));
+		break;
+
 	default:
 		g_return_if_reached ();
 	}
@@ -403,6 +434,10 @@
 		BONOBO_ARG_SET_BOOLEAN (arg, pop->transitory);
 		break;
 
+	case PROPERTY_VCARD:
+		BONOBO_ARG_SET_STRING (arg, pop->vcard);
+		break;
+
 	default:
 		g_return_if_reached ();
 	}
@@ -435,7 +470,11 @@
 				 BONOBO_ARG_BOOLEAN, NULL, NULL,
 				 BONOBO_PROPERTY_READABLE);
 
-        bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (bag)), NULL);
+	bonobo_property_bag_add (bag, "vcard", PROPERTY_VCARD,
+                                 BONOBO_ARG_STRING, NULL, NULL,
+                                 BONOBO_PROPERTY_WRITEABLE | BONOBO_PROPERTY_READABLE);
+
+	bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (bag)), NULL);
         bonobo_object_unref (BONOBO_OBJECT (bag));
 
 	addy->es = bonobo_event_source_new ();

Modified: branches/mbarnes-composer/addressbook/gui/widgets/eab-popup-control.h
==============================================================================
--- branches/mbarnes-composer/addressbook/gui/widgets/eab-popup-control.h	(original)
+++ branches/mbarnes-composer/addressbook/gui/widgets/eab-popup-control.h	Wed Mar 26 19:54:10 2008
@@ -50,6 +50,7 @@
 
 	gchar *name;
 	gchar *email;
+	gchar *vcard;
 
 	GtkWidget *name_widget;
 	GtkWidget *email_widget;

Modified: branches/mbarnes-composer/calendar/gui/cal-search-bar.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/cal-search-bar.c	(original)
+++ branches/mbarnes-composer/calendar/gui/cal-search-bar.c	Wed Mar 26 19:54:10 2008
@@ -37,6 +37,9 @@
 #include <filter/rule-editor.h>
 
 #include "cal-search-bar.h"
+#include "calendar-component.h"
+#include "memos-component.h"
+#include "tasks-component.h"
 
 #include "e-util/e-util.h"
 #include "e-util/e-error.h"
@@ -736,6 +739,7 @@
 	FilterPart *part;
 	RuleContext *search_context;
 	FilterRule  *search_rule;
+	const gchar *base_dir;
 
 	g_return_val_if_fail (IS_CAL_SEARCH_BAR (cal_search), NULL);
 
@@ -760,16 +764,18 @@
 			rule_context_add_rule, rule_context_next_rule);
 
 	if (flags == CAL_SEARCH_MEMOS_DEFAULT) {
-		userfile = g_build_filename (g_get_home_dir (), ".evolution", "memos", "searches.xml", NULL);
+		base_dir = memos_component_peek_base_directory (memos_component_peek ());
 		xmlfile = g_build_filename (SEARCH_RULE_DIR, "memotypes.xml", NULL);
 	} else if (flags == CAL_SEARCH_TASKS_DEFAULT) {
-		userfile = g_build_filename (g_get_home_dir (), ".evolution", "tasks", "searches.xml", NULL);
+		base_dir = tasks_component_peek_base_directory (tasks_component_peek ());
 		xmlfile = g_build_filename (SEARCH_RULE_DIR, "tasktypes.xml", NULL);
 	} else {
-		userfile = g_build_filename (g_get_home_dir (), ".evolution", "calendar", "searches.xml", NULL);
+		base_dir = calendar_component_peek_base_directory (calendar_component_peek ());
 		xmlfile = g_build_filename (SEARCH_RULE_DIR, "caltypes.xml", NULL);
 	}
 
+	userfile = g_build_filename (base_dir, "searches.xml", NULL);
+
 	g_object_set_data_full (G_OBJECT (search_context), "user", userfile, g_free);
 	g_object_set_data_full (G_OBJECT (search_context), "system", xmlfile, g_free);
 

Modified: branches/mbarnes-composer/calendar/gui/calendar-component.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/calendar-component.c	(original)
+++ branches/mbarnes-composer/calendar/gui/calendar-component.c	Wed Mar 26 19:54:10 2008
@@ -161,6 +161,7 @@
 	ESource *personal_source;
 	ESource *birthdays_source;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 	gchar *create_source;
 
 	on_this_computer = NULL;
@@ -175,9 +176,8 @@
 		return;
 	}
 
-	base_uri = g_build_filename (calendar_component_peek_base_directory (component),
-				     "calendar", "local",
-				     NULL);
+	base_dir = calendar_component_peek_base_directory (component);
+	base_uri = g_build_filename (base_dir, "local", NULL);
 
 	base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
 
@@ -1726,10 +1726,8 @@
 
 	priv = g_new0 (CalendarComponentPrivate, 1);
 
-	priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
-	priv->config_directory = g_build_filename (g_get_home_dir (),
-						   ".evolution", "calendar", "config",
-						   NULL);
+	priv->base_directory = g_build_filename (e_get_user_data_dir (), "calendar", NULL);
+	priv->config_directory = g_build_filename (priv->base_directory, "config", NULL);
 
 	/* EPFIXME: Should use a custom one instead?  Also we should add
 	 * calendar_component_peek_gconf_client().  */

Modified: branches/mbarnes-composer/calendar/gui/e-calendar-view.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/e-calendar-view.c	(original)
+++ branches/mbarnes-composer/calendar/gui/e-calendar-view.c	Wed Mar 26 19:54:10 2008
@@ -2349,7 +2349,6 @@
 	return summary;
 }
 
-#ifdef ENABLE_CAIRO
 void
 draw_curved_rectangle (cairo_t *cr, double x0, double y0,
 			double rect_width, double rect_height,
@@ -2399,4 +2398,3 @@
 	}
 	cairo_close_path (cr);
 }
-#endif

Modified: branches/mbarnes-composer/calendar/gui/e-calendar-view.h
==============================================================================
--- branches/mbarnes-composer/calendar/gui/e-calendar-view.h	(original)
+++ branches/mbarnes-composer/calendar/gui/e-calendar-view.h	Wed Mar 26 19:54:10 2008
@@ -172,14 +172,12 @@
 
 const gchar *e_calendar_view_get_icalcomponent_summary (ECal *ecal, icalcomponent *icalcomp, gboolean *free_text);
 
-#ifdef ENABLE_CAIRO
 void           draw_curved_rectangle (cairo_t *cr,
                                       double x0,
                                       double y0,
                                       double rect_width,
                                       double rect_height,
                                       double radius);
-#endif
 
 G_END_DECLS
 

Modified: branches/mbarnes-composer/calendar/gui/e-day-view-main-item.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/e-day-view-main-item.c	(original)
+++ branches/mbarnes-composer/calendar/gui/e-day-view-main-item.c	Wed Mar 26 19:54:10 2008
@@ -154,677 +154,6 @@
 /*
  * DRAWING ROUTINES - functions to paint the canvas item.
  */
-#ifndef ENABLE_CAIRO
-static void
-e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
-			   int x, int y, int width, int height)
-{
-	EDayViewMainItem *dvmitem;
-	EDayView *day_view;
-	GtkStyle *style;
-	GdkGC *gc;
-	gint row, row_y, grid_x1, grid_x2;
-	gint day, grid_y1, grid_y2;
-	gint work_day_start_y, work_day_end_y;
-	gint day_x, day_w, work_day;
-	gint start_row, end_row, rect_x, rect_y, rect_width, rect_height;
-	struct icaltimetype day_start_tt;
-	gint weekday;
-
-#if 0
-	g_print ("In e_day_view_main_item_draw %i,%i %ix%i\n",
-		 x, y, width, height);
-#endif
-	dvmitem = E_DAY_VIEW_MAIN_ITEM (canvas_item);
-	day_view = dvmitem->day_view;
-	g_return_if_fail (day_view != NULL);
-
-	style = gtk_widget_get_style (GTK_WIDGET (day_view));
-
-	/* Paint the background colors. */
-	gc = day_view->main_gc;
-	work_day_start_y = e_day_view_convert_time_to_position (day_view, day_view->work_day_start_hour, day_view->work_day_start_minute) - y;
-	work_day_end_y = e_day_view_convert_time_to_position (day_view, day_view->work_day_end_hour, day_view->work_day_end_minute) - y;
-
-	for (day = 0; day < day_view->days_shown; day++) {
-		day_start_tt = icaltime_from_timet_with_zone (day_view->day_starts[day], FALSE,
-							      e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-		weekday = icaltime_day_of_week (day_start_tt) - 1;
-
-		work_day = day_view->working_days & (1 << weekday);
-
-		day_x = day_view->day_offsets[day] - x;
-		day_w = day_view->day_widths[day];
-
-		if (work_day) {
-			gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING]);
-			gdk_draw_rectangle (drawable, gc, TRUE,
-					    day_x, 0 - y,
-					    day_w, work_day_start_y - (0 - y));
-			gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING]);
-			gdk_draw_rectangle (drawable, gc, TRUE,
-					    day_x, work_day_start_y,
-					    day_w, work_day_end_y - work_day_start_y);
-			gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING]);
-			gdk_draw_rectangle (drawable, gc, TRUE,
-					    day_x, work_day_end_y,
-					    day_w, height - work_day_end_y);
-		} else {
-			gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING]);
-			gdk_draw_rectangle (drawable, gc, TRUE,
-					    day_x, 0,
-					    day_w, height);
-		}
-	}
-
-	/* Paint the selection background. */
-	if (day_view->selection_start_day != -1
-	    && !day_view->selection_in_top_canvas) {
-		for (day = day_view->selection_start_day;
-		     day <= day_view->selection_end_day;
-		     day++) {
-			if (day == day_view->selection_start_day
-			    && day_view->selection_start_row != -1)
-				start_row = day_view->selection_start_row;
-			else
-				start_row = 0;
-			if (day == day_view->selection_end_day
-			    && day_view->selection_end_row != -1)
-				end_row = day_view->selection_end_row;
-			else
-				end_row = day_view->rows - 1;
-
-			rect_x = day_view->day_offsets[day] - x;
-			rect_width = day_view->day_widths[day];
-			rect_y = start_row * day_view->row_height - y;
-			rect_height = (end_row - start_row + 1) * day_view->row_height;
-
-			if (GTK_WIDGET_HAS_FOCUS(day_view))
-				gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED]);
-			else
-				gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED]);
-			gdk_draw_rectangle (drawable, gc, TRUE,
-					    rect_x, rect_y,
-					    rect_width, rect_height);
-		}
-	}
-
-	/* Drawing the horizontal grid lines. */
-	grid_x1 = day_view->day_offsets[0] - x;
-	grid_x2 = day_view->day_offsets[day_view->days_shown] - x;
-
-	gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_GRID]);
-	for (row = 0, row_y = 0 - y;
-	     row < day_view->rows && row_y < height;
-	     row++, row_y += day_view->row_height) {
-		if (row_y >= 0 && row_y < height)
-			gdk_draw_line (drawable, gc,
-				       grid_x1, row_y, grid_x2, row_y);
-	}
-
-	/* Draw the vertical bars down the left of each column. */
-	grid_y1 = 0;
-	grid_y2 = height;
-	for (day = 0; day < day_view->days_shown; day++) {
-		grid_x1 = day_view->day_offsets[day] - x;
-
-		/* Skip if it isn't visible. */
-		if (grid_x1 >= width || grid_x1 + E_DAY_VIEW_BAR_WIDTH <= 0)
-			continue;
-
-		gdk_draw_line (drawable, style->black_gc,
-			       grid_x1, grid_y1,
-			       grid_x1, grid_y2);
-		gdk_draw_line (drawable, style->black_gc,
-			       grid_x1 + E_DAY_VIEW_BAR_WIDTH - 1, grid_y1,
-			       grid_x1 + E_DAY_VIEW_BAR_WIDTH - 1, grid_y2);
-		gdk_draw_rectangle (drawable, style->white_gc, TRUE,
-			       grid_x1 + 1, grid_y1,
-			       E_DAY_VIEW_BAR_WIDTH - 2, grid_y2 - grid_y1);
-
-		/* Fill in the bars when the user is busy. */
-		e_day_view_main_item_draw_events_in_vbars (dvmitem, drawable,
-							   x, y,
-							   width, height,
-							   day);
-	}
-
-	/* Fill in the vertical bars corresponding to the busy times from the
-	   long events. */
-	e_day_view_main_item_draw_long_events_in_vbars (dvmitem, drawable,
-							x, y, width, height);
-
-	/* Draw the event borders and backgrounds, and the vertical bars
-	   down the left edges. */
-	for (day = 0; day < day_view->days_shown; day++) {
-		e_day_view_main_item_draw_day_events (dvmitem, drawable,
-						      x, y, width, height,
-						      day);
-	}
-
-
-	if (e_day_view_get_show_marcus_bains (day_view)) {
-		icaltimezone *zone;
-		struct icaltimetype time_now, day_start;
-		int marcus_bains_y;
-		GdkColor mb_color;
-
-		gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE]);
-
-		if (day_view->marcus_bains_day_view_color && gdk_color_parse (day_view->marcus_bains_day_view_color, &mb_color)) {
-			GdkColormap *colormap;
-
-			colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
-			if (gdk_colormap_alloc_color (colormap, &mb_color, TRUE, TRUE)) {
-				gdk_gc_set_foreground (gc, &mb_color);
-			}
-		}
-
-		zone = e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view));
-		time_now = icaltime_current_time_with_zone (zone);
-
-		for (day = 0; day < day_view->days_shown; day++) {
-			day_start = icaltime_from_timet_with_zone (day_view->day_starts[day], FALSE, zone);
-
-			if ((day_start.year  == time_now.year) &&
-			    (day_start.month == time_now.month) &&
-			    (day_start.day   == time_now.day)) {
-
-				grid_x1 = day_view->day_offsets[day] - x + E_DAY_VIEW_BAR_WIDTH;
-				grid_x2 = day_view->day_offsets[day + 1] - x - 1;
-				marcus_bains_y = (time_now.hour * 60 + time_now.minute) * day_view->row_height / day_view->mins_per_row - y;
-				gdk_draw_line (drawable, gc, grid_x1, marcus_bains_y, grid_x2, marcus_bains_y);
-			}
-		}
-	}
-
-
-}
-static void
-e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem,
-					   GdkDrawable *drawable,
-					   int x, int y,
-					   int width, int height,
-					   gint day)
-{
-	EDayView *day_view;
-	EDayViewEvent *event;
-	GdkGC *gc;
-	gint grid_x, event_num, bar_y, bar_h;
-	ECalComponentTransparency transparency;
-
-	day_view = dvmitem->day_view;
-
-	gc = day_view->main_gc;
-	gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
-
-	grid_x = day_view->day_offsets[day] + 1 - x;
-
-	/* Draw the busy times corresponding to the events in the day. */
-	for (event_num = 0; event_num < day_view->events[day]->len;
-	     event_num++) {
-		ECalComponent *comp;
-
-		event = &g_array_index (day_view->events[day], EDayViewEvent,
-					event_num);
-
-		comp = e_cal_component_new ();
-		e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
-		/* If the event is TRANSPARENT, skip it. */
-		e_cal_component_get_transparency (comp, &transparency);
-		if (transparency == E_CAL_COMPONENT_TRANSP_TRANSPARENT) {
-			g_object_unref (comp);
-			continue;
-		}
-
-		/* We can skip the events in the first column since they will
-		   draw over this anyway. */
-		if (event->num_columns > 0 && event->start_row_or_col == 0) {
-			g_object_unref (comp);
-			continue;
-		}
-
-		bar_y = event->start_minute * day_view->row_height / day_view->mins_per_row;
-		bar_h = event->end_minute * day_view->row_height / day_view->mins_per_row - bar_y;
-		bar_y -= y;
-
-		/* Skip it if it isn't visible. */
-		if (bar_y >= height || bar_y + bar_h <= 0) {
-			g_object_unref (comp);
-			continue;
-		}
-
-		gdk_draw_rectangle (drawable, gc, TRUE,
-				    grid_x, bar_y,
-				    E_DAY_VIEW_BAR_WIDTH - 2, bar_h);
-
-		g_object_unref (comp);
-	}
-}
-
-
-static void
-e_day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *dvmitem,
-						GdkDrawable *drawable,
-						int x, int y,
-						int width, int height)
-{
-	EDayView *day_view;
-	EDayViewEvent *event;
-	gint event_num, start_day, end_day, day, bar_y1, bar_y2, grid_x;
-	GdkGC *gc;
-	ECalComponentTransparency transparency;
-
-	day_view = dvmitem->day_view;
-
-	gc = day_view->main_gc;
-	gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
-
-	for (event_num = 0; event_num < day_view->long_events->len;
-	     event_num++) {
-		ECalComponent *comp;
-
-		event = &g_array_index (day_view->long_events, EDayViewEvent,
-					event_num);
-
-		comp = e_cal_component_new ();
-		e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
-		/* If the event is TRANSPARENT, skip it. */
-		e_cal_component_get_transparency (comp, &transparency);
-		if (transparency == E_CAL_COMPONENT_TRANSP_TRANSPARENT) {
-			g_object_unref (comp);
-			continue;
-		}
-
-		if (!e_day_view_find_long_event_days (event,
-						      day_view->days_shown,
-						      day_view->day_starts,
-						      &start_day, &end_day)) {
-			g_object_unref (comp);
-			continue;
-		}
-
-		for (day = start_day; day <= end_day; day++) {
-			grid_x = day_view->day_offsets[day] + 1 - x;
-
-			/* Skip if it isn't visible. */
-			if (grid_x >= width
-			    || grid_x + E_DAY_VIEW_BAR_WIDTH <= 0)
-				continue;
-
-			if (event->start <= day_view->day_starts[day]) {
-				bar_y1 = 0;
-			} else {
-				bar_y1 = event->start_minute * day_view->row_height / day_view->mins_per_row - y;
-			}
-
-			if (event->end >= day_view->day_starts[day + 1]) {
-				bar_y2 = height;
-			} else {
-				bar_y2 = event->end_minute * day_view->row_height / day_view->mins_per_row - y;
-			}
-
-			if (bar_y1 < height && bar_y2 > 0 && bar_y2 > bar_y1) {
-				gdk_draw_rectangle (drawable, gc, TRUE,
-						    grid_x, bar_y1,
-						    E_DAY_VIEW_BAR_WIDTH - 2,
-						    bar_y2 - bar_y1);
-			}
-		}
-
-
-		g_object_unref (comp);
-	}
-}
-
-
-static void
-e_day_view_main_item_draw_day_events (EDayViewMainItem *dvmitem,
-				      GdkDrawable *drawable,
-				      int x, int y, int width, int height,
-				      gint day)
-{
-	EDayView *day_view;
-	gint event_num;
-
-	day_view = dvmitem->day_view;
-
-	for (event_num = 0; event_num < day_view->events[day]->len;
-	     event_num++) {
-		e_day_view_main_item_draw_day_event (dvmitem, drawable,
-						     x, y, width, height,
-						     day, event_num);
-	}
-}
-
-
-static void
-e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
-				     GdkDrawable *drawable,
-				     int x, int y, int width, int height,
-				     gint day, gint event_num)
-{
-	EDayView *day_view;
-	EDayViewEvent *event;
-	gint item_x, item_y, item_w, item_h, bar_y1, bar_y2;
-	GdkGC *gc;
-	GdkColor bg_color;
-	ECalComponent *comp;
-	gint num_icons, icon_x, icon_y, icon_x_inc, icon_y_inc;
-	gint max_icon_w, max_icon_h;
-	gboolean draw_reminder_icon, draw_recurrence_icon, draw_timezone_icon, draw_meeting_icon;
-	gboolean draw_attach_icon;
-	GSList *categories_list, *elem;
-	ECalComponentTransparency transparency;
-
-	day_view = dvmitem->day_view;
-
-	/* If the event is currently being dragged, don't draw it. It will
-	   be drawn in the special drag items. */
-	if (day_view->drag_event_day == day
-	    && day_view->drag_event_num == event_num)
-		return;
-
-	gc = day_view->main_gc;
-
-	/* Get the position of the event. If it is not shown skip it.*/
-	if (!e_day_view_get_event_position (day_view, day, event_num,
-					    &item_x, &item_y,
-					    &item_w, &item_h))
-		return;
-
-	item_x -= x;
-	item_y -= y;
-
-	event = &g_array_index (day_view->events[day], EDayViewEvent,
-				event_num);
-
-	/* Fill in the event background. Note that for events in the first
-	   column of the day, we might not want to paint over the vertical bar,
-	   since that is used for multiple events. But then you can't see
-	   where the event in the first column finishes. */
-
-	gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND]);
-
-	if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), event->comp_data),
-			     &bg_color)) {
-		GdkColormap *colormap;
-
-		colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
-		if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE))
-			gdk_gc_set_foreground (gc, &bg_color);
-	}
-
-#if 1
-	if (event->start_row_or_col == 0)
-		gdk_draw_rectangle (drawable, gc, TRUE,
-				    item_x + E_DAY_VIEW_BAR_WIDTH, item_y + 1,
-				    MAX (item_w - E_DAY_VIEW_BAR_WIDTH - 1, 0),
-				    item_h - 2);
-	else
-#endif
-		gdk_draw_rectangle (drawable, gc, TRUE,
-				    item_x + 1, item_y + 1,
-				    MAX (item_w - 2, 0), item_h - 2);
-
-	gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
-
-	/* Draw the right edge of the vertical bar. */
-	gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER]);
-	gdk_draw_line (drawable, gc,
-		       item_x + E_DAY_VIEW_BAR_WIDTH - 1,
-		       item_y + 1,
-		       item_x + E_DAY_VIEW_BAR_WIDTH - 1,
-		       item_y + item_h - 2);
-
-	/* Draw the vertical colored bar showing when the appointment
-	   begins & ends. */
-	bar_y1 = event->start_minute * day_view->row_height / day_view->mins_per_row - y;
-	bar_y2 = event->end_minute * day_view->row_height / day_view->mins_per_row - y;
-
-	/* When an item is being resized, we fill the bar up to the new row. */
-	if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE
-	    && day_view->resize_event_day == day
-	    && day_view->resize_event_num == event_num) {
-		if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE)
-			bar_y1 = item_y + 1;
-		else if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_BOTTOM_EDGE)
-			bar_y2 = item_y + item_h - 1;
-	}
-
-	comp = e_cal_component_new ();
-	e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
-	/* Only fill it in if the event isn't TRANSPARENT. */
-	e_cal_component_get_transparency (comp, &transparency);
-	if (transparency != E_CAL_COMPONENT_TRANSP_TRANSPARENT) {
-		gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
-		gdk_draw_rectangle (drawable, gc, TRUE,
-				    item_x + 1, bar_y1,
-				    E_DAY_VIEW_BAR_WIDTH - 2, bar_y2 - bar_y1);
-	}
-
-	/* Draw the box around the entire event. Do this after drawing
-	   the colored bar so we don't have to worry about being 1
-	   pixel out. */
-	gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER]);
-	gdk_draw_rectangle (drawable, gc, FALSE,
-			    item_x, item_y, MAX (item_w - 1, 0), item_h - 1);
-	gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
-
-#if 0
-	/* Draw the horizontal bars above and beneath the event if it
-	   is currently being edited. */
-	if (day_view->editing_event_day == day
-	    && day_view->editing_event_num == event_num) {
-		gdk_draw_rectangle (drawable, gc, TRUE,
-				    item_x,
-				    item_y - E_DAY_VIEW_BAR_HEIGHT,
-				    item_w,
-				    E_DAY_VIEW_BAR_HEIGHT);
-		gdk_draw_rectangle (drawable, gc, TRUE,
-				    item_x, item_y + item_h,
-				    item_w, E_DAY_VIEW_BAR_HEIGHT);
-	}
-#endif
-
-	/* Draw the reminder & recurrence icons, if needed. */
-	num_icons = 0;
-	draw_reminder_icon = FALSE;
-	draw_recurrence_icon = FALSE;
-	draw_timezone_icon = FALSE;
-	draw_meeting_icon = FALSE;
-	draw_attach_icon = FALSE;
-	icon_x = item_x + E_DAY_VIEW_BAR_WIDTH + E_DAY_VIEW_ICON_X_PAD;
-	icon_y = item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT
-		+ E_DAY_VIEW_ICON_Y_PAD;
-
-	if (e_cal_component_has_alarms (comp)) {
-		draw_reminder_icon = TRUE;
-		num_icons++;
-	}
-
-	if (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp)) {
-		draw_recurrence_icon = TRUE;
-		num_icons++;
-	}
-	if (e_cal_component_has_attachments (comp)) {
-		draw_attach_icon = TRUE;
-		num_icons++;
-	}
-	/* If the DTSTART or DTEND are in a different timezone to our current
-	   timezone, we display the timezone icon. */
-	if (event->different_timezone) {
-		draw_timezone_icon = TRUE;
-		num_icons++;
-	}
-
-	if (e_cal_component_has_organizer (comp)) {
-		draw_meeting_icon = TRUE;
-		num_icons++;
-	}
-
-	num_icons += cal_comp_util_get_n_icons (comp);
-
-	e_cal_component_get_categories_list (comp, &categories_list);
-
-	if (num_icons != 0) {
-		if (item_h >= (E_DAY_VIEW_ICON_HEIGHT + E_DAY_VIEW_ICON_Y_PAD)
-		    * num_icons) {
-			icon_x_inc = 0;
-			icon_y_inc = E_DAY_VIEW_ICON_HEIGHT
-				+ E_DAY_VIEW_ICON_Y_PAD;
-		} else {
-			icon_x_inc = E_DAY_VIEW_ICON_WIDTH
-				+ E_DAY_VIEW_ICON_X_PAD;
-			icon_y_inc = 0;
-		}
-
-		if (draw_reminder_icon) {
-			max_icon_w = item_x + item_w - icon_x
-				- E_DAY_VIEW_EVENT_BORDER_WIDTH;
-			max_icon_h = item_y + item_h - icon_y
-				- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
-
-			gdk_gc_set_clip_mask (gc, NULL);
-			gdk_draw_pixbuf (drawable, gc,
-					 day_view->reminder_icon,
-					 0, 0, icon_x, icon_y,
-					 MIN (E_DAY_VIEW_ICON_WIDTH,
-					      max_icon_w),
-					 MIN (E_DAY_VIEW_ICON_HEIGHT,
-					      max_icon_h),
-					 GDK_RGB_DITHER_NORMAL,
-					 0, 0);
-			icon_x += icon_x_inc;
-			icon_y += icon_y_inc;
-		}
-
-		if (draw_recurrence_icon) {
-			max_icon_w = item_x + item_w - icon_x
-				- E_DAY_VIEW_EVENT_BORDER_WIDTH;
-			max_icon_h = item_y + item_h - icon_y
-				- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
-
-			gdk_gc_set_clip_mask (gc, NULL);
-			gdk_draw_pixbuf (drawable, gc,
-					 day_view->recurrence_icon,
-					 0, 0, icon_x, icon_y,
-					 MIN (E_DAY_VIEW_ICON_WIDTH,
-					      max_icon_w),
-					 MIN (E_DAY_VIEW_ICON_HEIGHT,
-					      max_icon_h),
-					 GDK_RGB_DITHER_NORMAL,
-					 0, 0);
-			icon_x += icon_x_inc;
-			icon_y += icon_y_inc;
-		}
-		if (draw_attach_icon) {
-			max_icon_w = item_x + item_w - icon_x
-				- E_DAY_VIEW_EVENT_BORDER_WIDTH;
-			max_icon_h = item_y + item_h - icon_y
-				- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
-
-			gdk_gc_set_clip_mask (gc, NULL);
-			gdk_draw_pixbuf (drawable, gc,
-					 day_view->attach_icon,
-					 0, 0, icon_x, icon_y,
-					 MIN (E_DAY_VIEW_ICON_WIDTH,
-					      max_icon_w),
-					 MIN (E_DAY_VIEW_ICON_HEIGHT,
-					      max_icon_h),
-					 GDK_RGB_DITHER_NORMAL,
-					 0, 0);
-			icon_x += icon_x_inc;
-			icon_y += icon_y_inc;
-		}
-		if (draw_timezone_icon) {
-			max_icon_w = item_x + item_w - icon_x
-				- E_DAY_VIEW_EVENT_BORDER_WIDTH;
-			max_icon_h = item_y + item_h - icon_y
-				- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
-
-			gdk_gc_set_clip_mask (gc, NULL);
-			gdk_draw_pixbuf (drawable, gc,
-					 day_view->timezone_icon,
-					 0, 0, icon_x, icon_y,
-					 MIN (E_DAY_VIEW_ICON_WIDTH,
-					      max_icon_w),
-					 MIN (E_DAY_VIEW_ICON_HEIGHT,
-					      max_icon_h),
-					 GDK_RGB_DITHER_NORMAL,
-					 0, 0);
-			icon_x += icon_x_inc;
-			icon_y += icon_y_inc;
-		}
-
-
-		if (draw_meeting_icon) {
-			max_icon_w = item_x + item_w - icon_x
-				- E_DAY_VIEW_EVENT_BORDER_WIDTH;
-			max_icon_h = item_y + item_h - icon_y
-				- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
-
-			gdk_gc_set_clip_mask (gc, NULL);
-			gdk_draw_pixbuf (drawable, gc,
-					 day_view->meeting_icon,
-					 0, 0, icon_x, icon_y,
-					 MIN (E_DAY_VIEW_ICON_WIDTH,
-					      max_icon_w),
-					 MIN (E_DAY_VIEW_ICON_HEIGHT,
-					      max_icon_h),
-					 GDK_RGB_DITHER_NORMAL,
-					 0, 0);
-			icon_x += icon_x_inc;
-			icon_y += icon_y_inc;
-		}
-
-		/* draw categories icons */
-		for (elem = categories_list; elem; elem = elem->next) {
-			char *category;
-			GdkPixmap *pixmap = NULL;
-			GdkBitmap *mask = NULL;
-
-			category = (char *) elem->data;
-			if (!e_categories_config_get_icon_for (category, &pixmap, &mask))
-				continue;
-
-			max_icon_w = item_x + item_w - icon_x
-				- E_DAY_VIEW_EVENT_BORDER_WIDTH;
-			max_icon_h = item_y + item_h - icon_y
-				- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
-
-			gdk_gc_set_clip_origin (gc, icon_x, icon_y);
-			if (mask != NULL)
-				gdk_gc_set_clip_mask (gc, mask);
-			gdk_draw_drawable (drawable, gc,
-					 pixmap,
-					 0, 0, icon_x, icon_y,
-					 MIN (E_DAY_VIEW_ICON_WIDTH,
-					      max_icon_w),
-					 MIN (E_DAY_VIEW_ICON_HEIGHT,
-					      max_icon_h));
-
-			g_object_unref (pixmap);
-			if (mask != NULL)
-				g_object_unref (mask);
-
-			icon_x += icon_x_inc;
-			icon_y += icon_y_inc;
-		}
-
-		gdk_gc_set_clip_mask (gc, NULL);
-	}
-
-	/* free memory */
-	e_cal_component_free_categories_list (categories_list);
-	g_object_unref (comp);
-}
-#endif
-
-#ifdef ENABLE_CAIRO
 static void
 e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
 			   int x, int y, int width, int height)
@@ -1963,7 +1292,6 @@
 	g_object_unref (comp);
 	cairo_destroy (cr);
 }
-#endif
 
 /* This is supposed to return the nearest item to the point and the distance.
    Since we are the only item we just return ourself and 0 for the distance.

Modified: branches/mbarnes-composer/calendar/gui/e-day-view-time-item.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/e-day-view-time-item.c	(original)
+++ branches/mbarnes-composer/calendar/gui/e-day-view-time-item.c	Wed Mar 26 19:54:10 2008
@@ -236,229 +236,6 @@
 /*
  * DRAWING ROUTINES - functions to paint the canvas item.
  */
-#ifndef ENABLE_CAIRO
-static void
-e_day_view_time_item_draw (GnomeCanvasItem *canvas_item,
-			   GdkDrawable	   *drawable,
-			   int		    x,
-			   int		    y,
-			   int		    width,
-			   int		    height)
-{
-	EDayView *day_view;
-	EDayViewTimeItem *dvtmitem;
-	GtkStyle *style;
-	GdkGC *gc, *fg_gc, *dark_gc;
-	gchar buffer[64], *suffix;
-	gint hour, display_hour, minute, row;
-	gint row_y, start_y, large_hour_y_offset, small_font_y_offset;
-	gint long_line_x1, long_line_x2, short_line_x1;
-	gint large_hour_x2, minute_x2;
-	gint hour_width, minute_width, suffix_width;
-	gint max_suffix_width, max_minute_or_suffix_width;
-	PangoLayout *layout;
-	PangoContext *context;
-	PangoFontDescription *small_font_desc;
-	PangoFontMetrics *large_font_metrics, *small_font_metrics;
-
-	dvtmitem = E_DAY_VIEW_TIME_ITEM (canvas_item);
-	day_view = dvtmitem->day_view;
-	g_return_if_fail (day_view != NULL);
-
-	style = gtk_widget_get_style (GTK_WIDGET (day_view));
-	small_font_desc = style->font_desc;
-
-	context = gtk_widget_get_pango_context (GTK_WIDGET (day_view));
-	large_font_metrics = pango_context_get_metrics (context, day_view->large_font_desc,
-							pango_context_get_language (context));
-	small_font_metrics = pango_context_get_metrics (context, small_font_desc,
-							pango_context_get_language (context));
-
-	gc = day_view->main_gc;
-	fg_gc = style->fg_gc[GTK_STATE_NORMAL];
-	dark_gc = style->dark_gc[GTK_STATE_NORMAL];
-
-	/* The start and end of the long horizontal line between hours. */
-	long_line_x1 = E_DVTMI_TIME_GRID_X_PAD - x;
-	long_line_x2 = dvtmitem->column_width - E_DVTMI_TIME_GRID_X_PAD - x;
-
-	if (day_view->mins_per_row == 60) {
-		/* The right edge of the complete time string in 60-min
-		   divisions, e.g. "14:00" or "2 pm". */
-		minute_x2 = long_line_x2 - E_DVTMI_60_MIN_X_PAD;
-
-		/* These aren't used for 60-minute divisions, but we initialize
-		   them to keep gcc happy. */
-		short_line_x1 = 0;
-		large_hour_x2 = 0;
-	} else {
-		max_suffix_width = MAX (day_view->am_string_width,
-					day_view->pm_string_width);
-
-		max_minute_or_suffix_width = MAX (max_suffix_width,
-						  day_view->max_minute_width);
-
-		/* The start of the short horizontal line between the periods
-		   within each hour. */
-		short_line_x1 = long_line_x2 - E_DVTMI_MIN_X_PAD * 2
-			- max_minute_or_suffix_width;
-
-		/* The right edge of the large hour string. */
-		large_hour_x2 = short_line_x1 - E_DVTMI_HOUR_R_PAD;
-
-		/* The right edge of the minute part of the time. */
-		minute_x2 = long_line_x2 - E_DVTMI_MIN_X_PAD;
-	}
-
-	/* Start with the first hour & minute shown in the EDayView. */
-	hour = day_view->first_hour_shown;
-	minute = day_view->first_minute_shown;
-
-	/* The offset of the large hour string from the top of the row. */
-	large_hour_y_offset = E_DVTMI_LARGE_HOUR_Y_PAD;
-
-	/* The offset of the small time/minute string from top of row. */
-	small_font_y_offset = E_DVTMI_SMALL_FONT_Y_PAD;
-
-	/* Calculate the minimum y position of the first row we need to draw.
-	   This is normally one row height above the 0 position, but if we
-	   are using the large font we may have to go back a bit further. */
-	start_y = 0 - MAX (day_view->row_height,
-			   (pango_font_metrics_get_ascent (large_font_metrics) +
-			    pango_font_metrics_get_descent (large_font_metrics)) / PANGO_SCALE +
-			   E_DVTMI_LARGE_HOUR_Y_PAD);
-
-	/* Draw the Marcus Bains Line first, so it appears under other elements. */
-	if (e_day_view_get_show_marcus_bains (day_view)) {
-		struct icaltimetype time_now;
-		int marcus_bains_y;
-		GdkColor mb_color;
-
-		gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE]);
-
-		if (day_view->marcus_bains_time_bar_color && gdk_color_parse (day_view->marcus_bains_time_bar_color, &mb_color)) {
-			GdkColormap *colormap;
-
-			colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
-			if (gdk_colormap_alloc_color (colormap, &mb_color, TRUE, TRUE)) {
-				gdk_gc_set_foreground (gc, &mb_color);
-			}
-		}
-
-		time_now = icaltime_current_time_with_zone (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-		marcus_bains_y = (time_now.hour * 60 + time_now.minute) * day_view->row_height / day_view->mins_per_row - y;
-		gdk_draw_line (drawable, gc,
-				long_line_x1, marcus_bains_y,
-				long_line_x2, marcus_bains_y);
-	}
-
-	/* Step through each row, drawing the times and the horizontal lines
-	   between them. */
-	for (row = 0, row_y = 0 - y;
-	     row < day_view->rows && row_y < height;
-	     row++, row_y += day_view->row_height) {
-
-		/* If the row is above the first row we want to draw just
-		   increment the time and skip to the next row. */
-		if (row_y < start_y) {
-			e_day_view_time_item_increment_time (&hour, &minute,
-							     day_view->mins_per_row);
-			continue;
-		}
-
-		/* Calculate the actual hour number to display. For 12-hour
-		   format we convert 0-23 to 12-11am/12-11pm. */
-		e_day_view_convert_time_to_display (day_view, hour,
-						    &display_hour,
-						    &suffix, &suffix_width);
-
-		if (day_view->mins_per_row == 60) {
-			/* 60 minute intervals - draw a long horizontal line
-			   between hours and display as one long string,
-			   e.g. "14:00" or "2 pm". */
-			gdk_draw_line (drawable, dark_gc,
-				       long_line_x1, row_y,
-				       long_line_x2, row_y);
-
-			if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
-				g_snprintf (buffer, sizeof (buffer), "%i:%02i",
-					    display_hour, minute);
-			} else {
-				g_snprintf (buffer, sizeof (buffer), "%i %s",
-					    display_hour, suffix);
-			}
-
-			layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
-			pango_layout_get_pixel_size (layout, &minute_width, NULL);
-			gdk_draw_layout (drawable, fg_gc,
-					 minute_x2 - minute_width,
-					 row_y + small_font_y_offset,
-					 layout);
-			g_object_unref (layout);
-		} else {
-			/* 5/10/15/30 minute intervals. */
-
-			if (minute == 0) {
-				/* On the hour - draw a long horizontal line
-				   before the hour and display the hour in the
-				   large font. */
-				gdk_draw_line (drawable, dark_gc,
-					       long_line_x1, row_y,
-					       long_line_x2, row_y);
-
-				g_snprintf (buffer, sizeof (buffer), "%i",
-					    display_hour);
-
-				layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
-				pango_layout_set_font_description (layout, day_view->large_font_desc);
-				pango_layout_get_pixel_size (layout, &hour_width, NULL);
-				gdk_draw_layout (drawable, fg_gc,
-						 large_hour_x2 - hour_width,
-						 row_y + large_hour_y_offset,
-						 layout);
-				g_object_unref (layout);
-			} else {
-				/* Within the hour - draw a short line before
-				   the time. */
-				gdk_draw_line (drawable, dark_gc,
-					       short_line_x1, row_y,
-					       long_line_x2, row_y);
-			}
-
-			/* Normally we display the minute in each
-			   interval, but when using 30-minute intervals
-			   we don't display the '30'. */
-			if (day_view->mins_per_row != 30 || minute != 30) {
-				/* In 12-hour format we display 'am' or 'pm'
-				   instead of '00'. */
-				if (minute == 0
-				    && !e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
-					strcpy (buffer, suffix);
-				} else {
-					g_snprintf (buffer, sizeof (buffer),
-						    "%02i", minute);
-				}
-
-				layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
-				pango_layout_get_pixel_size (layout, &minute_width, NULL);
-				gdk_draw_layout (drawable, fg_gc,
-						 minute_x2 - minute_width,
-						 row_y + small_font_y_offset,
-						 layout);
-				g_object_unref (layout);
-			}
-		}
-
-		e_day_view_time_item_increment_time (&hour, &minute,
-						     day_view->mins_per_row);
-	}
-
-	pango_font_metrics_unref (large_font_metrics);
-	pango_font_metrics_unref (small_font_metrics);
-}
-#endif
-
-#ifdef ENABLE_CAIRO
 static void
 e_day_view_time_item_draw (GnomeCanvasItem *canvas_item,
 			   GdkDrawable	   *drawable,
@@ -711,7 +488,6 @@
 	pango_font_metrics_unref (small_font_metrics);
 	cairo_destroy (cr);
 }
-#endif
 
 /* Increment the time by the 5/10/15/30/60 minute interval.
    Note that mins_per_row is never > 60, so we never have to

Modified: branches/mbarnes-composer/calendar/gui/e-day-view-top-item.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/e-day-view-top-item.c	(original)
+++ branches/mbarnes-composer/calendar/gui/e-day-view-top-item.c	Wed Mar 26 19:54:10 2008
@@ -156,527 +156,6 @@
 /*
  * DRAWING ROUTINES - functions to paint the canvas item.
  */
-#ifndef ENABLE_CAIRO
-static void
-e_day_view_top_item_draw (GnomeCanvasItem *canvas_item,
-			  GdkDrawable	  *drawable,
-			  int		   x,
-			  int		   y,
-			  int		   width,
-			  int		   height)
-{
-	EDayViewTopItem *dvtitem;
-	EDayView *day_view;
-	GtkStyle *style;
-	GdkGC *gc, *fg_gc, *bg_gc, *light_gc, *dark_gc;
-	gchar buffer[128];
-	GdkRectangle clip_rect;
-	gint canvas_width, canvas_height, left_edge, day, date_width, date_x;
-	gint item_height, event_num;
-	PangoLayout *layout;
-
-#if 0
-	g_print ("In e_day_view_top_item_draw %i,%i %ix%i\n",
-		 x, y, width, height);
-#endif
-	dvtitem = E_DAY_VIEW_TOP_ITEM (canvas_item);
-	day_view = dvtitem->day_view;
-	g_return_if_fail (day_view != NULL);
-
-	style = gtk_widget_get_style (GTK_WIDGET (day_view));
-	gc = day_view->main_gc;
-	fg_gc = style->fg_gc[GTK_STATE_NORMAL];
-	bg_gc = style->bg_gc[GTK_STATE_NORMAL];
-	light_gc = style->light_gc[GTK_STATE_NORMAL];
-	dark_gc = style->dark_gc[GTK_STATE_NORMAL];
-	canvas_width = GTK_WIDGET (canvas_item->canvas)->allocation.width;
-	canvas_height = (MAX (1, day_view->rows_in_top_display) + 2) * day_view->top_row_height;
-	left_edge = 0;
-	item_height = day_view->top_row_height - E_DAY_VIEW_TOP_CANVAS_Y_GAP;
-
-	/* Draw the shadow around the dates. */
-	gdk_draw_line (drawable, light_gc,
-		       left_edge - x, 1 - y,
-		       canvas_width - 2 - x, 1 - y);
-	gdk_draw_line (drawable, light_gc,
-		       left_edge - x, 2 - y,
-		       left_edge - x, item_height - 2 - y);
-	gdk_draw_line (drawable, dark_gc,
-		       left_edge - x, item_height - 1 - y,
-		       canvas_width - 1 - x, item_height - 1 - y);
-	gdk_draw_line (drawable, dark_gc,
-		       canvas_width - 1 - x, 1 - y,
-		       canvas_width - 1 - x, item_height - 1 - y);
-
-	/* Draw the background for the dates. */
-	gdk_draw_rectangle (drawable, bg_gc, TRUE,
-			    left_edge + 2 - x, 2 - y,
-			    canvas_width - left_edge - 3,
-			    item_height - 3);
-
-	/* Clear the main area background. */
-	gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS]);
-	gdk_draw_rectangle (drawable, gc, TRUE,
-			    left_edge - x, item_height - y,
-			    canvas_width - left_edge,
-			    canvas_height - item_height);
-
-	/* Draw the selection background. */
-	if (GTK_WIDGET_HAS_FOCUS (day_view)
-	    && day_view->selection_start_day != -1) {
-		gint start_col, end_col, rect_x, rect_y, rect_w, rect_h;
-
-		start_col = day_view->selection_start_day;
-		end_col = day_view->selection_end_day;
-
-		if (end_col > start_col
-		    || day_view->selection_start_row == -1
-		    || day_view->selection_end_row == -1) {
-			rect_x = day_view->day_offsets[start_col];
-			rect_y = item_height;
-			rect_w = day_view->day_offsets[end_col + 1] - rect_x;
-			rect_h = canvas_height - 1 - rect_y;
-
-			gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_SELECTED]);
-			gdk_draw_rectangle (drawable, gc, TRUE,
-					    rect_x - x, rect_y - y,
-					    rect_w, rect_h);
-		}
-	}
-
-	/* Draw the date. Set a clipping rectangle so we don't draw over the
-	   next day. */
-	for (day = 0; day < day_view->days_shown; day++) {
-		e_day_view_top_item_get_day_label (day_view, day,
-						   buffer, sizeof (buffer));
-		clip_rect.x = day_view->day_offsets[day] - x;
-		clip_rect.y = 2 - y;
-		clip_rect.width = day_view->day_widths[day];
-		clip_rect.height = item_height - 2;
-		gdk_gc_set_clip_rectangle (fg_gc, &clip_rect);
-
-		layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
-		pango_layout_get_pixel_size (layout, &date_width, NULL);
-		date_x = day_view->day_offsets[day] + (day_view->day_widths[day] - date_width) / 2;
-
-		gdk_draw_layout (drawable, fg_gc,
-				 date_x - x,
-				 3 - y,
-				 layout);
-		g_object_unref (layout);
-
-		gdk_gc_set_clip_rectangle (fg_gc, NULL);
-
-		/* Draw the lines down the left and right of the date cols. */
-		if (day != 0) {
-			gdk_draw_line (drawable, light_gc,
-				       day_view->day_offsets[day] - x,
-				       4 - y,
-				       day_view->day_offsets[day] - x,
-				       item_height - 4 - y);
-
-			gdk_draw_line (drawable, dark_gc,
-				       day_view->day_offsets[day] - 1 - x,
-				       4 - y,
-				       day_view->day_offsets[day] - 1 - x,
-				       item_height - 4 - y);
-		}
-
-		/* Draw the lines between each column. */
-		if (day != 0) {
-			gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_GRID]);
-			gdk_draw_line (drawable, gc,
-				       day_view->day_offsets[day] - x,
-				       item_height - y,
-				       day_view->day_offsets[day] - x,
-				       canvas_height - y);
-		}
-	}
-
-	/* Draw the long events. */
-	for (event_num = 0; event_num < day_view->long_events->len;
-	     event_num++) {
-		e_day_view_top_item_draw_long_event (dvtitem, event_num,
-						     drawable,
-						     x, y, width, height);
-	}
-}
-
-
-/* This draws one event in the top canvas. */
-static void
-e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
-				     gint	      event_num,
-				     GdkDrawable     *drawable,
-				     int	      x,
-				     int	      y,
-				     int	      width,
-				     int	      height)
-{
-	EDayView *day_view;
-	EDayViewEvent *event;
-	GtkStyle *style;
-	GdkGC *gc, *fg_gc;
-	gint start_day, end_day;
-	gint item_x, item_y, item_w, item_h;
-	gint text_x, icon_x, icon_y, icon_x_inc;
-	ECalComponent *comp;
-	gchar buffer[16];
-	gint hour, display_hour, minute, offset, time_width, time_x;
-	gint min_end_time_x, suffix_width, max_icon_x;
-	gchar *suffix;
-	gboolean draw_start_triangle, draw_end_triangle;
-	GdkRectangle clip_rect;
-	GSList *categories_list, *elem;
-	PangoLayout *layout;
-	GdkColor bg_color;
-
-	day_view = dvtitem->day_view;
-
-	/* If the event is currently being dragged, don't draw it. It will
-	   be drawn in the special drag items. */
-	if (day_view->drag_event_day == E_DAY_VIEW_LONG_EVENT
-	    && day_view->drag_event_num == event_num)
-		return;
-
-	if (!e_day_view_get_long_event_position (day_view, event_num,
-						 &start_day, &end_day,
-						 &item_x, &item_y,
-						 &item_w, &item_h))
-		return;
-
-	event = &g_array_index (day_view->long_events, EDayViewEvent,
-				event_num);
-
-	style = gtk_widget_get_style (GTK_WIDGET (day_view));
-	gc = day_view->main_gc;
-	fg_gc = style->fg_gc[GTK_STATE_NORMAL];
-	comp = e_cal_component_new ();
-	e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
-	/* Draw the lines across the top & bottom of the entire event. */
-	gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
-	gdk_draw_line (drawable, gc,
-		       item_x - x, item_y - y,
-		       item_x + item_w - 1 - x, item_y - y);
-	gdk_draw_line (drawable, gc,
-		       item_x - x, item_y + item_h - 1 - y,
-		       item_x + item_w - 1 - x, item_y + item_h - 1 - y);
-
-	/* Fill it in. */
-	if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
-								  event->comp_data),
-			     &bg_color)) {
-		GdkColormap *colormap;
-
-		colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
-		if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE))
-			gdk_gc_set_foreground (gc, &bg_color);
-		else
-			gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
-	} else
-		gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
-	gdk_draw_rectangle (drawable, gc, TRUE,
-			    item_x - x, item_y + 1 - y,
-			    item_w, item_h - 2);
-
-	/* When resizing we don't draw the triangles.*/
-	draw_start_triangle = TRUE;
-	draw_end_triangle = TRUE;
-	if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE
-	    && day_view->resize_event_day == E_DAY_VIEW_LONG_EVENT
-	    && day_view->resize_event_num == event_num) {
-		if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_LEFT_EDGE)
-			draw_start_triangle = FALSE;
-
-		if  (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_RIGHT_EDGE)
-			draw_end_triangle = FALSE;
-	}
-
-	/* If the event starts before the first day shown, draw a triangle,
-	   else just draw a vertical line down the left. */
-	if (draw_start_triangle
-	    && event->start < day_view->day_starts[start_day]) {
-		e_day_view_top_item_draw_triangle (dvtitem, drawable,
-						   item_x - x, item_y - y,
-						   -E_DAY_VIEW_BAR_WIDTH,
-						   item_h, event_num);
-	} else {
-		gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
-		gdk_draw_line (drawable, gc,
-			       item_x - x, item_y - y,
-			       item_x - x, item_y + item_h - 1 - y);
-	}
-
-	/* Similar for the event end. */
-	if (draw_end_triangle
-	    && event->end > day_view->day_starts[end_day + 1]) {
-		e_day_view_top_item_draw_triangle (dvtitem, drawable,
-						   item_x + item_w - 1 - x,
-						   item_y - y,
-						   E_DAY_VIEW_BAR_WIDTH,
-						   item_h, event_num);
-	} else {
-		gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
-		gdk_draw_line (drawable, gc,
-			       item_x + item_w - 1 - x,
-			       item_y - y,
-			       item_x + item_w - 1 - x,
-			       item_y + item_h - 1 - y);
-	}
-
-	/* If we are editing the event we don't show the icons or the start
-	   & end times. */
-	if (day_view->editing_event_day == E_DAY_VIEW_LONG_EVENT
-	    && day_view->editing_event_num == event_num) {
-		g_object_unref (comp);
-		return;
-	}
-
-	/* Determine the position of the label, so we know where to place the
-	   icons. Note that since the top canvas never scrolls we don't need
-	   to take the scroll offset into account. It will always be 0. */
-	text_x = event->canvas_item->x1;
-
-	/* Draw the start & end times, if necessary. */
-	min_end_time_x = item_x + E_DAY_VIEW_LONG_EVENT_X_PAD - x;
-
-	time_width = e_day_view_get_time_string_width (day_view);
-
-	if (event->start > day_view->day_starts[start_day]) {
-		offset = day_view->first_hour_shown * 60
-			+ day_view->first_minute_shown + event->start_minute;
-		hour = offset / 60;
-		minute = offset % 60;
-		/* Calculate the actual hour number to display. For 12-hour
-		   format we convert 0-23 to 12-11am/12-11pm. */
-		e_day_view_convert_time_to_display (day_view, hour,
-						    &display_hour,
-						    &suffix, &suffix_width);
-		if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
-			g_snprintf (buffer, sizeof (buffer), "%i:%02i",
-				    display_hour, minute);
-		} else {
-			g_snprintf (buffer, sizeof (buffer), "%i:%02i%s",
-				    display_hour, minute, suffix);
-		}
-
-		clip_rect.x = item_x - x;
-		clip_rect.y = item_y - y;
-		clip_rect.width = item_w - E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH;
-		clip_rect.height = item_h;
-		gdk_gc_set_clip_rectangle (fg_gc, &clip_rect);
-
-		time_x = item_x + E_DAY_VIEW_LONG_EVENT_X_PAD - x;
-		if (display_hour < 10)
-			time_x += day_view->digit_width;
-
-		layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
-		gdk_draw_layout (drawable, fg_gc,
-				 time_x,
-				 item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT +
-				 E_DAY_VIEW_LONG_EVENT_Y_PAD - y,
-				 layout);
-		g_object_unref (layout);
-
-		gdk_gc_set_clip_rectangle (fg_gc, NULL);
-
-		min_end_time_x += time_width
-			+ E_DAY_VIEW_LONG_EVENT_TIME_X_PAD;
-	}
-
-	max_icon_x = item_x + item_w - E_DAY_VIEW_LONG_EVENT_X_PAD
-		- E_DAY_VIEW_ICON_WIDTH;
-
-	if (event->end < day_view->day_starts[end_day + 1]) {
-		offset = day_view->first_hour_shown * 60
-			+ day_view->first_minute_shown
-			+ event->end_minute;
-		hour = offset / 60;
-		minute = offset % 60;
-		time_x = item_x + item_w - E_DAY_VIEW_LONG_EVENT_X_PAD - time_width - E_DAY_VIEW_LONG_EVENT_TIME_X_PAD - x;
-
-		if (time_x >= min_end_time_x) {
-			/* Calculate the actual hour number to display. */
-			e_day_view_convert_time_to_display (day_view, hour,
-							    &display_hour,
-							    &suffix,
-							    &suffix_width);
-			if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
-				g_snprintf (buffer, sizeof (buffer),
-					    "%i:%02i", display_hour, minute);
-			} else {
-				g_snprintf (buffer, sizeof (buffer),
-					    "%i:%02i%s", display_hour, minute,
-					    suffix);
-			}
-
-			if (display_hour < 10)
-				time_x += day_view->digit_width;
-
-			layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
-			gdk_draw_layout (drawable, fg_gc,
-					 time_x,
-					 item_y + E_DAY_VIEW_LONG_EVENT_Y_PAD + 1 - y,
-					 layout);
-			g_object_unref (layout);
-
-			max_icon_x -= time_width + E_DAY_VIEW_LONG_EVENT_TIME_X_PAD;
-		}
-	}
-
-	/* Draw the icons. */
-	icon_x_inc = E_DAY_VIEW_ICON_WIDTH + E_DAY_VIEW_ICON_X_PAD;
-	icon_x = text_x - E_DAY_VIEW_LONG_EVENT_ICON_R_PAD
-		- icon_x_inc - x;
-	icon_y = item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT
-		+ E_DAY_VIEW_ICON_Y_PAD - y;
-
-	if (icon_x <= max_icon_x && (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp))) {
-		gdk_gc_set_clip_mask (gc, NULL);
-		gdk_draw_pixbuf (drawable, gc,
-				 day_view->recurrence_icon,
-				 0, 0, icon_x, icon_y,
-				 E_DAY_VIEW_ICON_WIDTH,
-				 E_DAY_VIEW_ICON_HEIGHT,
-				 GDK_RGB_DITHER_NORMAL,
-				 0, 0);
-		icon_x -= icon_x_inc;
-	}
-
-	if (icon_x <= max_icon_x && e_cal_component_has_attachments (comp)) {
-		gdk_gc_set_clip_mask (gc, NULL);
-		gdk_draw_pixbuf (drawable, gc,
-				 day_view->attach_icon,
-				 0, 0, icon_x, icon_y,
-				 E_DAY_VIEW_ICON_WIDTH,
-				 E_DAY_VIEW_ICON_HEIGHT,
-				 GDK_RGB_DITHER_NORMAL,
-				 0, 0);
-		icon_x -= icon_x_inc;
-	}
-
-	if (icon_x <= max_icon_x && e_cal_component_has_alarms (comp)) {
-		gdk_gc_set_clip_mask (gc, NULL);
-		gdk_draw_pixbuf (drawable, gc,
-				 day_view->reminder_icon,
-				 0, 0, icon_x, icon_y,
-				 E_DAY_VIEW_ICON_WIDTH,
-				 E_DAY_VIEW_ICON_HEIGHT,
-				 GDK_RGB_DITHER_NORMAL,
-				 0, 0);
-		icon_x -= icon_x_inc;
-	}
-
-	if (icon_x <= max_icon_x && e_cal_component_has_organizer (comp)) {
-		gdk_gc_set_clip_mask (gc, NULL);
-		gdk_draw_pixbuf (drawable, gc,
-				 day_view->meeting_icon,
-				 0, 0, icon_x, icon_y,
-				 E_DAY_VIEW_ICON_WIDTH,
-				 E_DAY_VIEW_ICON_HEIGHT,
-				 GDK_RGB_DITHER_NORMAL,
-				 0, 0);
-		icon_x -= icon_x_inc;
-	}
-
-	/* draw categories icons */
-	e_cal_component_get_categories_list (comp, &categories_list);
-	for (elem = categories_list; elem; elem = elem->next) {
-		char *category;
-		GdkPixmap *pixmap = NULL;
-		GdkBitmap *mask = NULL;
-
-		category = (char *) elem->data;
-		e_categories_config_get_icon_for (category, &pixmap, &mask);
-		if (pixmap == NULL)
-			continue;
-
-		if (icon_x <= max_icon_x) {
-			gdk_gc_set_clip_origin (gc, icon_x, icon_y);
-			if (mask != NULL)
-				gdk_gc_set_clip_mask (gc, mask);
-			gdk_draw_drawable (drawable, gc,
-					 pixmap,
-					 0, 0, icon_x, icon_y,
-					 E_DAY_VIEW_ICON_WIDTH,
-					 E_DAY_VIEW_ICON_HEIGHT);
-			icon_x -= icon_x_inc;
-		}
-
-		g_object_unref (pixmap);
-		if (mask != NULL)
-			g_object_unref (mask);
-	}
-
-	e_cal_component_free_categories_list (categories_list);
-	g_object_unref (comp);
-
-	gdk_gc_set_clip_mask (gc, NULL);
-}
-
-
-/* This draws a little triangle to indicate that an event extends past
-   the days visible on screen. */
-static void
-e_day_view_top_item_draw_triangle (EDayViewTopItem *dvtitem,
-				   GdkDrawable	   *drawable,
-				   gint		    x,
-				   gint		    y,
-				   gint		    w,
-				   gint		    h,
-				   gint             event_num)
-{
-	EDayView *day_view;
-	EDayViewEvent *event;
-	GdkGC *gc;
-	GdkColor bg_color;
-	GdkPoint points[3];
-	gint c1, c2;
-
-	day_view = dvtitem->day_view;
-
-	gc = day_view->main_gc;
-
-	points[0].x = x;
-	points[0].y = y;
-	points[1].x = x + w;
-	points[1].y = y + (h / 2);
-	points[2].x = x;
-	points[2].y = y + h - 1;
-
-	/* If the height is odd we can use the same central point for both
-	   lines. If it is even we use different end-points. */
-	c1 = c2 = y + (h / 2);
-	if (h % 2 == 0)
-		c1--;
-
-	event = &g_array_index (day_view->long_events, EDayViewEvent,
-				event_num);
-
-	/* Fill it in. */
-	if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
-								  event->comp_data),
-			     &bg_color)) {
-		GdkColormap *colormap;
-
-		colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
-		if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE))
-			gdk_gc_set_foreground (gc, &bg_color);
-		else
-			gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
-	} else
-		gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
-
-	gdk_draw_polygon (drawable, gc, TRUE, points, 3);
-
-	gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
-	gdk_draw_line (drawable, gc, x, y, x + w, c1);
-	gdk_draw_line (drawable, gc, x, y + h - 1, x + w, c2);
-}
-#endif
-
-#ifdef ENABLE_CAIRO
 static void
 e_day_view_top_item_draw (GnomeCanvasItem *canvas_item,
 			  GdkDrawable	  *drawable,
@@ -1301,7 +780,6 @@
 
 	cairo_destroy (cr);
 }
-#endif
 
 /* This is supposed to return the nearest item the the point and the distance.
    Since we are the only item we just return ourself and 0 for the distance.

Modified: branches/mbarnes-composer/calendar/gui/e-day-view.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/e-day-view.c	(original)
+++ branches/mbarnes-composer/calendar/gui/e-day-view.c	Wed Mar 26 19:54:10 2008
@@ -673,13 +673,13 @@
 	e_day_view_update_query (day_view);
 }
 
-#ifndef ENABLE_CAIRO
 static void
 e_day_view_init (EDayView *day_view)
 {
 	gint day;
 	GnomeCanvasGroup *canvas_group;
 	ECalModel *model;
+	GtkWidget *w;
 
 	GTK_WIDGET_SET_FLAGS (day_view, GTK_CAN_FOCUS);
 
@@ -746,6 +746,7 @@
 
 	day_view->last_edited_comp_string = NULL;
 
+
 	day_view->selection_start_row = -1;
 	day_view->selection_start_day = -1;
 	day_view->selection_end_row = -1;
@@ -753,7 +754,8 @@
 	day_view->selection_is_being_dragged = FALSE;
 	day_view->selection_drag_pos = E_DAY_VIEW_DRAG_END;
 	day_view->selection_in_top_canvas = FALSE;
-
+	day_view->drag_event_day = -1;
+	day_view->drag_event_num = -1;
 	day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
 
 	day_view->pressed_event_day = -1;
@@ -779,10 +781,17 @@
 	/*
 	 * Top Canvas
 	 */
+	w = gtk_vbox_new (FALSE, 0);
+
+	day_view->top_dates_canvas = e_canvas_new ();
+	gtk_box_pack_start (GTK_BOX (w), day_view->top_dates_canvas, TRUE, TRUE, 0);
 	day_view->top_canvas = e_canvas_new ();
-	gtk_table_attach (GTK_TABLE (day_view), day_view->top_canvas,
+	gtk_box_pack_end (GTK_BOX (w), day_view->top_canvas, TRUE, TRUE, 0);
+
+	gtk_table_attach (GTK_TABLE (day_view), w,
 			  1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-	gtk_widget_show (day_view->top_canvas);
+	gtk_widget_show_all (w);
+
 	g_signal_connect_after (day_view->top_canvas, "button_press_event",
 				G_CALLBACK (e_day_view_on_top_canvas_button_press), day_view);
 	g_signal_connect (day_view->top_canvas, "button_release_event",
@@ -805,20 +814,24 @@
 	g_signal_connect (day_view->top_canvas, "drag_data_received",
 			  G_CALLBACK (e_day_view_on_top_canvas_drag_data_received), day_view);
 
-	canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->top_canvas)->root);
+	canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->top_dates_canvas)->root);
 
-	day_view->top_canvas_item =
+	day_view->top_dates_canvas_item =
 		gnome_canvas_item_new (canvas_group,
 				       e_day_view_top_item_get_type (),
 				       "EDayViewTopItem::day_view", day_view,
+				       "EDayViewTopItem::show_dates", TRUE,
 				       NULL);
+	gtk_widget_set_size_request (day_view->top_dates_canvas, -1, day_view->top_row_height);
 
-	day_view->resize_long_event_rect_item =
+	canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->top_canvas)->root);
+
+	day_view->top_canvas_item =
 		gnome_canvas_item_new (canvas_group,
-				       gnome_canvas_rect_get_type(),
-				       "width_pixels", 1,
+				       e_day_view_top_item_get_type (),
+				       "EDayViewTopItem::day_view", day_view,
+				       "EDayViewTopItem::show_dates", FALSE,
 				       NULL);
-	gnome_canvas_item_hide (day_view->resize_long_event_rect_item);
 
 	day_view->drag_long_event_rect_item =
 		gnome_canvas_item_new (canvas_group,
@@ -893,35 +906,6 @@
 				       "EDayViewMainItem::day_view", day_view,
 				       NULL);
 
-	day_view->resize_rect_item =
-		gnome_canvas_item_new (canvas_group,
-				       gnome_canvas_rect_get_type(),
-				       "width_pixels", 1,
-				       NULL);
-	gnome_canvas_item_hide (day_view->resize_rect_item);
-
-	day_view->resize_bar_item =
-		gnome_canvas_item_new (canvas_group,
-				       gnome_canvas_rect_get_type(),
-				       "width_pixels", 1,
-				       NULL);
-	gnome_canvas_item_hide (day_view->resize_bar_item);
-
-	day_view->main_canvas_top_resize_bar_item =
-		gnome_canvas_item_new (canvas_group,
-				       gnome_canvas_rect_get_type (),
-				       "width_pixels", 1,
-				       NULL);
-	gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item);
-
-	day_view->main_canvas_bottom_resize_bar_item =
-		gnome_canvas_item_new (canvas_group,
-				       gnome_canvas_rect_get_type (),
-				       "width_pixels", 1,
-				       NULL);
-	gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item);
-
-
 	day_view->drag_rect_item =
 		gnome_canvas_item_new (canvas_group,
 				       gnome_canvas_rect_get_type (),
@@ -1021,566 +1005,153 @@
 	g_signal_connect (G_OBJECT (day_view), "timezone_changed",
 			  G_CALLBACK (timezone_changed_cb), NULL);
 }
-#endif
 
-#ifdef ENABLE_CAIRO
+/* Turn off the background of the canvas windows. This reduces flicker
+   considerably when scrolling. (Why isn't it in GnomeCanvas?). */
 static void
-e_day_view_init (EDayView *day_view)
+e_day_view_on_canvas_realized (GtkWidget *widget,
+			       EDayView *day_view)
 {
-	gint day;
-	GnomeCanvasGroup *canvas_group;
-	ECalModel *model;
-	GtkWidget *w;
+	gdk_window_set_back_pixmap (GTK_LAYOUT (widget)->bin_window,
+				    NULL, FALSE);
+}
 
-	GTK_WIDGET_SET_FLAGS (day_view, GTK_CAN_FOCUS);
 
-	day_view->long_events = g_array_new (FALSE, FALSE,
-					     sizeof (EDayViewEvent));
-	day_view->long_events_sorted = TRUE;
-	day_view->long_events_need_layout = FALSE;
-	day_view->long_events_need_reshape = FALSE;
+/**
+ * e_day_view_new:
+ * @Returns: a new #EDayView.
+ *
+ * Creates a new #EDayView.
+ **/
+GtkWidget *
+e_day_view_new (void)
+{
+	GObject *day_view;
 
-	day_view->layout_timeout_id = 0;
+	day_view = g_object_new (e_day_view_get_type (), NULL);
+	e_cal_model_set_flags (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES);
 
-	for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++) {
-		day_view->events[day] = g_array_new (FALSE, FALSE,
-						     sizeof (EDayViewEvent));
-		day_view->events_sorted[day] = TRUE;
-		day_view->need_layout[day] = FALSE;
-		day_view->need_reshape[day] = FALSE;
-	}
+	return GTK_WIDGET (day_view);
+}
 
-	/* These indicate that the times haven't been set. */
-	day_view->lower = 0;
-	day_view->upper = 0;
+static void
+e_day_view_destroy (GtkObject *object)
+{
+	EDayView *day_view;
+	gint day;
 
-	day_view->work_week_view = FALSE;
-	day_view->days_shown = 1;
+	day_view = E_DAY_VIEW (object);
 
-	day_view->mins_per_row = 30;
-	day_view->date_format = E_DAY_VIEW_DATE_FULL;
-	day_view->rows_in_top_display = 0;
+	e_day_view_cancel_layout (day_view);
 
-	/* Note that these don't work yet. It would need a few fixes to the
-	   way event->start_minute and event->end_minute are used, and there
-	   may be problems with events that go outside the visible times. */
-	day_view->first_hour_shown = 0;
-	day_view->first_minute_shown = 0;
-	day_view->last_hour_shown = 24;
-	day_view->last_minute_shown = 0;
+	e_day_view_stop_auto_scroll (day_view);
 
-	day_view->main_gc = NULL;
-	e_day_view_recalc_num_rows (day_view);
+	if (day_view->large_font_desc) {
+		pango_font_description_free (day_view->large_font_desc);
+		day_view->large_font_desc = NULL;
+	}
 
-	day_view->working_days = E_DAY_VIEW_MONDAY | E_DAY_VIEW_TUESDAY
-		| E_DAY_VIEW_WEDNESDAY | E_DAY_VIEW_THURSDAY
-		| E_DAY_VIEW_FRIDAY;
+	if (day_view->small_font_desc) {
+		pango_font_description_free (day_view->small_font_desc);
+		day_view->small_font_desc = NULL;
+	}
 
-	day_view->work_day_start_hour = 9;
-	day_view->work_day_start_minute = 0;
-	day_view->work_day_end_hour = 17;
-	day_view->work_day_end_minute = 0;
-	day_view->show_event_end_times = TRUE;
-	day_view->week_start_day = 0;
-	day_view->scroll_to_work_day = TRUE;
+	if (day_view->normal_cursor) {
+		gdk_cursor_unref (day_view->normal_cursor);
+		day_view->normal_cursor = NULL;
+	}
+	if (day_view->move_cursor) {
+		gdk_cursor_unref (day_view->move_cursor);
+		day_view->move_cursor = NULL;
+	}
+	if (day_view->resize_width_cursor) {
+		gdk_cursor_unref (day_view->resize_width_cursor);
+		day_view->resize_width_cursor = NULL;
+	}
+	if (day_view->resize_height_cursor) {
+		gdk_cursor_unref (day_view->resize_height_cursor);
+		day_view->resize_height_cursor = NULL;
+	}
 
-	day_view->show_marcus_bains_line = TRUE;
-	day_view->marcus_bains_day_view_color = NULL;
-	day_view->marcus_bains_time_bar_color = NULL;
+	if (day_view->long_events) {
+		e_day_view_free_events (day_view);
+		g_array_free (day_view->long_events, TRUE);
+		day_view->long_events = NULL;
+	}
 
-	day_view->editing_event_day = -1;
-	day_view->editing_event_num = -1;
+	for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++) {
+		if (day_view->events[day]) {
+			g_array_free (day_view->events[day], TRUE);
+			day_view->events[day] = NULL;
+		}
+	}
 
-	day_view->resize_event_num = -1;
-	day_view->resize_bars_event_day = -1;
-	day_view->resize_bars_event_num = -1;
+	GTK_OBJECT_CLASS (e_day_view_parent_class)->destroy (object);
+}
 
-	day_view->last_edited_comp_string = NULL;
+static void
+e_day_view_realize (GtkWidget *widget)
+{
+	EDayView *day_view;
+	GdkColormap *colormap;
 
+	if (GTK_WIDGET_CLASS (e_day_view_parent_class)->realize)
+		(*GTK_WIDGET_CLASS (e_day_view_parent_class)->realize)(widget);
 
-	day_view->selection_start_row = -1;
-	day_view->selection_start_day = -1;
-	day_view->selection_end_row = -1;
-	day_view->selection_end_day = -1;
-	day_view->selection_is_being_dragged = FALSE;
-	day_view->selection_drag_pos = E_DAY_VIEW_DRAG_END;
-	day_view->selection_in_top_canvas = FALSE;
-	day_view->drag_event_day = -1;
-	day_view->drag_event_num = -1;
-	day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
+	day_view = E_DAY_VIEW (widget);
+	day_view->main_gc = gdk_gc_new (widget->window);
 
-	day_view->pressed_event_day = -1;
+	colormap = gtk_widget_get_colormap (widget);
 
-	day_view->drag_event_day = -1;
-	day_view->drag_last_day = -1;
+	/* Allocate the colors. */
 
-	day_view->auto_scroll_timeout_id = 0;
+	e_day_view_set_colors(day_view, widget);
 
-	day_view->large_font_desc = NULL;
-	day_view->small_font_desc = NULL;
+	gdk_gc_set_colormap (day_view->main_gc, colormap);
 
-	/* String to use in 12-hour time format for times in the morning. */
-	day_view->am_string = _("am");
+	/* Create the pixmaps. */
+	day_view->reminder_icon = e_icon_factory_get_icon ("stock_bell", E_ICON_SIZE_MENU);
+	day_view->recurrence_icon = e_icon_factory_get_icon ("view-refresh", E_ICON_SIZE_MENU);
+	day_view->timezone_icon = e_icon_factory_get_icon ("stock_timezone", E_ICON_SIZE_MENU);
+	day_view->meeting_icon = e_icon_factory_get_icon ("stock_people", E_ICON_SIZE_MENU);
+	day_view->attach_icon = e_icon_factory_get_icon ("mail-attachment", E_ICON_SIZE_MENU);
 
-	/* String to use in 12-hour time format for times in the afternoon. */
-	day_view->pm_string = _("pm");
 
-	day_view->bc_event_time = 0;
-	day_view->before_click_dtstart = 0;
-	day_view->before_click_dtend = 0;
+	/* Set the canvas item colors. */
+	gnome_canvas_item_set (day_view->drag_long_event_rect_item,
+			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND],
+			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
+			       NULL);
 
-	/*
-	 * Top Canvas
-	 */
-	w = gtk_vbox_new (FALSE, 0);
+	gnome_canvas_item_set (day_view->drag_rect_item,
+			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND],
+			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
+			       NULL);
 
-	day_view->top_dates_canvas = e_canvas_new ();
-	gtk_box_pack_start (GTK_BOX (w), day_view->top_dates_canvas, TRUE, TRUE, 0);
-	day_view->top_canvas = e_canvas_new ();
-	gtk_box_pack_end (GTK_BOX (w), day_view->top_canvas, TRUE, TRUE, 0);
+	gnome_canvas_item_set (day_view->drag_bar_item,
+			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR],
+			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
+			       NULL);
+}
 
-	gtk_table_attach (GTK_TABLE (day_view), w,
-			  1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-	gtk_widget_show_all (w);
-
-	g_signal_connect_after (day_view->top_canvas, "button_press_event",
-				G_CALLBACK (e_day_view_on_top_canvas_button_press), day_view);
-	g_signal_connect (day_view->top_canvas, "button_release_event",
-			  G_CALLBACK (e_day_view_on_top_canvas_button_release), day_view);
-	g_signal_connect (day_view->top_canvas, "scroll_event",
-			  G_CALLBACK (e_day_view_on_top_canvas_scroll), day_view);
-	g_signal_connect (day_view->top_canvas, "motion_notify_event",
-			  G_CALLBACK (e_day_view_on_top_canvas_motion), day_view);
-	g_signal_connect (day_view->top_canvas, "drag_motion",
-			  G_CALLBACK (e_day_view_on_top_canvas_drag_motion), day_view);
-	g_signal_connect (day_view->top_canvas, "drag_leave",
-			  G_CALLBACK (e_day_view_on_top_canvas_drag_leave), day_view);
-
-	g_signal_connect (day_view->top_canvas, "drag_begin",
-			  G_CALLBACK (e_day_view_on_drag_begin), day_view);
-	g_signal_connect (day_view->top_canvas, "drag_end",
-			  G_CALLBACK (e_day_view_on_drag_end), day_view);
-	g_signal_connect (day_view->top_canvas, "drag_data_get",
-			  G_CALLBACK (e_day_view_on_drag_data_get), day_view);
-	g_signal_connect (day_view->top_canvas, "drag_data_received",
-			  G_CALLBACK (e_day_view_on_top_canvas_drag_data_received), day_view);
-
-	canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->top_dates_canvas)->root);
-
-	day_view->top_dates_canvas_item =
-		gnome_canvas_item_new (canvas_group,
-				       e_day_view_top_item_get_type (),
-				       "EDayViewTopItem::day_view", day_view,
-				       "EDayViewTopItem::show_dates", TRUE,
-				       NULL);
-	gtk_widget_set_size_request (day_view->top_dates_canvas, -1, day_view->top_row_height);
-
-	canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->top_canvas)->root);
-
-	day_view->top_canvas_item =
-		gnome_canvas_item_new (canvas_group,
-				       e_day_view_top_item_get_type (),
-				       "EDayViewTopItem::day_view", day_view,
-				       "EDayViewTopItem::show_dates", FALSE,
-				       NULL);
-
-	day_view->drag_long_event_rect_item =
-		gnome_canvas_item_new (canvas_group,
-				       gnome_canvas_rect_get_type (),
-				       "width_pixels", 1,
-				       NULL);
-	gnome_canvas_item_hide (day_view->drag_long_event_rect_item);
-
-	day_view->drag_long_event_item =
-		gnome_canvas_item_new (canvas_group,
-				       e_text_get_type (),
-				       "anchor", GTK_ANCHOR_NW,
-				       "line_wrap", TRUE,
-				       "clip", TRUE,
-				       "max_lines", 1,
-				       "editable", TRUE,
-				       "draw_background", FALSE,
-				       "fill_color_rgba", GNOME_CANVAS_COLOR(0, 0, 0),
-				       NULL);
-	gnome_canvas_item_hide (day_view->drag_long_event_item);
-
-	/*
-	 * Main Canvas
-	 */
-	day_view->main_canvas = e_canvas_new ();
-	gtk_table_attach (GTK_TABLE (day_view), day_view->main_canvas,
-			  1, 2, 1, 2,
-			  GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_widget_show (day_view->main_canvas);
-	g_signal_connect (day_view->main_canvas, "realize",
-			  G_CALLBACK (e_day_view_on_canvas_realized), day_view);
-
-	g_signal_connect (day_view->main_canvas,
-			  "button_press_event",
-			  G_CALLBACK (e_day_view_on_main_canvas_button_press),
-			  day_view);
-	g_signal_connect (day_view->main_canvas,
-			  "button_release_event",
-			  G_CALLBACK (e_day_view_on_main_canvas_button_release),
-			  day_view);
-	g_signal_connect (day_view->main_canvas,
-			  "scroll_event",
-			  G_CALLBACK (e_day_view_on_main_canvas_scroll),
-			  day_view);
-	g_signal_connect (day_view->main_canvas,
-			  "motion_notify_event",
-			  G_CALLBACK (e_day_view_on_main_canvas_motion),
-			  day_view);
-	g_signal_connect (day_view->main_canvas,
-			  "drag_motion",
-			  G_CALLBACK (e_day_view_on_main_canvas_drag_motion),
-			  day_view);
-	g_signal_connect (day_view->main_canvas,
-			  "drag_leave",
-			  G_CALLBACK (e_day_view_on_main_canvas_drag_leave),
-			  day_view);
-
-	g_signal_connect (day_view->main_canvas, "drag_begin",
-			  G_CALLBACK (e_day_view_on_drag_begin), day_view);
-	g_signal_connect (day_view->main_canvas, "drag_end",
-			  G_CALLBACK (e_day_view_on_drag_end), day_view);
-	g_signal_connect (day_view->main_canvas, "drag_data_get",
-			  G_CALLBACK (e_day_view_on_drag_data_get), day_view);
-	g_signal_connect (day_view->main_canvas, "drag_data_received",
-			  G_CALLBACK (e_day_view_on_main_canvas_drag_data_received), day_view);
-
-	canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->main_canvas)->root);
-
-	day_view->main_canvas_item =
-		gnome_canvas_item_new (canvas_group,
-				       e_day_view_main_item_get_type (),
-				       "EDayViewMainItem::day_view", day_view,
-				       NULL);
-
-	day_view->drag_rect_item =
-		gnome_canvas_item_new (canvas_group,
-				       gnome_canvas_rect_get_type (),
-				       "width_pixels", 1,
-				       NULL);
-	gnome_canvas_item_hide (day_view->drag_rect_item);
-
-	day_view->drag_bar_item =
-		gnome_canvas_item_new (canvas_group,
-				       gnome_canvas_rect_get_type (),
-				       "width_pixels", 1,
-				       NULL);
-	gnome_canvas_item_hide (day_view->drag_bar_item);
-
-	day_view->drag_item =
-		gnome_canvas_item_new (canvas_group,
-				       e_text_get_type (),
-				       "anchor", GTK_ANCHOR_NW,
-				       "line_wrap", TRUE,
-				       "clip", TRUE,
-				       "editable", TRUE,
-				       "draw_background", FALSE,
-				       "fill_color_rgba", GNOME_CANVAS_COLOR(0, 0, 0),
-				       NULL);
-	gnome_canvas_item_hide (day_view->drag_item);
-
-
-	/*
-	 * Times Canvas
-	 */
-	day_view->time_canvas = e_canvas_new ();
-	gtk_layout_set_vadjustment (GTK_LAYOUT (day_view->time_canvas),
-				    GTK_LAYOUT (day_view->main_canvas)->vadjustment);
-	gtk_table_attach (GTK_TABLE (day_view), day_view->time_canvas,
-			  0, 1, 1, 2,
-			  GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_widget_show (day_view->time_canvas);
-	g_signal_connect_after (day_view->time_canvas, "scroll_event",
-				G_CALLBACK (e_day_view_on_time_canvas_scroll), day_view);
-
-	canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->time_canvas)->root);
-
-	day_view->time_canvas_item =
-		gnome_canvas_item_new (canvas_group,
-				       e_day_view_time_item_get_type (),
-				       "EDayViewTimeItem::day_view", day_view,
-				       NULL);
-
-
-	/*
-	 * Scrollbar.
-	 */
-	day_view->tc_vscrollbar = gtk_vscrollbar_new (GTK_LAYOUT (day_view->top_canvas)->vadjustment);
-	gtk_table_attach (GTK_TABLE (day_view), day_view->tc_vscrollbar,
-			  2, 3, 0, 1, 0, GTK_FILL, 0, 0);
-	/* gtk_widget_show (day_view->tc_vscrollbar); */
-
-	day_view->vscrollbar = gtk_vscrollbar_new (GTK_LAYOUT (day_view->main_canvas)->vadjustment);
-	gtk_table_attach (GTK_TABLE (day_view), day_view->vscrollbar,
-			  2, 3, 1, 2, 0, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_widget_show (day_view->vscrollbar);
-
-	/* Create the cursors. */
-	day_view->normal_cursor = gdk_cursor_new (GDK_LEFT_PTR);
-	day_view->move_cursor = gdk_cursor_new (GDK_FLEUR);
-	day_view->resize_width_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW);
-	day_view->resize_height_cursor = gdk_cursor_new (GDK_SB_V_DOUBLE_ARROW);
-	day_view->last_cursor_set_in_top_canvas = NULL;
-	day_view->last_cursor_set_in_main_canvas = NULL;
-
-	/* Set up the drop sites. */
-	gtk_drag_dest_set (day_view->top_canvas,
-			   GTK_DEST_DEFAULT_ALL,
-			   target_table, n_targets,
-			   GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_ASK);
-	gtk_drag_dest_set (day_view->main_canvas,
-			   GTK_DEST_DEFAULT_ALL,
-			   target_table, n_targets,
-			   GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_ASK);
-
-	/* Get the model */
-	model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view));
-
-	/* connect to ECalModel's signals */
-	g_signal_connect (G_OBJECT (model), "time_range_changed",
-			  G_CALLBACK (time_range_changed_cb), day_view);
-	g_signal_connect (G_OBJECT (model), "model_row_changed",
-			  G_CALLBACK (model_row_changed_cb), day_view);
-	g_signal_connect (G_OBJECT (model), "model_cell_changed",
-			  G_CALLBACK (model_cell_changed_cb), day_view);
-	g_signal_connect (G_OBJECT (model), "model_rows_inserted",
-			  G_CALLBACK (model_rows_inserted_cb), day_view);
-	g_signal_connect (G_OBJECT (model), "model_rows_deleted",
-			  G_CALLBACK (model_rows_deleted_cb), day_view);
-
-	/* connect to ECalendarView's signals */
-	g_signal_connect (G_OBJECT (day_view), "timezone_changed",
-			  G_CALLBACK (timezone_changed_cb), NULL);
-}
-#endif
-
-
-/* Turn off the background of the canvas windows. This reduces flicker
-   considerably when scrolling. (Why isn't it in GnomeCanvas?). */
-static void
-e_day_view_on_canvas_realized (GtkWidget *widget,
-			       EDayView *day_view)
-{
-	gdk_window_set_back_pixmap (GTK_LAYOUT (widget)->bin_window,
-				    NULL, FALSE);
-}
-
-
-/**
- * e_day_view_new:
- * @Returns: a new #EDayView.
- *
- * Creates a new #EDayView.
- **/
-GtkWidget *
-e_day_view_new (void)
-{
-	GObject *day_view;
-
-	day_view = g_object_new (e_day_view_get_type (), NULL);
-	e_cal_model_set_flags (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES);
-
-	return GTK_WIDGET (day_view);
-}
-
-static void
-e_day_view_destroy (GtkObject *object)
-{
-	EDayView *day_view;
-	gint day;
-
-	day_view = E_DAY_VIEW (object);
-
-	e_day_view_cancel_layout (day_view);
-
-	e_day_view_stop_auto_scroll (day_view);
-
-	if (day_view->large_font_desc) {
-		pango_font_description_free (day_view->large_font_desc);
-		day_view->large_font_desc = NULL;
-	}
-
-	if (day_view->small_font_desc) {
-		pango_font_description_free (day_view->small_font_desc);
-		day_view->small_font_desc = NULL;
-	}
-
-	if (day_view->normal_cursor) {
-		gdk_cursor_unref (day_view->normal_cursor);
-		day_view->normal_cursor = NULL;
-	}
-	if (day_view->move_cursor) {
-		gdk_cursor_unref (day_view->move_cursor);
-		day_view->move_cursor = NULL;
-	}
-	if (day_view->resize_width_cursor) {
-		gdk_cursor_unref (day_view->resize_width_cursor);
-		day_view->resize_width_cursor = NULL;
-	}
-	if (day_view->resize_height_cursor) {
-		gdk_cursor_unref (day_view->resize_height_cursor);
-		day_view->resize_height_cursor = NULL;
-	}
-
-	if (day_view->long_events) {
-		e_day_view_free_events (day_view);
-		g_array_free (day_view->long_events, TRUE);
-		day_view->long_events = NULL;
-	}
-
-	for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++) {
-		if (day_view->events[day]) {
-			g_array_free (day_view->events[day], TRUE);
-			day_view->events[day] = NULL;
-		}
-	}
-
-	GTK_OBJECT_CLASS (e_day_view_parent_class)->destroy (object);
-}
-
-#ifndef ENABLE_CAIRO
-static void
-e_day_view_realize (GtkWidget *widget)
-{
-	EDayView *day_view;
-	GdkColormap *colormap;
-
-	if (GTK_WIDGET_CLASS (e_day_view_parent_class)->realize)
-		(*GTK_WIDGET_CLASS (e_day_view_parent_class)->realize)(widget);
-
-	day_view = E_DAY_VIEW (widget);
-	day_view->main_gc = gdk_gc_new (widget->window);
-
-	colormap = gtk_widget_get_colormap (widget);
-
-	/* Allocate the colors. */
-
-	e_day_view_set_colors(day_view, widget);
-
-	gdk_gc_set_colormap (day_view->main_gc, colormap);
-
-	/* Create the pixmaps. */
-	day_view->reminder_icon = e_icon_factory_get_icon ("stock_bell", E_ICON_SIZE_MENU);
-	day_view->recurrence_icon = e_icon_factory_get_icon ("view-refresh", E_ICON_SIZE_MENU);
-	day_view->timezone_icon = e_icon_factory_get_icon ("stock_timezone", E_ICON_SIZE_MENU);
-	day_view->meeting_icon = e_icon_factory_get_icon ("stock_people", E_ICON_SIZE_MENU);
-	day_view->attach_icon = e_icon_factory_get_icon ("mail-attachment", E_ICON_SIZE_MENU);
-
-
-	/* Set the canvas item colors. */
-	gnome_canvas_item_set (day_view->resize_long_event_rect_item,
-			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND],
-			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			       NULL);
-
-	gnome_canvas_item_set (day_view->drag_long_event_rect_item,
-			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND],
-			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			       NULL);
-
-
-	gnome_canvas_item_set (day_view->resize_rect_item,
-			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND],
-			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			       NULL);
-
-	gnome_canvas_item_set (day_view->resize_bar_item,
-			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR],
-			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			       NULL);
-
-	gnome_canvas_item_set (day_view->main_canvas_top_resize_bar_item,
-			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR],
-			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			       NULL);
-
-	gnome_canvas_item_set (day_view->main_canvas_bottom_resize_bar_item,
-			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR],
-			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			       NULL);
-
-
-	gnome_canvas_item_set (day_view->drag_rect_item,
-			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND],
-			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			       NULL);
-
-	gnome_canvas_item_set (day_view->drag_bar_item,
-			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR],
-			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			       NULL);
-}
-#endif
-
-#ifdef ENABLE_CAIRO
-static void
-e_day_view_realize (GtkWidget *widget)
-{
-	EDayView *day_view;
-	GdkColormap *colormap;
-
-	if (GTK_WIDGET_CLASS (e_day_view_parent_class)->realize)
-		(*GTK_WIDGET_CLASS (e_day_view_parent_class)->realize)(widget);
-
-	day_view = E_DAY_VIEW (widget);
-	day_view->main_gc = gdk_gc_new (widget->window);
-
-	colormap = gtk_widget_get_colormap (widget);
-
-	/* Allocate the colors. */
-
-	e_day_view_set_colors(day_view, widget);
-
-	gdk_gc_set_colormap (day_view->main_gc, colormap);
-
-	/* Create the pixmaps. */
-	day_view->reminder_icon = e_icon_factory_get_icon ("stock_bell", E_ICON_SIZE_MENU);
-	day_view->recurrence_icon = e_icon_factory_get_icon ("view-refresh", E_ICON_SIZE_MENU);
-	day_view->timezone_icon = e_icon_factory_get_icon ("stock_timezone", E_ICON_SIZE_MENU);
-	day_view->meeting_icon = e_icon_factory_get_icon ("stock_people", E_ICON_SIZE_MENU);
-	day_view->attach_icon = e_icon_factory_get_icon ("mail-attachment", E_ICON_SIZE_MENU);
-
-
-	/* Set the canvas item colors. */
-	gnome_canvas_item_set (day_view->drag_long_event_rect_item,
-			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND],
-			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			       NULL);
-
-	gnome_canvas_item_set (day_view->drag_rect_item,
-			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND],
-			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			       NULL);
-
-	gnome_canvas_item_set (day_view->drag_bar_item,
-			       "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR],
-			       "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			       NULL);
-}
-#endif
-
-static void
-e_day_view_set_colors(EDayView *day_view, GtkWidget *widget)
-{
-	day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING] = widget->style->base[GTK_STATE_NORMAL];
-	day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING] = widget->style->bg[GTK_STATE_ACTIVE];
-	day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED] = widget->style->base[GTK_STATE_SELECTED];
-	day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED] = widget->style->bg[GTK_STATE_SELECTED];
-	day_view->colors[E_DAY_VIEW_COLOR_BG_GRID] = widget->style->dark[GTK_STATE_NORMAL];
-	day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS] = widget->style->dark[GTK_STATE_NORMAL];
-	day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_SELECTED] = widget->style->bg[GTK_STATE_SELECTED];
-	day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_GRID] = widget->style->light[GTK_STATE_NORMAL];
-	day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR] = widget->style->base[GTK_STATE_SELECTED];
-	day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND] = widget->style->base[GTK_STATE_NORMAL];
-	day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER] = widget->style->dark[GTK_STATE_NORMAL];
-	day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND] = widget->style->bg[GTK_STATE_ACTIVE];
-	day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER] = widget->style->dark[GTK_STATE_NORMAL];
-	day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE] = widget->style->dark[GTK_STATE_PRELIGHT];
-}
+static void
+e_day_view_set_colors(EDayView *day_view, GtkWidget *widget)
+{
+	day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING] = widget->style->base[GTK_STATE_NORMAL];
+	day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING] = widget->style->bg[GTK_STATE_ACTIVE];
+	day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED] = widget->style->base[GTK_STATE_SELECTED];
+	day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED] = widget->style->bg[GTK_STATE_SELECTED];
+	day_view->colors[E_DAY_VIEW_COLOR_BG_GRID] = widget->style->dark[GTK_STATE_NORMAL];
+	day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS] = widget->style->dark[GTK_STATE_NORMAL];
+	day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_SELECTED] = widget->style->bg[GTK_STATE_SELECTED];
+	day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_GRID] = widget->style->light[GTK_STATE_NORMAL];
+	day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR] = widget->style->base[GTK_STATE_SELECTED];
+	day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND] = widget->style->base[GTK_STATE_NORMAL];
+	day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER] = widget->style->dark[GTK_STATE_NORMAL];
+	day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND] = widget->style->bg[GTK_STATE_ACTIVE];
+	day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER] = widget->style->dark[GTK_STATE_NORMAL];
+	day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE] = widget->style->dark[GTK_STATE_PRELIGHT];
+}
 
 static void
 e_day_view_unrealize (GtkWidget *widget)
@@ -1622,251 +1193,64 @@
        	green = day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND].green;
        	blue = day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND].blue;
 
-	if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), event->comp_data),
-       	     &bg_color)) {
-                GdkColormap *colormap;
-       		colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
-	        if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
-       		        red = bg_color.red;
-			green = bg_color.green;
-	                blue = bg_color.blue;
-                }
-       	}
-
-	if ((red/cc > 0.7) || (green/cc > 0.7) || (blue/cc > 0.7 ))
-		color = widget->style->text[GTK_STATE_NORMAL];
-	else
-		color = widget->style->text[GTK_STATE_ACTIVE];
-
-	return color;
-}
-
-static void
-e_day_view_update_top_scroll (EDayView *day_view, gboolean scroll_to_top)
-{
-	gint top_rows, top_canvas_height;
-	gdouble old_x2, old_y2, new_x2, new_y2;
-
-	/* Set the height of the top canvas based on the row height and the
-	   number of rows needed (min 1 + 1 for the dates + 1 space for DnD).*/
-	top_rows = MAX (1, day_view->rows_in_top_display);
-	top_canvas_height = (top_rows + 1) * day_view->top_row_height;
-	if (top_rows <= E_DAY_VIEW_MAX_ROWS_AT_TOP) {
-		gtk_widget_set_size_request (day_view->top_canvas, -1, top_canvas_height);
-		gtk_widget_hide (day_view->tc_vscrollbar);
-	} else {
-		gtk_widget_set_size_request (day_view->top_canvas, -1, (E_DAY_VIEW_MAX_ROWS_AT_TOP + 1) * day_view->top_row_height);
-		gtk_widget_show (day_view->tc_vscrollbar);
-	}
-
-	/* Set the scroll region of the top canvas */
-	gnome_canvas_get_scroll_region (GNOME_CANVAS (day_view->top_canvas),
-					NULL, NULL, &old_x2, &old_y2);
-	new_x2 = day_view->top_canvas->allocation.width - 1;
-	new_y2 = (MAX (1, day_view->rows_in_top_display) + 1) * day_view->top_row_height - 1;
-	if (old_x2 != new_x2 || old_y2 != new_y2) {
-		gnome_canvas_set_scroll_region (GNOME_CANVAS (day_view->top_canvas),
-						0, 0, new_x2, new_y2);
-
-		if (scroll_to_top)
-			gnome_canvas_scroll_to (GNOME_CANVAS (day_view->top_canvas), 0, 0);
-	}
-	new_y2 = day_view->top_row_height - 1 - 2;
-	gnome_canvas_get_scroll_region (GNOME_CANVAS (day_view->top_dates_canvas), NULL, NULL, &old_x2, &old_y2);
-
-	if (old_x2 != new_x2 || old_y2 != new_y2) {
-		gnome_canvas_set_scroll_region (GNOME_CANVAS (day_view->top_dates_canvas), 0, 0, new_x2, new_y2);
-		gnome_canvas_scroll_to (GNOME_CANVAS (day_view->top_dates_canvas), 0, 0);
-	}
-}
-
-#ifndef ENABLE_CAIRO
-static void
-e_day_view_style_set (GtkWidget *widget,
-		      GtkStyle  *previous_style)
-{
-	EDayView *day_view;
-	gint hour;
-	gint minute, max_minute_width, i;
-	gint month, day, width;
-	gint longest_month_width, longest_abbreviated_month_width;
-	gint longest_weekday_width, longest_abbreviated_weekday_width;
-	gchar buffer[128];
-	const gchar *name;
-	gint times_width;
-	PangoFontDescription *font_desc;
-	PangoContext *pango_context;
-	PangoFontMetrics *font_metrics;
-	PangoLayout *layout;
-	gint week_day, event_num;
-	EDayViewEvent *event;
-	GdkColor color;
-
-	if (GTK_WIDGET_CLASS (e_day_view_parent_class)->style_set)
-		(*GTK_WIDGET_CLASS (e_day_view_parent_class)->style_set)(widget, previous_style);
-
-	day_view = E_DAY_VIEW (widget);
-	e_day_view_set_colors(day_view, widget);
-
-	for (week_day = 0; week_day < E_DAY_VIEW_MAX_DAYS; week_day++){
-		for (event_num = 0; event_num < day_view->events[week_day]->len; event_num++) {
-			event = &g_array_index (day_view->events[week_day], EDayViewEvent, event_num);
-			if (event->canvas_item) {
-				color = e_day_view_get_text_color (day_view, event, widget);
-				gnome_canvas_item_set (event->canvas_item,
-						"fill_color_gdk", &color,
-						NULL);
-			}
-		}
-	}
-	for (event_num = 0; event_num < day_view->long_events->len; event_num++) {
-		event = &g_array_index (day_view->long_events, EDayViewEvent, event_num);
-		if (event->canvas_item) {
-			color = e_day_view_get_text_color (day_view, event, widget);
-			gnome_canvas_item_set (event->canvas_item,
-					"fill_color_gdk", &color,
-					NULL);
-		}
-	}
-	gnome_canvas_item_set (day_view->main_canvas_top_resize_bar_item,
-			"fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR],
-			"outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			NULL);
-	gnome_canvas_item_set (day_view->main_canvas_bottom_resize_bar_item,
-			"fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR],
-			"outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER],
-			NULL);
-
-	/* Set up Pango prerequisites */
-	font_desc = gtk_widget_get_style (widget)->font_desc;
-	pango_context = gtk_widget_get_pango_context (widget);
-	font_metrics = pango_context_get_metrics (pango_context, font_desc,
-						  pango_context_get_language (pango_context));
-	layout = pango_layout_new (pango_context);
-
-	/* Create the large font. */
-	if (day_view->large_font_desc != NULL)
-		pango_font_description_free (day_view->large_font_desc);
-
-	day_view->large_font_desc = pango_font_description_copy (font_desc);
-	pango_font_description_set_size (day_view->large_font_desc,
-					 E_DAY_VIEW_LARGE_FONT_PTSIZE * PANGO_SCALE);
-
-	/* Create the small fonts. */
-	if (day_view->small_font_desc != NULL)
-		pango_font_description_free (day_view->small_font_desc);
-
-	day_view->small_font_desc = pango_font_description_copy (font_desc);
-	pango_font_description_set_size (day_view->small_font_desc,
-					 E_DAY_VIEW_SMALL_FONT_PTSIZE * PANGO_SCALE);
-
-	/* Recalculate the height of each row based on the font size. */
-	day_view->row_height =
-		PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
-		PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) +
-		E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_EVENT_Y_PAD * 2 + 2 /* FIXME */;
-	day_view->row_height = MAX (day_view->row_height, E_DAY_VIEW_ICON_HEIGHT + E_DAY_VIEW_ICON_Y_PAD + 2);
-	GTK_LAYOUT (day_view->main_canvas)->vadjustment->step_increment = day_view->row_height;
-
-	day_view->top_row_height =
-		PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
-		PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) +
-		E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT * 2 + E_DAY_VIEW_LONG_EVENT_Y_PAD * 2 +
-		E_DAY_VIEW_TOP_CANVAS_Y_GAP;
-	day_view->top_row_height = MAX (day_view->top_row_height, E_DAY_VIEW_ICON_HEIGHT + E_DAY_VIEW_ICON_Y_PAD + 2 + E_DAY_VIEW_TOP_CANVAS_Y_GAP);
-	GTK_LAYOUT (day_view->top_canvas)->vadjustment->step_increment = day_view->top_row_height;
-
-	e_day_view_update_top_scroll (day_view, TRUE);
-
-	/* Find the longest full & abbreviated month names. */
-	longest_month_width = 0;
-	longest_abbreviated_month_width = 0;
-	for (month = 0; month < 12; month++) {
-		name = e_get_month_name (month + 1, FALSE);
-		pango_layout_set_text (layout, name, -1);
-		pango_layout_get_pixel_size (layout, &width, NULL);
-
-		if (width > longest_month_width) {
-			longest_month_width = width;
-			day_view->longest_month_name = month;
-		}
-
-		name = e_get_month_name (month + 1, TRUE);
-		pango_layout_set_text (layout, name, -1);
-		pango_layout_get_pixel_size (layout, &width, NULL);
-
-		if (width > longest_abbreviated_month_width) {
-			longest_abbreviated_month_width = width;
-			day_view->longest_abbreviated_month_name = month;
-		}
-	}
-
-	/* Find the longest full & abbreviated weekday names. */
-	longest_weekday_width = 0;
-	longest_abbreviated_weekday_width = 0;
-	for (day = 0; day < 7; day++) {
-		name = e_get_weekday_name (day + 1, FALSE);
-		pango_layout_set_text (layout, name, -1);
-		pango_layout_get_pixel_size (layout, &width, NULL);
-
-		if (width > longest_weekday_width) {
-			longest_weekday_width = width;
-			day_view->longest_weekday_name = day;
-		}
-
-		name = e_get_weekday_name (day + 1, TRUE);
-		pango_layout_set_text (layout, name, -1);
-		pango_layout_get_pixel_size (layout, &width, NULL);
-
-		if (width > longest_abbreviated_weekday_width) {
-			longest_abbreviated_weekday_width = width;
-			day_view->longest_abbreviated_weekday_name = day;
-		}
-	}
-
-
-	/* Calculate the widths of all the time strings necessary. */
-	day_view->max_small_hour_width = 0;
-	for (hour = 0; hour < 24; hour++) {
-		g_snprintf (buffer, sizeof (buffer), "%02i", hour);
-		pango_layout_set_text (layout, buffer, -1);
-		pango_layout_get_pixel_size (layout, &day_view->small_hour_widths [hour], NULL);
+	if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), event->comp_data),
+       	     &bg_color)) {
+                GdkColormap *colormap;
+       		colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
+	        if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
+       		        red = bg_color.red;
+			green = bg_color.green;
+	                blue = bg_color.blue;
+                }
+       	}
 
-		day_view->max_small_hour_width = MAX (day_view->max_small_hour_width, day_view->small_hour_widths[hour]);
-	}
+	if ((red/cc > 0.7) || (green/cc > 0.7) || (blue/cc > 0.7 ))
+		color = widget->style->text[GTK_STATE_NORMAL];
+	else
+		color = widget->style->text[GTK_STATE_ACTIVE];
 
-	max_minute_width = 0;
-	for (minute = 0, i = 0; minute < 60; minute += 5, i++) {
-		gint minute_width;
+	return color;
+}
 
-		g_snprintf (buffer, sizeof (buffer), "%02i", minute);
-		pango_layout_set_text (layout, buffer, -1);
-		pango_layout_get_pixel_size (layout, &minute_width, NULL);
+static void
+e_day_view_update_top_scroll (EDayView *day_view, gboolean scroll_to_top)
+{
+	gint top_rows, top_canvas_height;
+	gdouble old_x2, old_y2, new_x2, new_y2;
 
-		max_minute_width = MAX (max_minute_width, minute_width);
+	/* Set the height of the top canvas based on the row height and the
+	   number of rows needed (min 1 + 1 for the dates + 1 space for DnD).*/
+	top_rows = MAX (1, day_view->rows_in_top_display);
+	top_canvas_height = (top_rows + 1) * day_view->top_row_height;
+	if (top_rows <= E_DAY_VIEW_MAX_ROWS_AT_TOP) {
+		gtk_widget_set_size_request (day_view->top_canvas, -1, top_canvas_height);
+		gtk_widget_hide (day_view->tc_vscrollbar);
+	} else {
+		gtk_widget_set_size_request (day_view->top_canvas, -1, (E_DAY_VIEW_MAX_ROWS_AT_TOP + 1) * day_view->top_row_height);
+		gtk_widget_show (day_view->tc_vscrollbar);
 	}
-	day_view->max_minute_width = max_minute_width;
-
-	pango_layout_set_text (layout, ":", 1);
-	pango_layout_get_pixel_size (layout, &day_view->colon_width, NULL);
-	pango_layout_set_text (layout, "0", 1);
-	pango_layout_get_pixel_size (layout, &day_view->digit_width, NULL);
 
-	pango_layout_set_text (layout, day_view->am_string, -1);
-	pango_layout_get_pixel_size (layout, &day_view->am_string_width, NULL);
-	pango_layout_set_text (layout, day_view->pm_string, -1);
-	pango_layout_get_pixel_size (layout, &day_view->pm_string_width, NULL);
+	/* Set the scroll region of the top canvas */
+	gnome_canvas_get_scroll_region (GNOME_CANVAS (day_view->top_canvas),
+					NULL, NULL, &old_x2, &old_y2);
+	new_x2 = day_view->top_canvas->allocation.width - 1;
+	new_y2 = (MAX (1, day_view->rows_in_top_display) + 1) * day_view->top_row_height - 1;
+	if (old_x2 != new_x2 || old_y2 != new_y2) {
+		gnome_canvas_set_scroll_region (GNOME_CANVAS (day_view->top_canvas),
+						0, 0, new_x2, new_y2);
 
-	/* Calculate the width of the time column. */
-	times_width = e_day_view_time_item_get_column_width (E_DAY_VIEW_TIME_ITEM (day_view->time_canvas_item));
-	gtk_widget_set_size_request (day_view->time_canvas, times_width, -1);
+		if (scroll_to_top)
+			gnome_canvas_scroll_to (GNOME_CANVAS (day_view->top_canvas), 0, 0);
+	}
+	new_y2 = day_view->top_row_height - 1 - 2;
+	gnome_canvas_get_scroll_region (GNOME_CANVAS (day_view->top_dates_canvas), NULL, NULL, &old_x2, &old_y2);
 
-	g_object_unref (layout);
-	pango_font_metrics_unref (font_metrics);
+	if (old_x2 != new_x2 || old_y2 != new_y2) {
+		gnome_canvas_set_scroll_region (GNOME_CANVAS (day_view->top_dates_canvas), 0, 0, new_x2, new_y2);
+		gnome_canvas_scroll_to (GNOME_CANVAS (day_view->top_dates_canvas), 0, 0);
+	}
 }
-#endif
 
-#ifdef ENABLE_CAIRO
 static void
 e_day_view_style_set (GtkWidget *widget,
 		      GtkStyle  *previous_style)
@@ -2043,7 +1427,6 @@
 	g_object_unref (layout);
 	pango_font_metrics_unref (font_metrics);
 }
-#endif
 
 /* This recalculates the sizes of each column. */
 static void
@@ -2398,111 +1781,6 @@
 
 /* This updates the text shown for an event. If the event start or end do not
    lie on a row boundary, the time is displayed before the summary. */
-#ifndef ENABLE_CAIRO
-/* This updates the text shown for an event. If the event start or end do not
-   lie on a row boundary, the time is displayed before the summary. */
-static void
-e_day_view_update_event_label (EDayView *day_view,
-			       gint day,
-			       gint event_num)
-{
-	EDayViewEvent *event;
-	char *text, *start_suffix, *end_suffix;
-	gboolean free_text = FALSE, editing_event = FALSE;
-	gint offset;
-	gint start_hour, start_display_hour, start_minute, start_suffix_width;
-	gint end_hour, end_display_hour, end_minute, end_suffix_width;
-	const gchar *summary;
-
-	event = &g_array_index (day_view->events[day], EDayViewEvent, event_num);
-
-	/* If the event isn't visible just return. */
-	if (!event->canvas_item)
-		return;
-
-	summary = icalcomponent_get_summary (event->comp_data->icalcomp);
-	text = summary ? (char *) summary : "";
-
-	if (day_view->editing_event_day == day
-	    && day_view->editing_event_num == event_num)
-		editing_event = TRUE;
-
-	if (!editing_event
-	    && (event->start_minute % day_view->mins_per_row != 0
-		|| (day_view->show_event_end_times
-		    && event->end_minute % day_view->mins_per_row != 0))) {
-		offset = day_view->first_hour_shown * 60
-			+ day_view->first_minute_shown;
-		start_minute = offset + event->start_minute;
-		end_minute = offset + event->end_minute;
-
-		start_hour = start_minute / 60;
-		start_minute = start_minute % 60;
-
-		end_hour = end_minute / 60;
-		end_minute = end_minute % 60;
-
-		e_day_view_convert_time_to_display (day_view, start_hour,
-						    &start_display_hour,
-						    &start_suffix,
-						    &start_suffix_width);
-		e_day_view_convert_time_to_display (day_view, end_hour,
-						    &end_display_hour,
-						    &end_suffix,
-						    &end_suffix_width);
-
-		if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
-			if (day_view->show_event_end_times) {
-				/* 24 hour format with end time. */
-				text = g_strdup_printf
-					("%2i:%02i-%2i:%02i %s",
-					 start_display_hour, start_minute,
-					 end_display_hour, end_minute,
-					 text);
-			} else {
-				/* 24 hour format without end time. */
-				text = g_strdup_printf
-					("%2i:%02i %s",
-					 start_display_hour, start_minute,
-					 text);
-			}
-		} else {
-			if (day_view->show_event_end_times) {
-				/* 12 hour format with end time. */
-				text = g_strdup_printf
-					("%2i:%02i%s-%2i:%02i%s %s",
-					 start_display_hour, start_minute,
-					 start_suffix,
-					 end_display_hour, end_minute,
-					 end_suffix,
-					 text);
-			} else {
-				/* 12 hour format without end time. */
-				text = g_strdup_printf
-					("%2i:%02i%s %s",
-					 start_display_hour, start_minute,
-					 start_suffix,
-					 text);
-			}
-		}
-
-		free_text = TRUE;
-	}
-
-	gnome_canvas_item_set (event->canvas_item,
-			       "text", text,
-			       NULL);
-
-/*	if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
-				&& e_cal_util_component_has_attendee (event->comp_data->icalcomp))
-		set_text_as_bold (event); */
-
-	if (free_text)
-		g_free (text);
-}
-#endif
-
-#ifdef ENABLE_CAIRO
 static void
 e_day_view_update_event_label (EDayView *day_view,
 			       gint day,
@@ -2556,7 +1834,6 @@
 	if (free_text)
 		g_free (text);
 }
-#endif
 
 static void
 e_day_view_update_long_event_label (EDayView *day_view,
@@ -3792,83 +3069,6 @@
 	return FALSE;
 }
 
-#ifndef ENABLE_CAIRO
-static void
-e_day_view_on_long_event_click (EDayView *day_view,
-				gint event_num,
-				GdkEventButton  *bevent,
-				ECalendarViewPosition pos,
-				gint	     event_x,
-				gint	     event_y)
-{
-	EDayViewEvent *event;
-	gint start_day, end_day, day;
-	gint item_x, item_y, item_w, item_h;
-
-	event = &g_array_index (day_view->long_events, EDayViewEvent,
-				event_num);
-
-	/* Ignore clicks on the EText while editing. */
-	if (pos == E_CALENDAR_VIEW_POS_EVENT
-	    && E_TEXT (event->canvas_item)->editing)
-		return;
-
-	if ((e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
-	     !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
-	    && (pos == E_CALENDAR_VIEW_POS_LEFT_EDGE
-		|| pos == E_CALENDAR_VIEW_POS_RIGHT_EDGE)) {
-		if (!e_day_view_find_long_event_days (event,
-						      day_view->days_shown,
-						      day_view->day_starts,
-						      &start_day, &end_day))
-			return;
-
-		/* Grab the keyboard focus, so the event being edited is saved
-		   and we can use the Escape key to abort the resize. */
-		if (!GTK_WIDGET_HAS_FOCUS (day_view))
-			gtk_widget_grab_focus (GTK_WIDGET (day_view));
-
-		if (gdk_pointer_grab (GTK_LAYOUT (day_view->top_canvas)->bin_window, FALSE,
-				      GDK_POINTER_MOTION_MASK
-				      | GDK_BUTTON_RELEASE_MASK,
-				      FALSE, NULL, bevent->time) == 0) {
-
-			day_view->resize_event_day = E_DAY_VIEW_LONG_EVENT;
-			day_view->resize_event_num = event_num;
-			day_view->resize_drag_pos = pos;
-			day_view->resize_start_row = start_day;
-			day_view->resize_end_row = end_day;
-
-			/* Create the edit rect if necessary. */
-			e_day_view_reshape_resize_long_event_rect_item (day_view);
-
-			/* Make sure the text item is on top. */
-			gnome_canvas_item_raise_to_top (day_view->resize_long_event_rect_item);
-
-			/* Raise the event's item, above the rect as well. */
-			gnome_canvas_item_raise_to_top (event->canvas_item);
-		}
-	} else if (e_day_view_get_long_event_position (day_view, event_num,
-						       &start_day, &end_day,
-						       &item_x, &item_y,
-						       &item_w, &item_h)) {
-		/* Remember the item clicked and the mouse position,
-		   so we can start a drag if the mouse moves. */
-		day_view->pressed_event_day = E_DAY_VIEW_LONG_EVENT;
-		day_view->pressed_event_num = event_num;
-
-		day_view->drag_event_x = event_x;
-		day_view->drag_event_y = event_y;
-
-		e_day_view_convert_position_in_top_canvas (day_view,
-							   event_x, event_y,
-							   &day, NULL);
-		day_view->drag_event_offset = day - start_day;
-	}
-}
-#endif
-
-#ifdef ENABLE_CAIRO
 static void
 e_day_view_on_long_event_click (EDayView *day_view,
 				gint event_num,
@@ -3939,7 +3139,6 @@
 		day_view->drag_event_offset = day - start_day;
 	}
 }
-#endif
 
 static void
 e_day_view_on_event_click (EDayView *day_view,
@@ -3983,116 +3182,36 @@
 			if (day_view->resize_end_row < day_view->resize_start_row)
 				day_view->resize_end_row = day_view->resize_start_row;
 
-			day_view->resize_bars_event_day = day;
-			day_view->resize_bars_event_num = event_num;
-
-			/* Create the edit rect if necessary. */
-			e_day_view_reshape_resize_rect_item (day_view);
-
-			e_day_view_reshape_main_canvas_resize_bars (day_view);
-
-			/* Raise the event's item, above the rect as well. */
-			gnome_canvas_item_raise_to_top (event->canvas_item);
-		}
-
-	} else {
-		/* Remember the item clicked and the mouse position,
-		   so we can start a drag if the mouse moves. */
-		day_view->pressed_event_day = day;
-		day_view->pressed_event_num = event_num;
-
-		day_view->drag_event_x = event_x;
-		day_view->drag_event_y = event_y;
-
-		e_day_view_convert_position_in_main_canvas (day_view,
-							    event_x, event_y,
-							    &tmp_day, &row,
-							    NULL);
-		start_row = event->start_minute / day_view->mins_per_row;
-		day_view->drag_event_offset = row - start_row;
-	}
-}
-
-#ifndef ENABLE_CAIRO
-static void
-e_day_view_reshape_resize_long_event_rect_item (EDayView *day_view)
-{
-	gint event_num, start_day, end_day;
-	gint item_x, item_y, item_w, item_h;
-	gdouble x1, y1, x2, y2;
-
-	event_num = day_view->resize_event_num;
-
-	/* If we're not resizing an event, or the event is not shown,
-	   hide the resize bars. */
-	if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE
-	    || !e_day_view_get_long_event_position (day_view, event_num,
-						    &start_day, &end_day,
-						    &item_x, &item_y,
-						    &item_w, &item_h)) {
-		gnome_canvas_item_hide (day_view->resize_long_event_rect_item);
-		return;
-	}
-
-	x1 = item_x;
-	y1 = item_y;
-	x2 = item_x + item_w - 1;
-	y2 = item_y + item_h - 1;
-
-	gnome_canvas_item_set (day_view->resize_long_event_rect_item,
-			       "x1", x1,
-			       "y1", y1,
-			       "x2", x2,
-			       "y2", y2,
-			       NULL);
-	gnome_canvas_item_show (day_view->resize_long_event_rect_item);
-}
-
+			day_view->resize_bars_event_day = day;
+			day_view->resize_bars_event_num = event_num;
 
-static void
-e_day_view_reshape_resize_rect_item (EDayView *day_view)
-{
-	gint day, event_num;
-	gint item_x, item_y, item_w, item_h;
-	gdouble x1, y1, x2, y2;
+			/* Create the edit rect if necessary. */
+			e_day_view_reshape_resize_rect_item (day_view);
 
-	day = day_view->resize_event_day;
-	event_num = day_view->resize_event_num;
+			e_day_view_reshape_main_canvas_resize_bars (day_view);
 
-	/* If we're not resizing an event, or the event is not shown,
-	   hide the resize bars. */
-	if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE
-	    || !e_day_view_get_event_position (day_view, day, event_num,
-					       &item_x, &item_y,
-					       &item_w, &item_h)) {
-		gnome_canvas_item_hide (day_view->resize_rect_item);
-		return;
-	}
+			/* Raise the event's item, above the rect as well. */
+			gnome_canvas_item_raise_to_top (event->canvas_item);
+		}
 
-	x1 = item_x;
-	y1 = item_y;
-	x2 = item_x + item_w - 1;
-	y2 = item_y + item_h - 1;
+	} else {
+		/* Remember the item clicked and the mouse position,
+		   so we can start a drag if the mouse moves. */
+		day_view->pressed_event_day = day;
+		day_view->pressed_event_num = event_num;
 
-	gnome_canvas_item_set (day_view->resize_rect_item,
-			       "x1", x1 + E_DAY_VIEW_BAR_WIDTH - 1,
-			       "y1", y1,
-			       "x2", x2,
-			       "y2", y2,
-			       NULL);
-	gnome_canvas_item_show (day_view->resize_rect_item);
+		day_view->drag_event_x = event_x;
+		day_view->drag_event_y = event_y;
 
-	gnome_canvas_item_set (day_view->resize_bar_item,
-			       "x1", x1,
-			       "y1", y1,
-			       "x2", x1 + E_DAY_VIEW_BAR_WIDTH - 1,
-			       "y2", y2,
-			       NULL);
-	gnome_canvas_item_show (day_view->resize_bar_item);
+		e_day_view_convert_position_in_main_canvas (day_view,
+							    event_x, event_y,
+							    &tmp_day, &row,
+							    NULL);
+		start_row = event->start_minute / day_view->mins_per_row;
+		day_view->drag_event_offset = row - start_row;
+	}
 }
-#endif
 
-#ifdef ENABLE_CAIRO
 static void
 e_day_view_reshape_resize_long_event_rect_item (EDayView *day_view)
 {
@@ -4143,7 +3262,6 @@
 	x2 = item_x + item_w - 1;
 	y2 = item_y + item_h - 1;
 }
-#endif
 
 static void
 e_day_view_on_event_double_click (EDayView *day_view,
@@ -4330,227 +3448,24 @@
 e_day_view_update_calendar_selection_time (EDayView *day_view)
 {
 	time_t start, end;
-#if 0
-	GnomeCalendar *calendar;
-#endif
-	e_day_view_get_selected_time_range ((ECalendarView *) day_view, &start, &end);
-
-#if 0
-	g_print ("Start: %s", ctime (&start));
-	g_print ("End  : %s", ctime (&end));
-#endif
-
-#if 0
-	calendar = e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view));
-	if (calendar)
-		gnome_calendar_set_selected_time_range (calendar,
-							start, end);
-#endif
-}
-
-#ifndef ENABLE_CAIRO
-static gboolean
-e_day_view_on_top_canvas_motion (GtkWidget *widget,
-				 GdkEventMotion *mevent,
-				 EDayView *day_view)
-{
-	EDayViewEvent *event = NULL;
-	ECalendarViewPosition pos;
-	gint event_x, event_y, canvas_x, canvas_y;
-	gint day, event_num;
-	GdkCursor *cursor;
-
-#if 0
-	g_print ("In e_day_view_on_top_canvas_motion\n");
-#endif
-
-	/* Convert the coords to the main canvas window, or return if the
-	   window is not found. */
-	if (!e_day_view_convert_event_coords (day_view, (GdkEvent*) mevent,
-					      GTK_LAYOUT (widget)->bin_window,
-					      &event_x, &event_y))
-		return FALSE;
-
-	canvas_x = event_x;
-	canvas_y = event_y;
-
-	pos = e_day_view_convert_position_in_top_canvas (day_view,
-							 canvas_x, canvas_y,
-							 &day, &event_num);
-	if (event_num != -1)
-		event = &g_array_index (day_view->long_events, EDayViewEvent,
-					event_num);
-
-	if (day_view->selection_is_being_dragged) {
-		e_day_view_update_selection (day_view, day, -1);
-		return TRUE;
-	} else if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
-		if (pos != E_CALENDAR_VIEW_POS_OUTSIDE) {
-			e_day_view_update_long_event_resize (day_view, day);
-			return TRUE;
-		}
-	} else if (day_view->pressed_event_day == E_DAY_VIEW_LONG_EVENT) {
-		GtkTargetList *target_list;
-
-		event = &g_array_index (day_view->long_events, EDayViewEvent,
-					day_view->pressed_event_num);
-
-		if (!e_cal_util_component_has_recurrences (event->comp_data->icalcomp)
-		    && (abs (canvas_x - day_view->drag_event_x)
-			> E_DAY_VIEW_DRAG_START_OFFSET
-			|| abs (canvas_y - day_view->drag_event_y)
-			> E_DAY_VIEW_DRAG_START_OFFSET)) {
-			day_view->drag_event_day = day_view->pressed_event_day;
-			day_view->drag_event_num = day_view->pressed_event_num;
-			day_view->pressed_event_day = -1;
-
-			/* Hide the horizontal bars. */
-			if (day_view->resize_bars_event_day != -1) {
-				day_view->resize_bars_event_day = -1;
-				day_view->resize_bars_event_num = -1;
-				gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item);
-				gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item);
-			}
-
-			target_list = gtk_target_list_new (target_table,
-							   n_targets);
-			gtk_drag_begin (widget, target_list,
-					GDK_ACTION_COPY | GDK_ACTION_MOVE,
-					1, (GdkEvent*)mevent);
-			gtk_target_list_unref (target_list);
-		}
-	} else {
-		cursor = day_view->normal_cursor;
-
-		/* Recurring events can't be resized. */
-		if (event && !e_cal_util_component_has_recurrences (event->comp_data->icalcomp)) {
-			switch (pos) {
-			case E_CALENDAR_VIEW_POS_LEFT_EDGE:
-			case E_CALENDAR_VIEW_POS_RIGHT_EDGE:
-				cursor = day_view->resize_width_cursor;
-				break;
-			default:
-				break;
-			}
-		}
-
-		/* Only set the cursor if it is different to last one set. */
-		if (day_view->last_cursor_set_in_top_canvas != cursor) {
-			day_view->last_cursor_set_in_top_canvas = cursor;
-			gdk_window_set_cursor (widget->window, cursor);
-		}
-
-	}
-
-	return FALSE;
-}
-
-
-static gboolean
-e_day_view_on_main_canvas_motion (GtkWidget *widget,
-				  GdkEventMotion *mevent,
-				  EDayView *day_view)
-{
-	EDayViewEvent *event = NULL;
-	ECalendarViewPosition pos;
-	gint event_x, event_y, canvas_x, canvas_y;
-	gint row, day, event_num;
-	GdkCursor *cursor;
-
-#if 0
-	g_print ("In e_day_view_on_main_canvas_motion\n");
-#endif
-
-	/* Convert the coords to the main canvas window, or return if the
-	   window is not found. */
-	if (!e_day_view_convert_event_coords (day_view, (GdkEvent*) mevent,
-					      GTK_LAYOUT (widget)->bin_window,
-					      &event_x, &event_y))
-		return FALSE;
-
-	canvas_x = event_x;
-	canvas_y = event_y;
-
-	pos = e_day_view_convert_position_in_main_canvas (day_view,
-							  canvas_x, canvas_y,
-							  &day, &row,
-							  &event_num);
-	if (event_num != -1)
-		event = &g_array_index (day_view->events[day], EDayViewEvent,
-					event_num);
-
-	if (day_view->selection_is_being_dragged) {
-		if (pos != E_CALENDAR_VIEW_POS_OUTSIDE) {
-			e_day_view_update_selection (day_view, day, row);
-			e_day_view_check_auto_scroll (day_view,
-						      event_x, event_y);
-			return TRUE;
-		}
-	} else if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
-		if (pos != E_CALENDAR_VIEW_POS_OUTSIDE) {
-			e_day_view_update_resize (day_view, row);
-			e_day_view_check_auto_scroll (day_view,
-						      event_x, event_y);
-			return TRUE;
-		}
-	} else if (day_view->pressed_event_day != -1
-		   && day_view->pressed_event_day != E_DAY_VIEW_LONG_EVENT) {
-		GtkTargetList *target_list;
-
-		event = &g_array_index (day_view->events[day_view->pressed_event_day], EDayViewEvent, day_view->pressed_event_num);
-
-		if ((abs (canvas_x - day_view->drag_event_x)
-			> E_DAY_VIEW_DRAG_START_OFFSET
-			|| abs (canvas_y - day_view->drag_event_y)
-			> E_DAY_VIEW_DRAG_START_OFFSET)) {
-			day_view->drag_event_day = day_view->pressed_event_day;
-			day_view->drag_event_num = day_view->pressed_event_num;
-			day_view->pressed_event_day = -1;
-
-			/* Hide the horizontal bars. */
-			if (day_view->resize_bars_event_day != -1) {
-				day_view->resize_bars_event_day = -1;
-				day_view->resize_bars_event_num = -1;
-				gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item);
-				gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item);
-			}
-
-			target_list = gtk_target_list_new (target_table,
-							   n_targets);
-			gtk_drag_begin (widget, target_list,
-					GDK_ACTION_COPY | GDK_ACTION_MOVE,
-					1, (GdkEvent*)mevent);
-			gtk_target_list_unref (target_list);
-		}
-	} else {
-		cursor = day_view->normal_cursor;
-
-		if (event) {
-			switch (pos) {
-			case E_CALENDAR_VIEW_POS_LEFT_EDGE:
-				cursor = day_view->move_cursor;
-				break;
-			case E_CALENDAR_VIEW_POS_TOP_EDGE:
-			case E_CALENDAR_VIEW_POS_BOTTOM_EDGE:
-				cursor = day_view->resize_height_cursor;
-				break;
-			default:
-				break;
-			}
-		}
-
-		/* Only set the cursor if it is different to last one set. */
-		if (day_view->last_cursor_set_in_main_canvas != cursor) {
-			day_view->last_cursor_set_in_main_canvas = cursor;
-			gdk_window_set_cursor (widget->window, cursor);
-		}
-	}
+#if 0
+	GnomeCalendar *calendar;
+#endif
+	e_day_view_get_selected_time_range ((ECalendarView *) day_view, &start, &end);
 
-	return FALSE;
-}
+#if 0
+	g_print ("Start: %s", ctime (&start));
+	g_print ("End  : %s", ctime (&end));
+#endif
+
+#if 0
+	calendar = e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view));
+	if (calendar)
+		gnome_calendar_set_selected_time_range (calendar,
+							start, end);
 #endif
+}
 
-#ifdef ENABLE_CAIRO
 static gboolean
 e_day_view_on_top_canvas_motion (GtkWidget *widget,
 				 GdkEventMotion *mevent,
@@ -4746,7 +3661,6 @@
 
 	return FALSE;
 }
-#endif
 
 /* This sets the selection to a single cell. If day is -1 then the current
    start day is reused. If row is -1 then the selection is in the top canvas.
@@ -4864,323 +3778,82 @@
 	gboolean need_reshape = FALSE;
 
 #if 0
-	g_print ("Updating resize Day:%i\n", day);
-#endif
-
-	event_num = day_view->resize_event_num;
-	event = &g_array_index (day_view->long_events, EDayViewEvent,
-				event_num);
-
-	if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_LEFT_EDGE) {
-		day = MIN (day, day_view->resize_end_row);
-		if (day != day_view->resize_start_row) {
-			need_reshape = TRUE;
-			day_view->resize_start_row = day;
-
-		}
-	} else {
-		day = MAX (day, day_view->resize_start_row);
-		if (day != day_view->resize_end_row) {
-			need_reshape = TRUE;
-			day_view->resize_end_row = day;
-		}
-	}
-
-	/* FIXME: Optimise? */
-	if (need_reshape) {
-		e_day_view_reshape_long_event (day_view, event_num);
-		e_day_view_reshape_resize_long_event_rect_item (day_view);
-		gtk_widget_queue_draw (day_view->top_canvas);
-	}
-}
-
-
-static void
-e_day_view_update_resize (EDayView *day_view,
-			  gint row)
-{
-	/* Same thing again? */
-	EDayViewEvent *event;
-	gint day, event_num;
-	gboolean need_reshape = FALSE;
-
-#if 0
-	g_print ("Updating resize Row:%i\n", row);
-#endif
-
-	day = day_view->resize_event_day;
-	event_num = day_view->resize_event_num;
-	event = &g_array_index (day_view->events[day], EDayViewEvent,
-				event_num);
-
-	if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE) {
-		row = MIN (row, day_view->resize_end_row);
-		if (row != day_view->resize_start_row) {
-			need_reshape = TRUE;
-			day_view->resize_start_row = row;
-
-		}
-	} else {
-		row = MAX (row, day_view->resize_start_row);
-		if (row != day_view->resize_end_row) {
-			need_reshape = TRUE;
-			day_view->resize_end_row = row;
-		}
-	}
-
-	/* FIXME: Optimise? */
-	if (need_reshape) {
-		e_day_view_reshape_day_event (day_view, day, event_num);
-		e_day_view_reshape_resize_rect_item (day_view);
-		e_day_view_reshape_main_canvas_resize_bars (day_view);
-		gtk_widget_queue_draw (day_view->main_canvas);
-	}
-}
-
-
-/* This converts the resize start or end row back to a time and updates the
-   event. */
-#ifndef ENABLE_CAIRO
-static void
-e_day_view_finish_long_event_resize (EDayView *day_view)
-{
-	EDayViewEvent *event;
-	gint event_num;
-	ECalComponent *comp;
-	ECalComponentDateTime date;
-	struct icaltimetype itt;
-	time_t dt;
-	ECal *client;
-	CalObjModType mod = CALOBJ_MOD_ALL;
-	GtkWindow *toplevel;
-	int is_date;
-
-	event_num = day_view->resize_event_num;
-	event = &g_array_index (day_view->long_events, EDayViewEvent,
-				event_num);
-
-	client = event->comp_data->client;
-
-	/* We use a temporary copy of the comp since we don't want to
-	   change the original comp here. Otherwise we would not detect that
-	   the event's time had changed in the "update_event" callback. */
-	comp = e_cal_component_new ();
-	e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
-	if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client)) {
-		g_object_unref (comp);
-		e_day_view_abort_resize (day_view);
-		return;
-	}
-
-	date.value = &itt;
-	date.tzid = NULL;
-
-	if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_LEFT_EDGE) {
-		e_cal_component_get_dtstart (comp, &date);
-		is_date = date.value->is_date;
-		if (!is_date)
-			date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-		dt = day_view->day_starts[day_view->resize_start_row];
-		*date.value = icaltime_from_timet_with_zone (dt, is_date,
-							     e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-		e_cal_component_set_dtstart (comp, &date);
-	} else {
-		e_cal_component_get_dtend (comp, &date);
-		is_date = date.value->is_date;
-		if (!is_date)
-			date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-		dt = day_view->day_starts[day_view->resize_end_row + 1];
-		*date.value = icaltime_from_timet_with_zone (dt, is_date,
-							     e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-		e_cal_component_set_dtend (comp, &date);
-	}
-
-	e_cal_component_commit_sequence (comp);
- 	if (e_cal_component_is_instance (comp)) {
- 		if (!recur_component_dialog (client, comp, &mod, NULL, FALSE)) {
- 			gtk_widget_queue_draw (day_view->top_canvas);
-			goto out;
- 		}
-
-		if (mod == CALOBJ_MOD_THIS) {
-			/* set the correct DTSTART/DTEND on the individual recurrence */
-			if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE) {
-				*date.value = icaltime_from_timet_with_zone (
-					event->comp_data->instance_end, FALSE,
-					e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-				e_cal_component_set_dtend (comp, &date);
-			} else {
-				*date.value = icaltime_from_timet_with_zone (
-					event->comp_data->instance_start, FALSE,
-					e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-				e_cal_component_set_dtstart (comp, &date);
-			}
-
-			e_cal_component_set_rdate_list (comp, NULL);
-			e_cal_component_set_rrule_list (comp, NULL);
-			e_cal_component_set_exdate_list (comp, NULL);
-			e_cal_component_set_exrule_list (comp, NULL);
-
-			e_cal_component_commit_sequence (comp);
-		}
-	}
-
-	toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
-	e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
-
- out:
- 	gnome_canvas_item_hide (day_view->resize_long_event_rect_item);
-
- 	day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
-
-	g_object_unref (comp);
-}
-
-
-/* This converts the resize start or end row back to a time and updates the
-   event. */
-static void
-e_day_view_finish_resize (EDayView *day_view)
-{
-	EDayViewEvent *event;
-	gint day, event_num;
-	ECalComponent *comp;
-	ECalComponentDateTime date;
-	struct icaltimetype itt;
-	time_t dt;
-	ECal *client;
-	CalObjModType mod = CALOBJ_MOD_ALL;
-	GtkWindow *toplevel;
-
-	day = day_view->resize_event_day;
-	event_num = day_view->resize_event_num;
-	event = &g_array_index (day_view->events[day], EDayViewEvent,
-				event_num);
-
-	client = event->comp_data->client;
-
-	/* We use a temporary shallow copy of the ico since we don't want to
-	   change the original ico here. Otherwise we would not detect that
-	   the event's time had changed in the "update_event" callback. */
-	comp = e_cal_component_new ();
-	e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
-	if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client))	{
-		g_object_unref (comp);
-		e_day_view_abort_resize (day_view);
-		return;
-	}
-
-	date.value = &itt;
-	/* FIXME: Should probably keep the timezone of the original start
-	   and end times. */
-	date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
-	if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE) {
-		dt = e_day_view_convert_grid_position_to_time (day_view, day, day_view->resize_start_row);
-		*date.value = icaltime_from_timet_with_zone (dt, FALSE,
-							     e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-		e_cal_component_set_dtstart (comp, &date);
-	} else {
-		dt = e_day_view_convert_grid_position_to_time (day_view, day, day_view->resize_end_row + 1);
-		*date.value = icaltime_from_timet_with_zone (dt, FALSE,
-							     e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-		e_cal_component_set_dtend (comp, &date);
-	}
-
-	e_cal_component_commit_sequence (comp);
-
-	if (day_view->last_edited_comp_string != NULL) {
-		g_free (day_view->last_edited_comp_string);
-		day_view->last_edited_comp_string = NULL;
-	}
-
-	day_view->last_edited_comp_string = e_cal_component_get_as_string (comp);
-
-	gnome_canvas_item_hide (day_view->resize_rect_item);
-	gnome_canvas_item_hide (day_view->resize_bar_item);
-
-	/* Hide the horizontal bars. */
-	day_view->resize_bars_event_day = -1;
-	day_view->resize_bars_event_num = -1;
-	gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item);
-	gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item);
-
-	day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
+	g_print ("Updating resize Day:%i\n", day);
+#endif
 
- 	if (e_cal_component_is_instance (comp)) {
- 		if (!recur_component_dialog (client, comp, &mod, NULL, FALSE)) {
- 			gtk_widget_queue_draw (day_view->top_canvas);
-			goto out;
- 		}
+	event_num = day_view->resize_event_num;
+	event = &g_array_index (day_view->long_events, EDayViewEvent,
+				event_num);
 
-		if (mod == CALOBJ_MOD_THIS) {
-			/* set the correct DTSTART/DTEND on the individual recurrence */
-			if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE) {
-				*date.value = icaltime_from_timet_with_zone (
-					event->comp_data->instance_end, FALSE,
-					e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-				e_cal_component_set_dtend (comp, &date);
-			} else {
-				*date.value = icaltime_from_timet_with_zone (
-					event->comp_data->instance_start, FALSE,
-					e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-				e_cal_component_set_dtstart (comp, &date);
-			}
+	if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_LEFT_EDGE) {
+		day = MIN (day, day_view->resize_end_row);
+		if (day != day_view->resize_start_row) {
+			need_reshape = TRUE;
+			day_view->resize_start_row = day;
 
-			e_cal_component_set_rdate_list (comp, NULL);
-			e_cal_component_set_rrule_list (comp, NULL);
-			e_cal_component_set_exdate_list (comp, NULL);
-			e_cal_component_set_exrule_list (comp, NULL);
+		}
+	} else {
+		day = MAX (day, day_view->resize_start_row);
+		if (day != day_view->resize_end_row) {
+			need_reshape = TRUE;
+			day_view->resize_end_row = day;
 		}
 	}
 
-	toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
-
-	e_cal_component_commit_sequence (comp);
-	e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
- out:
-	g_object_unref (comp);
+	/* FIXME: Optimise? */
+	if (need_reshape) {
+		e_day_view_reshape_long_event (day_view, event_num);
+		e_day_view_reshape_resize_long_event_rect_item (day_view);
+		gtk_widget_queue_draw (day_view->top_canvas);
+	}
 }
 
 
 static void
-e_day_view_abort_resize (EDayView *day_view)
+e_day_view_update_resize (EDayView *day_view,
+			  gint row)
 {
+	/* Same thing again? */
+	EDayViewEvent *event;
 	gint day, event_num;
+	gboolean need_reshape = FALSE;
 
-	if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE)
-		return;
-
-	day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
+#if 0
+	g_print ("Updating resize Row:%i\n", row);
+#endif
 
 	day = day_view->resize_event_day;
 	event_num = day_view->resize_event_num;
+	event = &g_array_index (day_view->events[day], EDayViewEvent,
+				event_num);
 
-	if (day == E_DAY_VIEW_LONG_EVENT) {
-		e_day_view_reshape_long_event (day_view, event_num);
-		gtk_widget_queue_draw (day_view->top_canvas);
+	if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE) {
+		row = MIN (row, day_view->resize_end_row);
+		if (row != day_view->resize_start_row) {
+			need_reshape = TRUE;
+			day_view->resize_start_row = row;
 
-		day_view->last_cursor_set_in_top_canvas = day_view->normal_cursor;
-		gdk_window_set_cursor (day_view->top_canvas->window,
-				       day_view->normal_cursor);
-		gnome_canvas_item_hide (day_view->resize_long_event_rect_item);
+		}
 	} else {
+		row = MAX (row, day_view->resize_start_row);
+		if (row != day_view->resize_end_row) {
+			need_reshape = TRUE;
+			day_view->resize_end_row = row;
+		}
+	}
+
+	/* FIXME: Optimise? */
+	if (need_reshape) {
 		e_day_view_reshape_day_event (day_view, day, event_num);
+		e_day_view_reshape_resize_rect_item (day_view);
 		e_day_view_reshape_main_canvas_resize_bars (day_view);
 		gtk_widget_queue_draw (day_view->main_canvas);
-
-		day_view->last_cursor_set_in_main_canvas = day_view->normal_cursor;
-		gdk_window_set_cursor (day_view->main_canvas->window,
-				       day_view->normal_cursor);
-		gnome_canvas_item_hide (day_view->resize_rect_item);
-		gnome_canvas_item_hide (day_view->resize_bar_item);
 	}
 }
-#endif
 
-#ifdef ENABLE_CAIRO
+
+/* This converts the resize start or end row back to a time and updates the
+   event. */
 static void
 e_day_view_finish_long_event_resize (EDayView *day_view)
 {
@@ -5226,6 +3899,8 @@
 							     e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
 		e_cal_component_set_dtstart (comp, &date);
 	} else {
+		ECalComponentDateTime ecdt;
+
 		e_cal_component_get_dtend (comp, &date);
 		is_date = date.value->is_date;
 		if (!is_date)
@@ -5409,7 +4084,6 @@
 				       day_view->normal_cursor);
 	}
 }
-#endif
 
 static void
 e_day_view_free_events (EDayView *day_view)
@@ -5926,64 +4600,6 @@
 
 /* This creates or resizes the horizontal bars used to resize events in the
    main canvas. */
-#ifndef ENABLE_CAIRO
-static void
-e_day_view_reshape_main_canvas_resize_bars (EDayView *day_view)
-{
-	gint day, event_num;
-	gint item_x, item_y, item_w, item_h;
-	gdouble x, y, w, h;
-
-	day = day_view->resize_bars_event_day;
-	event_num = day_view->resize_bars_event_num;
-
-	/* If we're not editing an event, or the event is not shown,
-	   hide the resize bars. */
-	if (day != -1 && day == day_view->drag_event_day
-	    && event_num == day_view->drag_event_num) {
-		g_object_get (G_OBJECT (day_view->drag_rect_item),
-			      "x1", &x,
-			      "y1", &y,
-			      "x2", &w,
-			      "y2", &h,
-			      NULL);
-		w -= x;
-		x++;
-		h -= y;
-	} else if (day != -1
-		   && e_day_view_get_event_position (day_view, day, event_num,
-						     &item_x, &item_y,
-						     &item_w, &item_h)) {
-		x = item_x + E_DAY_VIEW_BAR_WIDTH;
-		y = item_y;
-		w = item_w - E_DAY_VIEW_BAR_WIDTH;
-		h = item_h;
-	} else {
-		gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item);
-		gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item);
-		return;
-	}
-
-	gnome_canvas_item_set (day_view->main_canvas_top_resize_bar_item,
-			       "x1", x - E_DAY_VIEW_BAR_WIDTH,
-			       "y1", y - E_DAY_VIEW_BAR_HEIGHT,
-			       "x2", x + w - 1,
-			       "y2", y - 1,
-			       NULL);
-	gnome_canvas_item_show (day_view->main_canvas_top_resize_bar_item);
-
-	gnome_canvas_item_set (day_view->main_canvas_bottom_resize_bar_item,
-			       "x1", x - E_DAY_VIEW_BAR_WIDTH,
-			       "y1", y + h,
-			       "x2", x + w - 1,
-			       "y2", y + h + E_DAY_VIEW_BAR_HEIGHT - 1,
-			       NULL);
-
-	gnome_canvas_item_show (day_view->main_canvas_bottom_resize_bar_item);
-}
-#endif
-
-#ifdef ENABLE_CAIRO
 static void
 e_day_view_reshape_main_canvas_resize_bars (EDayView *day_view)
 {
@@ -6021,7 +4637,6 @@
 		return;
 	}
 }
-#endif
 
 static void
 e_day_view_ensure_events_sorted (EDayView *day_view)
@@ -7305,151 +5920,70 @@
 	event_num = day_view->editing_event_num;
 
 	if ((day == -1) || (day == E_DAY_VIEW_LONG_EVENT))
-		return FALSE;
-
-	event = &g_array_index (day_view->events[day], EDayViewEvent,
-				event_num);
-	day_view->resize_event_day = day;
-	day_view->resize_event_num = event_num;
-	day_view->resize_bars_event_day = day;
-	day_view->resize_bars_event_num = event_num;
-	resize_start_row = event->start_minute / day_view->mins_per_row;
-	resize_end_row = (event->end_minute - 1) / day_view->mins_per_row;
-	if (resize_end_row < resize_start_row)
-		resize_end_row = resize_start_row;
-
-	switch (direction) {
-	case E_CAL_VIEW_MOVE_UP:
-		if (resize_start_row <= 0)
-			return FALSE;
-		resize_start_row--;
-		resize_end_row--;
-		start_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_start_row);
-		end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
-		break;
-	case E_CAL_VIEW_MOVE_DOWN:
-		if (resize_end_row >= day_view->rows - 1)
-			return FALSE;
-		resize_start_row++;
-		resize_end_row++;
-		start_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_start_row);
-		end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
-		break;
-	case E_CAL_VIEW_MOVE_LEFT:
-		if (day <= 0)
-			return TRUE;
-		start_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_start_row);
-		end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
-		start_time = icaltime_from_timet (start_dt, 0);
-		end_time = icaltime_from_timet (end_dt, 0);
-		icaltime_adjust	(&start_time ,-1,0,0,0);
-		icaltime_adjust	(&end_time ,-1,0,0,0);
-		start_dt = icaltime_as_timet (start_time);
-		end_dt = icaltime_as_timet (end_time);
-		break;
-	case E_CAL_VIEW_MOVE_RIGHT:
-		if (day + 1 >= day_view->days_shown)
-			return TRUE;
-		start_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_start_row);
-		end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
-		start_time = icaltime_from_timet (start_dt, 0);
-		end_time = icaltime_from_timet (end_dt, 0);
-		icaltime_adjust	(&start_time ,1,0,0,0);
-		icaltime_adjust	(&end_time ,1,0,0,0);
-		start_dt = icaltime_as_timet (start_time);
-		end_dt = icaltime_as_timet (end_time);
-		break;
-	default:
-		return FALSE;
-	}
-
-	e_day_view_change_event_time (day_view, start_dt, end_dt);
-	e_day_view_ensure_rows_visible (day_view, resize_start_row, resize_end_row);
-
-	return TRUE;
-}
-
-#ifndef ENABLE_CAIRO
-static void
-e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt)
-{
-	EDayViewEvent *event;
-	gint day, event_num;
-	ECalComponent *comp;
-	ECalComponentDateTime date;
-	struct icaltimetype itt;
-	ECal *client;
-	CalObjModType mod = CALOBJ_MOD_ALL;
-	GtkWindow *toplevel;
-
-	day = day_view->editing_event_day;
-	event_num = day_view->editing_event_num;
-	event = &g_array_index (day_view->events[day], EDayViewEvent,
-				event_num);
-	client = event->comp_data->client;
-
-	/* We use a temporary shallow copy of the ico since we don't want to
-	   change the original ico here. Otherwise we would not detect that
-	   the event's time had changed in the "update_event" callback. */
-	comp = e_cal_component_new ();
-	e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
-	if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client))	{
-		g_object_unref (comp);
-		return;
-	}
-
-	date.value = &itt;
-	/* FIXME: Should probably keep the timezone of the original start
-	   and end times. */
-	date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
-	*date.value = icaltime_from_timet_with_zone (start_dt, FALSE,
-						     e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-	e_cal_component_set_dtstart (comp, &date);
-	*date.value = icaltime_from_timet_with_zone (end_dt, FALSE,
-						     e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-	e_cal_component_set_dtend (comp, &date);
-
-	e_cal_component_commit_sequence (comp);
-
-	if (day_view->last_edited_comp_string != NULL) {
-		g_free (day_view->last_edited_comp_string);
-		day_view->last_edited_comp_string = NULL;
-	}
-
-	day_view->last_edited_comp_string = e_cal_component_get_as_string (comp);
-
-	gnome_canvas_item_hide (day_view->resize_rect_item);
-	gnome_canvas_item_hide (day_view->resize_bar_item);
-
-	day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
+		return FALSE;
 
- 	if (e_cal_component_is_instance (comp)) {
- 		if (!recur_component_dialog (client, comp, &mod, NULL, FALSE)) {
- 			gtk_widget_queue_draw (day_view->top_canvas);
-			goto out;
- 		}
+	event = &g_array_index (day_view->events[day], EDayViewEvent,
+				event_num);
+	day_view->resize_event_day = day;
+	day_view->resize_event_num = event_num;
+	day_view->resize_bars_event_day = day;
+	day_view->resize_bars_event_num = event_num;
+	resize_start_row = event->start_minute / day_view->mins_per_row;
+	resize_end_row = (event->end_minute - 1) / day_view->mins_per_row;
+	if (resize_end_row < resize_start_row)
+		resize_end_row = resize_start_row;
 
-		if (mod == CALOBJ_MOD_THIS) {
-			e_cal_component_set_rdate_list (comp, NULL);
-			e_cal_component_set_rrule_list (comp, NULL);
-			e_cal_component_set_exdate_list (comp, NULL);
-			e_cal_component_set_exrule_list (comp, NULL);
-		}
+	switch (direction) {
+	case E_CAL_VIEW_MOVE_UP:
+		if (resize_start_row <= 0)
+			return FALSE;
+		resize_start_row--;
+		resize_end_row--;
+		start_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_start_row);
+		end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
+		break;
+	case E_CAL_VIEW_MOVE_DOWN:
+		if (resize_end_row >= day_view->rows - 1)
+			return FALSE;
+		resize_start_row++;
+		resize_end_row++;
+		start_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_start_row);
+		end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
+		break;
+	case E_CAL_VIEW_MOVE_LEFT:
+		if (day <= 0)
+			return TRUE;
+		start_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_start_row);
+		end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
+		start_time = icaltime_from_timet (start_dt, 0);
+		end_time = icaltime_from_timet (end_dt, 0);
+		icaltime_adjust	(&start_time ,-1,0,0,0);
+		icaltime_adjust	(&end_time ,-1,0,0,0);
+		start_dt = icaltime_as_timet (start_time);
+		end_dt = icaltime_as_timet (end_time);
+		break;
+	case E_CAL_VIEW_MOVE_RIGHT:
+		if (day + 1 >= day_view->days_shown)
+			return TRUE;
+		start_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_start_row);
+		end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
+		start_time = icaltime_from_timet (start_dt, 0);
+		end_time = icaltime_from_timet (end_dt, 0);
+		icaltime_adjust	(&start_time ,1,0,0,0);
+		icaltime_adjust	(&end_time ,1,0,0,0);
+		start_dt = icaltime_as_timet (start_time);
+		end_dt = icaltime_as_timet (end_time);
+		break;
+	default:
+		return FALSE;
 	}
 
-	toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
-
-	e_cal_component_commit_sequence (comp);
-	e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
+	e_day_view_change_event_time (day_view, start_dt, end_dt);
+	e_day_view_ensure_rows_visible (day_view, resize_start_row, resize_end_row);
 
-out:
-	g_object_unref (comp);
+	return TRUE;
 }
-#endif
 
-#ifdef ENABLE_CAIRO
 static void
 e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt)
 {
@@ -7524,7 +6058,6 @@
 out:
 	g_object_unref (comp);
 }
-#endif
 
 static void
 e_day_view_change_event_end_time_up (EDayView *day_view)
@@ -7641,167 +6174,6 @@
 	g_signal_emit_by_name (day_view, "selection_changed");
 }
 
-#ifndef ENABLE_CAIRO
-static void
-e_day_view_on_editing_stopped (EDayView *day_view,
-			       GnomeCanvasItem *item)
-{
-	gint day, event_num;
-	EDayViewEvent *event;
-	gchar *text = NULL;
-	ECalComponentText summary;
-	ECalComponent *comp;
-	ECal *client;
-	gboolean on_server;
-
-	/* Note: the item we are passed here isn't reliable, so we just stop
-	   the edit of whatever item was being edited. We also receive this
-	   event twice for some reason. */
-	day = day_view->editing_event_day;
-	event_num = day_view->editing_event_num;
-
-#if 0
-	g_print ("In e_day_view_on_editing_stopped Day:%i Event:%i\n",
-		 day, event_num);
-#endif
-
-	/* If no item is being edited, just return. */
-	if (day == -1)
-		return;
-
-	if (day == E_DAY_VIEW_LONG_EVENT) {
-		event = &g_array_index (day_view->long_events, EDayViewEvent,
-					event_num);
-	} else {
-		event = &g_array_index (day_view->events[day], EDayViewEvent,
-					event_num);
-
-		/* Hide the horizontal bars. */
-		gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item);
-		gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item);
-	}
-
-	/* Reset the edit fields. */
-	day_view->editing_event_day = -1;
-	day_view->editing_event_num = -1;
-
-	day_view->resize_bars_event_day = -1;
-	day_view->resize_bars_event_num = -1;
-
-	g_object_set (event->canvas_item, "handle_popup", FALSE, NULL);
-	g_object_get (G_OBJECT (event->canvas_item),
-		      "text", &text,
-		      NULL);
-	g_return_if_fail (text != NULL);
-
-	comp = e_cal_component_new ();
-	e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
-	client = event->comp_data->client;
-	on_server = cal_comp_is_on_server (comp, client);
-
-	if (string_is_empty (text) && !on_server) {
-		const char *uid;
-
-		e_cal_component_get_uid (comp, &uid);
-
-		e_day_view_foreach_event_with_uid (day_view, uid,
-						   e_day_view_remove_event_cb, NULL);
-		e_day_view_check_layout (day_view);
-		gtk_widget_queue_draw (day_view->top_canvas);
-		gtk_widget_queue_draw (day_view->main_canvas);
-		goto out;
-	}
-
-	/* Only update the summary if necessary. */
-	e_cal_component_get_summary (comp, &summary);
-	if (summary.value && !strcmp (text, summary.value)) {
-		if (day == E_DAY_VIEW_LONG_EVENT)
-			e_day_view_reshape_long_event (day_view, event_num);
-		else
-			e_day_view_update_event_label (day_view, day,
-						       event_num);
-	} else if (summary.value || !string_is_empty (text)) {
-		icalcomponent *icalcomp = e_cal_component_get_icalcomponent (comp);
-
-		summary.value = text;
-		summary.altrep = NULL;
-		e_cal_component_set_summary (comp, &summary);
-		e_cal_component_commit_sequence (comp);
-
-		if (!on_server) {
-			if (!e_cal_create_object (client, icalcomp, NULL, NULL))
-				g_message (G_STRLOC ": Could not create the object!");
-			else
-				gnome_calendar_emit_user_created_signal (day_view, e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view)), client);
-
-			/* we remove the object since we either got the update from the server or failed */
-			e_day_view_remove_event_cb (day_view, day, event_num, NULL);
-		} else {
-			CalObjModType mod = CALOBJ_MOD_ALL;
-			GtkWindow *toplevel;
-			if (e_cal_component_is_instance (comp)) {
-				if (!recur_component_dialog (client, comp, &mod, NULL, FALSE)) {
-					goto out;
-				}
-
-				if (mod == CALOBJ_MOD_THIS) {
-					ECalComponentDateTime dt;
-
-					e_cal_component_get_dtstart (comp, &dt);
-					if (dt.value->zone) {
-						*dt.value = icaltime_from_timet_with_zone (
-							event->comp_data->instance_start,
-							dt.value->is_date,
-							dt.value->zone);
-					} else {
-						*dt.value = icaltime_from_timet_with_zone (
-							event->comp_data->instance_start,
-							dt.value->is_date,
-							e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-					}
-					e_cal_component_set_dtstart (comp, &dt);
-
-					e_cal_component_get_dtend (comp, &dt);
-					if (dt.value->zone) {
-						*dt.value = icaltime_from_timet_with_zone (
-							event->comp_data->instance_end,
-							dt.value->is_date,
-							dt.value->zone);
-					} else {
-						*dt.value = icaltime_from_timet_with_zone (
-							event->comp_data->instance_end,
-							dt.value->is_date,
-							e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-					}
-					e_cal_component_set_dtend (comp, &dt);
-
-					e_cal_component_set_rdate_list (comp, NULL);
-					e_cal_component_set_rrule_list (comp, NULL);
-					e_cal_component_set_exdate_list (comp, NULL);
-					e_cal_component_set_exrule_list (comp, NULL);
-
-					e_cal_component_commit_sequence (comp);
-				}
-			}
-
-			/* FIXME When sending here, what exactly should we send? */
-			toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
-			e_calendar_view_modify_and_send (comp, client, mod, toplevel, FALSE);
-		}
-
-	}
-
- out:
-
-	g_object_unref (comp);
-	g_free (text);
-
-	g_signal_emit_by_name (day_view, "selection_changed");
-}
-#endif
-
-#ifdef ENABLE_CAIRO
 static void
 e_day_view_on_editing_stopped (EDayView *day_view,
 			       GnomeCanvasItem *item)
@@ -7957,8 +6329,6 @@
 
 	g_signal_emit_by_name (day_view, "selection_changed");
 }
-#endif
-
 
 /* FIXME: It is possible that we may produce an invalid time due to daylight
    saving times (i.e. when clocks go forward there is a range of time which
@@ -8786,31 +7156,6 @@
 	gnome_canvas_item_hide (day_view->drag_long_event_item);
 }
 
-#ifndef ENABLE_CAIRO
-static void
-e_day_view_on_main_canvas_drag_leave (GtkWidget      *widget,
-				      GdkDragContext *context,
-				      guint           time,
-				      EDayView	     *day_view)
-{
-	day_view->drag_last_day = -1;
-
-	e_day_view_stop_auto_scroll (day_view);
-
-	gnome_canvas_item_hide (day_view->drag_rect_item);
-	gnome_canvas_item_hide (day_view->drag_bar_item);
-	gnome_canvas_item_hide (day_view->drag_item);
-
-	/* Hide the resize bars if they are being used in the drag. */
-	if (day_view->drag_event_day == day_view->resize_bars_event_day
-	    && day_view->drag_event_num == day_view->resize_bars_event_num) {
-		gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item);
-		gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item);
-	}
-}
-#endif
-
-#ifdef ENABLE_CAIRO
 static void
 e_day_view_on_main_canvas_drag_leave (GtkWidget      *widget,
 				      GdkDragContext *context,
@@ -8830,7 +7175,6 @@
 	    && day_view->drag_event_num == day_view->resize_bars_event_num) {
 	}
 }
-#endif
 
 static void
 e_day_view_on_drag_begin (GtkWidget      *widget,

Modified: branches/mbarnes-composer/calendar/gui/e-memos.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/e-memos.c	(original)
+++ branches/mbarnes-composer/calendar/gui/e-memos.c	Wed Mar 26 19:54:10 2008
@@ -1153,7 +1153,7 @@
 					 "memos",
 					 NULL);
 		dir1 = g_build_filename (memos_component_peek_base_directory (memos_component_peek ()),
-					 "memos", "views", NULL);
+					 "views", NULL);
 		gal_view_collection_set_storage_directories (collection,
 							     dir0,
 							     dir1);

Modified: branches/mbarnes-composer/calendar/gui/e-week-view-event-item.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/e-week-view-event-item.c	(original)
+++ branches/mbarnes-composer/calendar/gui/e-week-view-event-item.c	Wed Mar 26 19:54:10 2008
@@ -208,592 +208,6 @@
 /*
  * DRAWING ROUTINES - functions to paint the canvas item.
  */
-#ifndef ENABLE_CAIRO
-static void
-e_week_view_event_item_draw (GnomeCanvasItem  *canvas_item,
-			     GdkDrawable      *drawable,
-			     int	       x,
-			     int	       y,
-			     int	       width,
-			     int	       height)
-{
-	EWeekViewEventItem *wveitem;
-	EWeekView *week_view;
-	EWeekViewEvent *event;
-	EWeekViewEventSpan *span;
-	GdkGC *gc;
-	gint x1, y1, x2, y2, time_x, time_y;
-	gint icon_x, icon_y, time_width, min_end_time_x, max_icon_x;
-	gint rect_x, rect_w, rect_x2;
-	gboolean one_day_event, editing_span = FALSE;
-	gint start_hour, start_minute, end_hour, end_minute;
-	gboolean draw_start, draw_end;
-	gboolean draw_start_triangle = FALSE, draw_end_triangle = FALSE;
-	GdkRectangle clip_rect;
-	GdkColor bg_color;
-
-#if 0
-	g_print ("In e_week_view_event_item_draw %i,%i %ix%i\n",
-		 x, y, width, height);
-#endif
-
-	wveitem = E_WEEK_VIEW_EVENT_ITEM (canvas_item);
-	week_view = E_WEEK_VIEW (GTK_WIDGET (canvas_item->canvas)->parent);
-	g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
-	if (wveitem->event_num == -1 || wveitem->span_num == -1)
-		return;
-
-	g_return_if_fail(wveitem->event_num < week_view->events->len);
-
-	event = &g_array_index (week_view->events, EWeekViewEvent,
-				wveitem->event_num);
-
-	g_return_if_fail(event->spans_index + wveitem->span_num < week_view->spans->len);
-
-	span = &g_array_index (week_view->spans, EWeekViewEventSpan,
-			       event->spans_index + wveitem->span_num);
-
-	gc = week_view->main_gc;
-
-	x1 = canvas_item->x1 - x;
-	y1 = canvas_item->y1 - y;
-	x2 = canvas_item->x2 - x;
-	y2 = canvas_item->y2 - y;
-
-	if (x1 == x2 || y1 == y2)
-		return;
-
-	icon_x = 0;
-	icon_y = y1 + E_WEEK_VIEW_EVENT_BORDER_HEIGHT + E_WEEK_VIEW_ICON_Y_PAD;
-
-	/* Get the start & end times in 24-hour format. */
-	start_hour = event->start_minute / 60;
-	start_minute = event->start_minute % 60;
-
-	/* Modulo 24 because a midnight end time will be '24' */
-	end_hour = (event->end_minute / 60) % 24;
-	end_minute = event->end_minute % 60;
-
-	time_y = y1 + E_WEEK_VIEW_EVENT_BORDER_HEIGHT
-		+ E_WEEK_VIEW_EVENT_TEXT_Y_PAD;
-
-	time_width = e_week_view_get_time_string_width (week_view);
-
-	one_day_event = e_week_view_is_one_day_event (week_view,
-						      wveitem->event_num);
-	if (one_day_event) {
-		time_x = x1 + E_WEEK_VIEW_EVENT_L_PAD + 1;
-		rect_x = x1 + E_WEEK_VIEW_EVENT_L_PAD;
-		rect_w = x2 - x1 - E_WEEK_VIEW_EVENT_L_PAD - E_WEEK_VIEW_EVENT_R_PAD + 1;
-
-		if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)),
-									  event->comp_data),
-				     &bg_color)) {
-			GdkColormap *colormap;
-
-			colormap = gtk_widget_get_colormap (GTK_WIDGET (week_view));
-			if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE))
-				gdk_gc_set_foreground (gc, &bg_color);
-			else
-				gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]);
-		} else
-			gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]);
-		gdk_draw_rectangle (drawable, gc, TRUE, rect_x, y1 + 1, rect_w, y2 - y1 - 1);
-
-		gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER]);
-		gdk_draw_line (drawable, gc, rect_x,  y1 + 1, rect_x + rect_w, y1 + 1);
-		gdk_draw_line (drawable, gc, rect_x,  y2, rect_x + rect_w, y2);
-		gdk_draw_line (drawable, gc, rect_x, y1 + 1, rect_x, y1 + (y2 - (y1 + 1)));
-		gdk_draw_line (drawable, gc, rect_x + rect_w, y1 + 1, rect_x + rect_w, y1 + (y2 - (y1 + 1)));
-
-		/* Draw the start and end times, as required. */
-		switch (week_view->time_format) {
-		case E_WEEK_VIEW_TIME_BOTH_SMALL_MIN:
-		case E_WEEK_VIEW_TIME_BOTH:
-			draw_start = TRUE;
-			draw_end = TRUE;
-			break;
-
-		case E_WEEK_VIEW_TIME_START_SMALL_MIN:
-		case E_WEEK_VIEW_TIME_START:
-			draw_start = TRUE;
-			draw_end = FALSE;
-			break;
-
-		case E_WEEK_VIEW_TIME_NONE:
-			draw_start = FALSE;
-			draw_end = FALSE;
-			break;
-		default:
-			g_return_if_reached();
-			draw_start = FALSE;
-			draw_end = FALSE;
-			break;
-		}
-
-		if (draw_start) {
-			e_week_view_draw_time (week_view, drawable,
-					       time_x, time_y,
-					       start_hour, start_minute);
-			time_x += time_width;
-		}
-
-		if (draw_end) {
-			time_x += E_WEEK_VIEW_EVENT_TIME_SPACING;
-			e_week_view_draw_time (week_view, drawable,
-					       time_x, time_y,
-					       end_hour, end_minute);
-			time_x += time_width;
-		}
-
-		icon_x = time_x;
-		if (draw_start)
-			icon_x += E_WEEK_VIEW_EVENT_TIME_X_PAD;
-
-		/* Draw the icons. */
-		e_week_view_event_item_draw_icons (wveitem, drawable,
-						   icon_x, icon_y,
-						   x2, FALSE);
-
-	} else {
-		rect_x = x1 + E_WEEK_VIEW_EVENT_L_PAD;
-		rect_w = x2 - x1 - E_WEEK_VIEW_EVENT_L_PAD
-			- E_WEEK_VIEW_EVENT_R_PAD + 1;
-
-		/* Draw the triangles at the start & end, if needed.
-		   They also use the first few pixels at the edge of the
-		   event so we update rect_x & rect_w so we don't draw over
-		   them. */
-		if (event->start < week_view->day_starts[span->start_day]) {
-			draw_start_triangle = TRUE;
-			rect_x += 2;
-			rect_w -= 2;
-		}
-
-		if (event->end > week_view->day_starts[span->start_day
-						      + span->num_days]) {
-			draw_end_triangle = TRUE;
-			rect_w -= 2;
-		}
-
-		if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)),
-									  event->comp_data),
-				     &bg_color)) {
-			GdkColormap *colormap;
-
-			colormap = gtk_widget_get_colormap (GTK_WIDGET (week_view));
-			if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE))
-				gdk_gc_set_foreground (gc, &bg_color);
-			else
-				gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]);
-		} else
-			gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]);
-		gdk_draw_rectangle (drawable, gc, TRUE, rect_x, y1 + 1, rect_w, y2 - y1 - 1);
-
-		gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER]);
-		rect_x2 = rect_x + rect_w - 1;
-		gdk_draw_line (drawable, gc, rect_x,  y1, rect_x2, y1);
-		gdk_draw_line (drawable, gc, rect_x,  y2, rect_x2, y2);
-
-		if (draw_start_triangle) {
-			e_week_view_event_item_draw_triangle (wveitem, drawable, x1 + E_WEEK_VIEW_EVENT_L_PAD + 2, y1, -3, y2 - y1 + 1);
-		} else {
-			gdk_draw_line (drawable, gc, rect_x,  y1, rect_x, y2);
-		}
-
-		if (draw_end_triangle) {
-			e_week_view_event_item_draw_triangle (wveitem, drawable, x2 - E_WEEK_VIEW_EVENT_R_PAD - 2, y1, 3, y2 - y1 + 1);
-		} else {
-			gdk_draw_line (drawable, gc, rect_x2, y1, rect_x2, y2);
-		}
-
-		if (span->text_item && E_TEXT (span->text_item)->editing)
-			editing_span = TRUE;
-
-		/* Draw the start & end times, if they are not on day
-		   boundaries. The start time would always be shown if it was
-		   needed, though it may be clipped as the window shrinks.
-		   The end time is only displayed if there is enough room.
-		   We calculate the minimum position for the end time, which
-		   depends on whether the start time is displayed. If the end
-		   time doesn't fit, then we don't draw it. */
-		min_end_time_x = x1 + E_WEEK_VIEW_EVENT_L_PAD
-			+ E_WEEK_VIEW_EVENT_BORDER_WIDTH
-			+ E_WEEK_VIEW_EVENT_EDGE_X_PAD;
-		if (!editing_span
-		    && event->start > week_view->day_starts[span->start_day]) {
-			time_x = x1 + E_WEEK_VIEW_EVENT_L_PAD
-				+ E_WEEK_VIEW_EVENT_BORDER_WIDTH
-				+ E_WEEK_VIEW_EVENT_EDGE_X_PAD;
-
-			clip_rect.x = x1;
-			clip_rect.y = y1;
-			clip_rect.width = x2 - x1 - E_WEEK_VIEW_EVENT_R_PAD
-				- E_WEEK_VIEW_EVENT_BORDER_WIDTH + 1;
-			clip_rect.height = y2 - y1 + 1;
-			gdk_gc_set_clip_rectangle (gc, &clip_rect);
-
-			gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_TEXT]);
-
-			e_week_view_draw_time (week_view, drawable,
-					       time_x, time_y,
-					       start_hour, start_minute);
-
-			gdk_gc_set_clip_rectangle (gc, NULL);
-
-			/* We don't want the end time to be drawn over the
-			   start time, so we increase the minimum position. */
-			min_end_time_x += time_width
-				+ E_WEEK_VIEW_EVENT_TIME_X_PAD;
-		}
-
-		max_icon_x = x2 + 1 - E_WEEK_VIEW_EVENT_R_PAD
-			- E_WEEK_VIEW_EVENT_BORDER_WIDTH
-			- E_WEEK_VIEW_EVENT_EDGE_X_PAD;
-
-		if (!editing_span
-		    && event->end < week_view->day_starts[span->start_day
-							 + span->num_days]) {
-			/* Calculate where the end time should be displayed. */
-			time_x = x2 + 1 - E_WEEK_VIEW_EVENT_R_PAD
-				- E_WEEK_VIEW_EVENT_BORDER_WIDTH
-				- E_WEEK_VIEW_EVENT_EDGE_X_PAD
-				- time_width;
-
-			/* Draw the end time, if the position is greater than
-			   the minimum calculated above. */
-			if (time_x >= min_end_time_x) {
-				e_week_view_draw_time (week_view, drawable,
-						       time_x, time_y,
-						       end_hour, end_minute);
-				max_icon_x -= time_width
-					+ E_WEEK_VIEW_EVENT_TIME_X_PAD;
-			}
-		}
-
-		/* Draw the icons. */
-		if (span->text_item
-		    && (week_view->editing_event_num != wveitem->event_num
-			|| week_view->editing_span_num != wveitem->span_num)) {
-			icon_x = span->text_item->x1 - E_WEEK_VIEW_ICON_R_PAD - x;
-			e_week_view_event_item_draw_icons (wveitem, drawable,
-							   icon_x, icon_y,
-							   max_icon_x, TRUE);
-		}
-	}
-}
-
-
-static void
-e_week_view_draw_time	(EWeekView	*week_view,
-			 GdkDrawable	*drawable,
-			 gint		 time_x,
-			 gint		 time_y,
-			 gint		 hour,
-			 gint		 minute)
-{
-	GtkStyle *style;
-	GdkGC *gc;
-	gint hour_to_display, suffix_width;
-	gint time_y_normal_font, time_y_small_font;
-	gchar buffer[128], *suffix;
-	PangoLayout *layout;
-	PangoFontDescription *small_font_desc;
-
-	style = gtk_widget_get_style (GTK_WIDGET (week_view));
-	small_font_desc = week_view->small_font_desc;
-	gc = week_view->main_gc;
-
-	gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_TEXT]);
-
-	layout = gtk_widget_create_pango_layout (GTK_WIDGET (week_view), NULL);
-
-	time_y_normal_font = time_y_small_font = time_y;
-	if (small_font_desc)
-		time_y_small_font = time_y;
-
-	e_week_view_convert_time_to_display (week_view, hour, &hour_to_display,
-					     &suffix, &suffix_width);
-
-	if (week_view->use_small_font && week_view->small_font_desc) {
-		g_snprintf (buffer, sizeof (buffer), "%2i:%02i",
-			    hour_to_display, minute);
-
-		/* Draw the hour. */
-		if (hour_to_display < 10) {
-			pango_layout_set_text (layout, buffer + 1, 1);
-			gdk_draw_layout (drawable, gc,
-					 time_x + week_view->digit_width,
-					 time_y_normal_font,
-					 layout);
-		} else {
-			pango_layout_set_text (layout, buffer, 2);
-			gdk_draw_layout (drawable, gc,
-					 time_x,
-					 time_y_normal_font,
-					 layout);
-		}
-
-		time_x += week_view->digit_width * 2;
-
-		/* Draw the start minute, in the small font. */
-		pango_layout_set_font_description (layout, week_view->small_font_desc);
-		pango_layout_set_text (layout, buffer + 3, 2);
-		gdk_draw_layout (drawable, gc,
-				 time_x,
-				 time_y_small_font,
-				 layout);
-
-		pango_layout_set_font_description (layout, style->font_desc);
-
-		time_x += week_view->small_digit_width * 2;
-
-		/* Draw the 'am'/'pm' suffix, if 12-hour format. */
-		if (!e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (week_view))) {
-			pango_layout_set_text (layout, suffix, -1);
-			gdk_draw_layout (drawable, gc,
-					 time_x,
-					 time_y_normal_font,
-					 layout);
-		}
-	} else {
-		/* Draw the start time in one go. */
-		g_snprintf (buffer, sizeof (buffer), "%2i:%02i%s",
-			    hour_to_display, minute, suffix);
-		if (hour_to_display < 10) {
-			pango_layout_set_text (layout, buffer + 1, -1);
-			gdk_draw_layout (drawable, gc,
-					 time_x + week_view->digit_width,
-					 time_y_normal_font,
-					 layout);
-		} else {
-			pango_layout_set_text (layout, buffer, -1);
-			gdk_draw_layout (drawable, gc,
-					 time_x,
-					 time_y_normal_font,
-					 layout);
-		}
-
-	}
-
-	g_object_unref (layout);
-}
-
-
-static void
-e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
-				   GdkDrawable        *drawable,
-				   gint		       icon_x,
-				   gint		       icon_y,
-				   gint		       x2,
-				   gboolean	       right_align)
-{
-	EWeekView *week_view;
-	EWeekViewEvent *event;
-	ECalComponent *comp;
-	GdkGC *gc;
-	gint num_icons = 0, icon_x_inc;
-	gboolean draw_reminder_icon = FALSE, draw_recurrence_icon = FALSE;
-	gboolean draw_timezone_icon = FALSE, draw_attach_icon = FALSE;
-	gboolean draw_meeting_icon = FALSE;
-	GSList *categories_list, *elem;
-
-	week_view = E_WEEK_VIEW (GTK_WIDGET (GNOME_CANVAS_ITEM (wveitem)->canvas)->parent);
-
-	event = &g_array_index (week_view->events, EWeekViewEvent,
-				wveitem->event_num);
-	comp = e_cal_component_new ();
-	e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
-	gc = week_view->main_gc;
-
-	if (e_cal_component_has_alarms (comp)) {
-		draw_reminder_icon = TRUE;
-		num_icons++;
-	}
-
-	if (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp)) {
-		draw_recurrence_icon = TRUE;
-		num_icons++;
-	}
-
-	if (e_cal_component_has_attachments (comp)) {
-		draw_attach_icon = TRUE;
-		num_icons++;
-	}
-
-	if (e_cal_component_has_organizer (comp)) {
-		draw_meeting_icon = TRUE;
-		num_icons++;
-	}
-
-	if (event->different_timezone) {
-		draw_timezone_icon = TRUE;
-		num_icons++;
-	}
-
-	num_icons += cal_comp_util_get_n_icons (comp);
-	e_cal_component_get_categories_list (comp, &categories_list);
-
-	icon_x_inc = E_WEEK_VIEW_ICON_WIDTH + E_WEEK_VIEW_ICON_X_PAD;
-
-	if (right_align)
-		icon_x -= icon_x_inc * num_icons;
-
-	if (draw_reminder_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
-		gdk_gc_set_clip_mask (gc, NULL);
-		gdk_draw_pixbuf (drawable, gc,
-				 week_view->reminder_icon,
-				 0, 0, icon_x, icon_y,
-				 E_WEEK_VIEW_ICON_WIDTH,
-				 E_WEEK_VIEW_ICON_HEIGHT,
-				 GDK_RGB_DITHER_NORMAL,
-				 0, 0);
-		icon_x += icon_x_inc;
-	}
-
-	if (draw_attach_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
-		gdk_gc_set_clip_mask (gc, NULL);
-		gdk_draw_pixbuf (drawable, gc,
-				 week_view->attach_icon,
-				 0, 0, icon_x, icon_y,
-				 E_WEEK_VIEW_ICON_WIDTH,
-				 E_WEEK_VIEW_ICON_HEIGHT,
-				 GDK_RGB_DITHER_NORMAL,
-				 0, 0);
-		icon_x += icon_x_inc;
-	}
-
-	if (draw_recurrence_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
-		gdk_gc_set_clip_mask (gc, NULL);
-		gdk_draw_pixbuf (drawable, gc,
-				 week_view->recurrence_icon,
-				 0, 0, icon_x, icon_y,
-				 E_WEEK_VIEW_ICON_WIDTH,
-				 E_WEEK_VIEW_ICON_HEIGHT,
-				 GDK_RGB_DITHER_NORMAL,
-				 0, 0);
-		icon_x += icon_x_inc;
-	}
-
-	if (draw_timezone_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
-		gdk_gc_set_clip_mask (gc, NULL);
-		gdk_draw_pixbuf (drawable, gc,
-				 week_view->timezone_icon,
-				 0, 0, icon_x, icon_y,
-				 E_WEEK_VIEW_ICON_WIDTH,
-				 E_WEEK_VIEW_ICON_HEIGHT,
-				 GDK_RGB_DITHER_NORMAL,
-				 0, 0);
-		icon_x += icon_x_inc;
-	}
-
-	if (draw_meeting_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
-		gdk_gc_set_clip_mask (gc, NULL);
-		gdk_draw_pixbuf (drawable, gc,
-				 week_view->meeting_icon,
-				 0, 0, icon_x, icon_y,
-				 E_WEEK_VIEW_ICON_WIDTH,
-				 E_WEEK_VIEW_ICON_HEIGHT,
-				 GDK_RGB_DITHER_NORMAL,
-				 0, 0);
-		icon_x += icon_x_inc;
-	}
-
-	/* draw categories icons */
-	for (elem = categories_list; elem; elem = elem->next) {
-		char *category;
-		GdkPixmap *pixmap = NULL;
-		GdkBitmap *mask = NULL;
-
-		category = (char *) elem->data;
-		if (!e_categories_config_get_icon_for (category, &pixmap, &mask))
-			continue;
-
-		if (icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
-			gdk_gc_set_clip_origin (gc, icon_x, icon_y);
-			if (mask != NULL)
-				gdk_gc_set_clip_mask (gc, mask);
-			gdk_draw_drawable (drawable, gc,
-					 pixmap,
-					 0, 0, icon_x, icon_y,
-					 E_WEEK_VIEW_ICON_WIDTH,
-					 E_WEEK_VIEW_ICON_HEIGHT);
-			icon_x += icon_x_inc;
-		}
-		g_object_unref (pixmap);
-		if (mask != NULL)
-			g_object_unref (mask);
-	}
-
-	e_cal_component_free_categories_list (categories_list);
-	g_object_unref(comp);
-
-	gdk_gc_set_clip_mask (gc, NULL);
-}
-
-
-/* This draws a little triangle to indicate that an event extends past
-   the days visible on screen. */
-static void
-e_week_view_event_item_draw_triangle (EWeekViewEventItem *wveitem,
-				      GdkDrawable	 *drawable,
-				      gint		  x,
-				      gint		  y,
-				      gint		  w,
-				      gint		  h)
-{
-	EWeekView *week_view;
-	EWeekViewEvent *event;
-	GdkGC *gc;
-	GdkColor bg_color;
-	GdkPoint points[3];
-	gint c1, c2;
-
-	week_view = E_WEEK_VIEW (GTK_WIDGET (GNOME_CANVAS_ITEM (wveitem)->canvas)->parent);
-
-	event = &g_array_index (week_view->events, EWeekViewEvent,
-				wveitem->event_num);
-
-	gc = week_view->main_gc;
-
-	points[0].x = x;
-	points[0].y = y;
-	points[1].x = x + w;
-	points[1].y = y + (h / 2);
-	points[2].x = x;
-	points[2].y = y + h - 1;
-
-	if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)),
-								  event->comp_data),
-			     &bg_color)) {
-		GdkColormap *colormap;
-
-		colormap = gtk_widget_get_colormap (GTK_WIDGET (week_view));
-		if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE))
-			gdk_gc_set_foreground (gc, &bg_color);
-		else
-			gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]);
-	} else
-		gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]);
-
-	gdk_draw_polygon (drawable, gc, TRUE, points, 3);
-
-	gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER]);
-
-	/* If the height is odd we can use the same central point for both
-	   lines. If it is even we use different end-points. */
-	c1 = c2 = y + (h / 2);
-	if (h % 2 == 0)
-		c1--;
-
-	gdk_draw_line (drawable, gc, x, y, x + w, c1);
-	gdk_draw_line (drawable, gc, x, y + h - 1, x + w, c2);
-}
-#endif
-
-#ifdef ENABLE_CAIRO
 static void
 e_week_view_event_item_draw (GnomeCanvasItem  *canvas_item,
 			     GdkDrawable      *drawable,
@@ -1508,7 +922,6 @@
 
 	cairo_destroy (cr);
 }
-#endif
 
 /* This is supposed to return the nearest item the the point and the distance.
    Since we are the only item we just return ourself and 0 for the distance.

Modified: branches/mbarnes-composer/calendar/gui/e-week-view-main-item.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/e-week-view-main-item.c	(original)
+++ branches/mbarnes-composer/calendar/gui/e-week-view-main-item.c	Wed Mar 26 19:54:10 2008
@@ -184,209 +184,7 @@
 		g_date_add_days (&date, 1);
 	}
 }
-#ifndef ENABLE_CAIRO
-static void
-e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
-				gint		   day,
-				GDate		  *date,
-				GdkDrawable       *drawable,
-				gint		   x,
-				gint		   y,
-				gint		   width,
-				gint		   height)
-{
-	EWeekView *week_view;
-	GtkStyle *style;
-	GdkGC *gc;
-	gint right_edge, bottom_edge, date_width, date_x, line_y;
-	gboolean show_day_name, show_month_name, selected;
-	gchar buffer[128], *format_string;
-	gint month, day_of_month, max_width;
-	GdkColor *bg_color;
-	PangoFontDescription *font_desc;
-	PangoContext *pango_context;
-	PangoFontMetrics *font_metrics;
-	PangoLayout *layout;
-	gboolean today = FALSE;
-
-#if 0
-	g_print ("Drawing Day:%i at %i,%i\n", day, x, y);
-#endif
-	week_view = wvmitem->week_view;
-	style = gtk_widget_get_style (GTK_WIDGET (week_view));
-	gc = week_view->main_gc;
-
-	/* Set up Pango prerequisites */
-	font_desc = style->font_desc;
-	pango_context = gtk_widget_get_pango_context (GTK_WIDGET (week_view));
-	font_metrics = pango_context_get_metrics (pango_context, font_desc,
-						  pango_context_get_language (pango_context));
-
-	g_return_if_fail (gc != NULL);
-
-	month = g_date_get_month (date);
-	day_of_month = g_date_get_day (date);
-	line_y = y + E_WEEK_VIEW_DATE_T_PAD +
-		PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
-		PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) +
-		E_WEEK_VIEW_DATE_LINE_T_PAD;
-
-	/* Draw the background of the day. In the month view odd months are
-	   one color and even months another, so you can easily see when each
-	   month starts (defaults are white for odd - January, March, ... and
-	   light gray for even). In the week view the background is always the
-	   same color, the color used for the odd months in the month view. */
-	if (week_view->multi_week_view && (month % 2 == 0))
-		bg_color = &week_view->colors[E_WEEK_VIEW_COLOR_EVEN_MONTHS];
-	else
-		bg_color = &week_view->colors[E_WEEK_VIEW_COLOR_ODD_MONTHS];
-
-	gdk_gc_set_foreground (gc, bg_color);
-	gdk_draw_rectangle (drawable, gc, TRUE, x, y, width, height);
-
-	/* Draw the lines on the right and bottom of the cell. The canvas is
-	   sized so that the lines on the right & bottom edges will be off the
-	   edge of the canvas, so we don't have to worry about them. */
-	right_edge = x + width - 1;
-	bottom_edge = y + height - 1;
-
-	gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_GRID]);
-	gdk_draw_line (drawable, gc,
-		       right_edge, y, right_edge, bottom_edge);
-	gdk_draw_line (drawable, gc,
-		       x, bottom_edge, right_edge, bottom_edge);
-
-	/* If the day is selected, draw the blue background. */
-	selected = TRUE;
-	if (week_view->selection_start_day == -1
-	    || week_view->selection_start_day > day
-	    || week_view->selection_end_day < day)
-		selected = FALSE;
-	if (selected) {
-		if (GTK_WIDGET_HAS_FOCUS (week_view))
-			gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_SELECTED]);
-		else
-			gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_SELECTED_UNFOCUSSED]);
 
-		if (week_view->multi_week_view) {
-			gdk_draw_rectangle (drawable, gc, TRUE,
-					    x + 2, y + 1,
-					    width - 5,
-					    E_WEEK_VIEW_DATE_T_PAD - 1 +
-					    PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
-					    PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)));
-		} else {
-			gdk_draw_rectangle (drawable, gc, TRUE,
-					    x + 2, y + 1,
-					    width - 5, line_y - y);
-		}
-	}
-
-	/* Display the date in the top of the cell.
-	   In the week view, display the long format "10 January" in all cells,
-	   or abbreviate it to "10 Jan" or "10" if that doesn't fit.
-	   In the month view, only use the long format for the first cell and
-	   the 1st of each month, otherwise use "10". */
-	show_day_name = FALSE;
-	show_month_name = FALSE;
-	if (!week_view->multi_week_view) {
-		show_day_name = TRUE;
-		show_month_name = TRUE;
-	} else if (day == 0 || day_of_month == 1) {
-		show_month_name = TRUE;
-	}
-
-	/* Now find the longest form of the date that will fit. */
-	max_width = width - 4;
-	format_string = NULL;
-	if (show_day_name) {
-		if (week_view->max_day_width + week_view->digit_width * 2
-		    + week_view->space_width * 2
-		    + week_view->month_widths[month - 1] < max_width)
-			/* strftime format %A = full weekday name, %d = day of
-			   month, %B = full month name. You can change the
-			   order but don't change the specifiers or add
-			   anything. */
-			format_string = _("%A %d %B");
-		else if (week_view->max_abbr_day_width
-			 + week_view->digit_width * 2
-			 + week_view->space_width * 2
-			 + week_view->abbr_month_widths[month - 1] < max_width)
-			/* strftime format %a = abbreviated weekday name,
-			   %d = day of month, %b = abbreviated month name.
-			   You can change the order but don't change the
-			   specifiers or add anything. */
-			format_string = _("%a %d %b");
-	}
-	if (!format_string && show_month_name) {
-		if (week_view->digit_width * 2 + week_view->space_width
-		    + week_view->month_widths[month - 1] < max_width)
-			/* strftime format %d = day of month, %B = full
-			   month name. You can change the order but don't
-			   change the specifiers or add anything. */
-			format_string = _("%d %B");
-		else if (week_view->digit_width * 2 + week_view->space_width
-		    + week_view->abbr_month_widths[month - 1] < max_width)
-			/* strftime format %d = day of month, %b = abbreviated
-			   month name. You can change the order but don't
-			   change the specifiers or add anything. */
-			format_string = _("%d %b");
-	}
-
-	if (selected) {
-		gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_DATES_SELECTED]);
-	} else if (week_view->multi_week_view) {
-		struct icaltimetype tt;
-
-		/* Check if we are drawing today */
-		tt = icaltime_from_timet_with_zone (time (NULL), FALSE,
-						    e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
-		if (g_date_get_year (date) == tt.year
-		    && g_date_get_month (date) == tt.month
-		    && g_date_get_day (date) == tt.day) {
-			gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_TODAY]);
-			today = TRUE;
-		}
-		else
-			gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_DATES]);
-	} else {
-		gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_DATES]);
-	}
-
-	if (today) {
-		g_date_strftime (buffer, sizeof (buffer),
-				 format_string ? format_string : "<b>%d</b>", date);
-		layout = gtk_widget_create_pango_layout (GTK_WIDGET (week_view), buffer);
-		pango_layout_set_markup (layout, buffer, strlen(buffer));
-	} else {
-		g_date_strftime (buffer, sizeof (buffer),
-				 format_string ? format_string : "%d", date);
-		layout = gtk_widget_create_pango_layout (GTK_WIDGET (week_view), buffer);
-	}
-
-	pango_layout_get_pixel_size (layout, &date_width, NULL);
-	date_x = x + width - date_width - E_WEEK_VIEW_DATE_R_PAD;
-	date_x = MAX (date_x, x + 1);
-
-	gdk_draw_layout (drawable, gc,
-			 date_x,
-			 y + E_WEEK_VIEW_DATE_T_PAD,
-			 layout);
-	g_object_unref (layout);
-
-	/* Draw the line under the date. */
-	if (!week_view->multi_week_view) {
-		gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_GRID]);
-		gdk_draw_line (drawable, gc,
-			       x + E_WEEK_VIEW_DATE_LINE_L_PAD, line_y,
-			       right_edge, line_y);
-	}
-
-	pango_font_metrics_unref (font_metrics);
-}
-#endif
-
-#ifdef ENABLE_CAIRO
 static void
 e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
 				gint		   day,
@@ -611,7 +409,6 @@
 	pango_font_description_free (font_desc);
 	cairo_destroy (cr);
 }
-#endif
 
 /* This is supposed to return the nearest item the the point and the distance.
    Since we are the only item we just return ourself and 0 for the distance.

Modified: branches/mbarnes-composer/calendar/gui/gnome-cal.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/gnome-cal.c	(original)
+++ branches/mbarnes-composer/calendar/gui/gnome-cal.c	Wed Mar 26 19:54:10 2008
@@ -2386,7 +2386,7 @@
 					  "calendar",
 					  NULL);
 		path1 = g_build_filename (calendar_component_peek_base_directory (calendar_component_peek ()),
-					 "calendar", "views", NULL);
+					 "views", NULL);
 		gal_view_collection_set_storage_directories (collection,
 							     path0,
 							     path1);

Modified: branches/mbarnes-composer/calendar/gui/memos-component.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/memos-component.c	(original)
+++ branches/mbarnes-composer/calendar/gui/memos-component.c	Wed Mar 26 19:54:10 2008
@@ -132,6 +132,7 @@
 	ESourceGroup *on_the_web;
 	ESource *personal_source;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 
 	on_this_computer = NULL;
 	on_the_web = NULL;
@@ -142,9 +143,8 @@
 		return;
 	}
 
-	base_uri = g_build_filename (memos_component_peek_base_directory (component),
-				     "memos", "local",
-				     NULL);
+	base_dir = memos_component_peek_base_directory (component);
+	base_uri = g_build_filename (base_dir, "local", NULL);
 
 	base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
 
@@ -1388,10 +1388,8 @@
 
 	priv = g_new0 (MemosComponentPrivate, 1);
 
-	priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
-	priv->config_directory = g_build_filename (g_get_home_dir (),
-						   ".evolution", "memos", "config",
-						   NULL);
+	priv->base_directory = g_build_filename (e_get_user_data_dir (), "memos", NULL);
+	priv->config_directory = g_build_filename (priv->base_directory, "config", NULL);
 
 	component->priv = priv;
 	ensure_sources (component);

Modified: branches/mbarnes-composer/calendar/gui/migration.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/migration.c	(original)
+++ branches/mbarnes-composer/calendar/gui/migration.c	Wed Mar 26 19:54:10 2008
@@ -424,15 +424,15 @@
 	GSList *groups;
 	ESourceGroup *group;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 
 	*on_this_computer = NULL;
 	*on_the_web = NULL;
 	*contacts = NULL;
 	*personal_source = NULL;
 
-	base_uri = g_build_filename (calendar_component_peek_base_directory (component),
-				     "calendar", "local",
-				     NULL);
+	base_dir = calendar_component_peek_base_directory (component);
+	base_uri = g_build_filename (base_dir, "local", NULL);
 
 	base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
 
@@ -535,13 +535,14 @@
 	GSList *groups;
 	ESourceGroup *group;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 
 	*on_this_computer = NULL;
 	*on_the_web = NULL;
 	*personal_source = NULL;
 
-	base_uri = g_build_filename (tasks_component_peek_base_directory (component),
-				     "tasks", "local", NULL);
+	base_dir = tasks_component_peek_base_directory (component);
+	base_uri = g_build_filename (base_dir, "local", NULL);
 
 	base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
 
@@ -851,7 +852,7 @@
 
 			old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Calendar", NULL);
 			new_path = g_build_filename (calendar_component_peek_base_directory (component),
-						     "calendar", "local", "system", NULL);
+						     "local", "system", NULL);
 			migrate_pilot_data ("calendar", "calendar", old_path, new_path);
 			g_free (new_path);
 			g_free (old_path);
@@ -993,7 +994,7 @@
 
 			old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Tasks", NULL);
 			new_path = g_build_filename (tasks_component_peek_base_directory (component),
-						     "tasks", "local", "system", NULL);
+						     "local", "system", NULL);
 			migrate_pilot_data ("tasks", "todo", old_path, new_path);
 			g_free (new_path);
 			g_free (old_path);
@@ -1048,13 +1049,14 @@
 	GSList *groups;
 	ESourceGroup *group;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 
 	*on_this_computer = NULL;
 	*on_the_web = NULL;
 	*personal_source = NULL;
 
-	base_uri = g_build_filename (memos_component_peek_base_directory (component),
-				     "memos", "local", NULL);
+	base_dir = memos_component_peek_base_directory (component);
+	base_uri = g_build_filename (base_dir, "local", NULL);
 
 	base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
 
@@ -1146,6 +1148,7 @@
 	ESourceGroup *group;
 	ESource *source;
 	GSList *ids, *temp ;
+	GError *error = NULL;
 	char *relative_uri;
 	const char *soap_port;
 	const char * use_ssl;
@@ -1180,7 +1183,11 @@
 	e_source_set_color_spec (source, "#EEBC60");
 	e_source_group_add_source (group, source, -1);
 
-	ids = gconf_client_get_list (client, CALENDAR_CONFIG_MEMOS_SELECTED_MEMOS, GCONF_VALUE_STRING, NULL);
+	ids = gconf_client_get_list (client, CALENDAR_CONFIG_MEMOS_SELECTED_MEMOS, GCONF_VALUE_STRING, &error);
+	if ( error != NULL ) {
+		g_warning("%s (%s) %s\n", G_STRLOC, G_STRFUNC, error->message);
+		g_error_free(error);
+	}
 	ids = g_slist_append (ids, g_strdup (e_source_peek_uid (source)));
 	gconf_client_set_list (client, CALENDAR_CONFIG_MEMOS_SELECTED_MEMOS, GCONF_VALUE_STRING, ids, NULL);
 	temp  = ids;

Modified: branches/mbarnes-composer/calendar/gui/tasks-component.c
==============================================================================
--- branches/mbarnes-composer/calendar/gui/tasks-component.c	(original)
+++ branches/mbarnes-composer/calendar/gui/tasks-component.c	Wed Mar 26 19:54:10 2008
@@ -128,6 +128,7 @@
 	ESourceGroup *on_the_web;
 	ESource *personal_source;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 
 	on_this_computer = NULL;
 	on_the_web = NULL;
@@ -138,9 +139,8 @@
 		return;
 	}
 
-	base_uri = g_build_filename (tasks_component_peek_base_directory (component),
-				     "tasks", "local",
-				     NULL);
+	base_dir = tasks_component_peek_base_directory (component);
+	base_uri = g_build_filename (base_dir, "local", NULL);
 
 	base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
 
@@ -1449,10 +1449,8 @@
 
 	priv = g_new0 (TasksComponentPrivate, 1);
 
-	priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
-	priv->config_directory = g_build_filename (g_get_home_dir (),
-						   ".evolution", "tasks", "config",
-						   NULL);
+	priv->base_directory = g_build_filename (e_get_user_data_dir (), "tasks", NULL);
+	priv->config_directory = g_build_filename (priv->base_directory, "config", NULL);
 
 	component->priv = priv;
 	ensure_sources (component);

Modified: branches/mbarnes-composer/configure.in
==============================================================================
--- branches/mbarnes-composer/configure.in	(original)
+++ branches/mbarnes-composer/configure.in	Wed Mar 26 19:54:10 2008
@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.52)
 
-AC_INIT(evolution, 2.21.92, http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution)
+AC_INIT(evolution, 2.22.0, http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution)
 AC_CONFIG_SRCDIR(README)
 
 # Some requirements have versioned package names
@@ -82,7 +82,7 @@
 dnl
 dnl This should be set to 0 for stable releases and 1 for unstable releases
 dnl *************************************************************************************************
-AC_DEFINE(DEVELOPMENT, 1, [If we are in development mode or not])
+AC_DEFINE(DEVELOPMENT, 0, [If we are in development mode or not])
 AC_SUBST(DEVELOPMENT)
 
 AC_ISC_POSIX
@@ -615,21 +615,6 @@
 fi
 AM_CONDITIONAL(ENABLE_IMAP4, [test x$enable_imap4 = xyes])
 
-dnl **************************************************
-dnl Cairo Calendar support.
-dnl **************************************************
-AC_ARG_ENABLE([cairo-calendar],
-	      AC_HELP_STRING([--enable-cairo-calendar],
-			     [Build evolution calendar with cairo support.]),,
-	      [enable_cairo_calendar=yes])
-if test "x$enable_cairo_calendar" = "xyes"; then
-        AC_DEFINE(ENABLE_CAIRO,1,[Build evolution with cairo support])
-        msg_cairo=yes
-else
-        msg_cairo=no
-fi
-AM_CONDITIONAL(ENABLE_CAIRO, [test x$enable_cairo_calendar = xyes])
-
 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
 
 dnl **************************************************
@@ -1403,10 +1388,22 @@
 if test "$tnef_ok" = "yes"; then
 	AC_MSG_RESULT([yes])
 	TNEF_ATTACHMENTS="tnef-attachments"
+	TNEF_CFLAGS="-DHAVE_YTNEF_H"
 else
-	AC_MSG_RESULT(no)
-	TNEF_ATTACHMENTS=""
+	AC_TRY_COMPILE([#include <stdio.h> 
+			#include <libytnef/ytnef.h>],
+		[TNEFStruct *tnef;], tnef_ok=yes, tnef_ok=no)
+	if test "$tnef_ok" = "yes"; then
+		AC_MSG_RESULT([yes])
+		TNEF_ATTACHMENTS="tnef-attachments"
+		TNEF_CFLAGS="-DHAVE_LIBYTNEF_YTNEF_H"
+	else
+		AC_MSG_RESULT(no)
+		TNEF_ATTACHMENTS=""
+		TNEF_CFLAGS=""
+	fi
 fi
+AC_SUBST(TNEF_CFLAGS)
 
 echo "TNEF is "$TNEF_ATTACHMENTS
 
@@ -1944,6 +1941,7 @@
 mail/default/mk/Makefile
 mail/default/zh_CN/Makefile
 mail/default/ja/Makefile
+mail/default/ko/Makefile
 mail/default/nl/Makefile
 mail/default/pl/Makefile
 mail/default/pt/Makefile

Modified: branches/mbarnes-composer/e-util/e-mktemp.c
==============================================================================
--- branches/mbarnes-composer/e-util/e-mktemp.c	(original)
+++ branches/mbarnes-composer/e-util/e-mktemp.c	Wed Mar 26 19:54:10 2008
@@ -110,7 +110,7 @@
 
 #ifdef TEMP_HOME
 	char *tmpdir = NULL;
-	tmpdir = g_build_filename(g_get_home_dir(), ".evolution",
+	tmpdir = g_build_filename(e_get_user_data_dir (),
 		"cache", "tmp", NULL);
 	path = g_string_new(tmpdir);
 	if (make && g_mkdir_with_parents(tmpdir, 0777) == -1) {

Modified: branches/mbarnes-composer/e-util/e-plugin.c
==============================================================================
--- branches/mbarnes-composer/e-util/e-plugin.c	(original)
+++ branches/mbarnes-composer/e-util/e-plugin.c	Wed Mar 26 19:54:10 2008
@@ -363,12 +363,12 @@
 }
 
 static int
-ep_load(const char *filename)
+ep_load(const char *filename, int load_level)
 {
 	xmlDocPtr doc;
 	xmlNodePtr root;
 	int res = -1;
-	EPlugin *ep;
+	EPlugin *ep = NULL;
 	int cache = FALSE;
 	struct _plugin_doc *pdoc;
 
@@ -389,10 +389,37 @@
 
 	for (root = root->children; root ; root = root->next) {
 		if (strcmp((char *)root->name, "e-plugin") == 0) {
-			ep = ep_load_plugin(root, pdoc);
+			char *plugin_load_level, *is_system_plugin;
+
+			plugin_load_level = NULL;
+			plugin_load_level = e_plugin_xml_prop (root, "load_level");
+			if (plugin_load_level) {
+				if ((atoi (plugin_load_level) == load_level) ) {
+					ep = ep_load_plugin(root, pdoc);
+
+					if (ep) {
+						if (load_level == 1)
+							e_plugin_invoke (ep, "load_plugin_type_register_function", NULL);
+					}
+				} 
+			} else if (load_level == 2) {
+				ep = ep_load_plugin(root, pdoc);
+			}
+
 			if (ep) {
+				pd(printf ("\nloading plugin [%s] at load_level [%d]\n", ep->name, load_level));
+
+				/* README: May be we can use load_levels to achieve the same thing.
+				   But it may be confusing for a plugin writer */
+				is_system_plugin = e_plugin_xml_prop (root, "system_plugin");
+				if (is_system_plugin && !strcmp (is_system_plugin, "true"))
+					ep->flags |= E_PLUGIN_FLAGS_SYSTEM_PLUGIN;
+				else
+					ep->flags &= ~E_PLUGIN_FLAGS_SYSTEM_PLUGIN;
+
 				pdoc->plugin_hooks = g_slist_prepend(pdoc->plugin_hooks, ep);
 				cache |= (ep->hooks_pending != NULL);
+				ep = NULL;
 			}
 			cache |= pdoc->plugins != NULL;
 		}
@@ -499,36 +526,39 @@
 e_plugin_load_plugins(void)
 {
 	GSList *l;
+	int i;
 
 	if (ep_types == NULL) {
 		g_warning("no plugin types defined");
 		return 0;
 	}
 
-	for (l = ep_path;l;l = g_slist_next(l)) {
-		GDir *dir;
-		const char *d;
-		char *path = l->data;
-
-		pd(printf("scanning plugin dir '%s'\n", path));
-
-		dir = g_dir_open(path, 0, NULL);
-		if (dir == NULL) {
-			/*g_warning("Could not find plugin path: %s", path);*/
-			continue;
-		}
-
-		while ( (d = g_dir_read_name(dir)) ) {
-			if (strlen(d) > 6
-			    && !strcmp(d + strlen(d) - 6, ".eplug")) {
-				char * name = g_build_filename(path, d, NULL);
+	for (i=0; i < 3; i++) {
+		for (l = ep_path;l;l = g_slist_next(l)) {
+			GDir *dir;
+			const char *d;
+			char *path = l->data;
+
+			pd(printf("scanning plugin dir '%s'\n", path));
+
+			dir = g_dir_open(path, 0, NULL);
+			if (dir == NULL) {
+				/*g_warning("Could not find plugin path: %s", path);*/
+				continue;
+			}
+
+			while ( (d = g_dir_read_name(dir)) ) {
+				if (strlen(d) > 6
+						&& !strcmp(d + strlen(d) - 6, ".eplug")) {
+					char * name = g_build_filename(path, d, NULL);
 
-				ep_load(name);
-				g_free(name);
+					ep_load(name, i);
+					g_free(name);
+				}
 			}
-		}
 
-		g_dir_close(dir);
+			g_dir_close(dir);
+		}
 	}
 
 	return 0;
@@ -698,7 +728,10 @@
 {
 	EPluginClass *ptr;
 	ptr = ((EPluginClass *)G_OBJECT_GET_CLASS(ep));
-        return ptr->get_configure_widget (ep);
+        if (ptr->get_configure_widget)
+		return ptr->get_configure_widget (ep);
+
+	return NULL;
 }
 
 /**

Modified: branches/mbarnes-composer/e-util/e-plugin.h
==============================================================================
--- branches/mbarnes-composer/e-util/e-plugin.h	(original)
+++ branches/mbarnes-composer/e-util/e-plugin.h	Wed Mar 26 19:54:10 2008
@@ -53,6 +53,8 @@
 	GSList *hooks;
 	GSList *authors;	/* EPluginAuthor structures */
 
+	guint32 flags;
+
 	guint enabled:1;
 };
 
@@ -275,5 +277,15 @@
 
 GType e_plugin_type_hook_get_type(void);
 
+
+/* README: Currently there is only one flag. 
+   But we may need more in the future and hence makes 
+   sense to keep as an enum */
+
+typedef enum _EPluginFlags {
+	E_PLUGIN_FLAGS_SYSTEM_PLUGIN = 1 << 0
+} EPluginFlags;
+
+
 #endif /* ! _E_PLUGIN_H */
 

Modified: branches/mbarnes-composer/e-util/e-profile-event.c
==============================================================================
--- branches/mbarnes-composer/e-util/e-profile-event.c	(original)
+++ branches/mbarnes-composer/e-util/e-profile-event.c	Wed Mar 26 19:54:10 2008
@@ -125,7 +125,7 @@
 }
 
 #ifdef ENABLE_PROFILING
-static void
+void
 e_profile_event_emit(const char *id, const char *uid, guint32 flags)
 {
 	EProfileEvent *epe = e_profile_event_peek();

Modified: branches/mbarnes-composer/e-util/e-util.c
==============================================================================
--- branches/mbarnes-composer/e-util/e-util.c	(original)
+++ branches/mbarnes-composer/e-util/e-util.c	Wed Mar 26 19:54:10 2008
@@ -50,6 +50,26 @@
 #include "e-util-private.h"
 
 /**
+ * e_get_user_data_dir:
+ *
+ * Returns the base directory for Evolution-specific user data.
+ * The string is owned by Evolution and must not be modified or freed.
+ *
+ * Returns: base directory for user data
+ **/
+const gchar *
+e_get_user_data_dir (void)
+{
+	static gchar *dirname = NULL;
+
+	if (G_UNLIKELY (dirname == NULL))
+		dirname = g_build_filename (
+			g_get_home_dir (), ".evolution", NULL);
+
+	return dirname;
+}
+
+/**
  * e_str_without_underscores:
  * @s: the string to strip underscores from.
  *
@@ -989,8 +1009,13 @@
 e_file_update_save_path (gchar *uri, gboolean free)
 {
 	GConfClient *gconf = gconf_client_get_default();
+	GError *error = NULL;
 
-	gconf_client_set_string(gconf, "/apps/evolution/mail/save_dir", uri, NULL);
+	gconf_client_set_string(gconf, "/apps/evolution/mail/save_dir", uri, &error);
+	if (error != NULL) {
+		g_warning("%s (%s) %s", G_STRLOC, G_STRFUNC, error->message);
+		g_clear_error(&error);
+	}
 	g_object_unref(gconf);
 	if (free)
 		g_free(uri);
@@ -1007,9 +1032,14 @@
 e_file_get_save_path (void)
 {
 	GConfClient *gconf = gconf_client_get_default();
+	GError *error = NULL;
 	gchar *uri;
 
-	uri = gconf_client_get_string(gconf, "/apps/evolution/mail/save_dir", NULL);
+	uri = gconf_client_get_string(gconf, "/apps/evolution/mail/save_dir", &error);
+	if (error != NULL) {
+		g_warning("%s (%s) %s", G_STRLOC, G_STRFUNC, error->message);
+		g_clear_error(&error);
+	}
 	g_object_unref(gconf);
 
 	if (uri == NULL)
@@ -1027,7 +1057,7 @@
 	static gchar *filename = NULL;
 
 	if (G_UNLIKELY (filename == NULL))
-		filename = g_build_filename (g_get_home_dir (), ".evolution", LOCK_FILE, NULL);
+		filename = g_build_filename (e_get_user_data_dir (), LOCK_FILE, NULL);
 
 	return filename;
 }

Modified: branches/mbarnes-composer/e-util/e-util.h
==============================================================================
--- branches/mbarnes-composer/e-util/e-util.h	(original)
+++ branches/mbarnes-composer/e-util/e-util.h	Wed Mar 26 19:54:10 2008
@@ -44,6 +44,8 @@
 	E_FOCUS_END
 } EFocus;
 
+const gchar *	e_get_user_data_dir		(void);
+
 char *		e_str_without_underscores	(const char *s);
 gint		e_str_compare			(gconstpointer x,
 						 gconstpointer y);

Modified: branches/mbarnes-composer/evolution-zip.in
==============================================================================
--- branches/mbarnes-composer/evolution-zip.in	(original)
+++ branches/mbarnes-composer/evolution-zip.in	Wed Mar 26 19:54:10 2008
@@ -11,58 +11,49 @@
 cd @prefix@
 rm $ZIP
 zip -r $ZIP -@ <<EOF
-bin/libeutil-0.dll
+bin/libeabutil-0.dll
 bin/libeconduit-0.dll
-bin/libevolution-a11y-0.dll
-bin/libevolution-calendar-a11y-0.dll
-bin/libevolution-widgets-a11y-0.dll
-bin/libevolution-addressbook-a11y-0.dll
-bin/libetimezonedialog-0.dll
-bin/libetable-0.dll
-bin/libetext-0.dll
-bin/libemiscwidgets-0.dll
+bin/libecontacteditor-0.dll
+bin/libecontactlisteditor-0.dll
 bin/libefilterbar-0.dll
-bin/libmenus-0.dll
+bin/libemiscwidgets-0.dll
 bin/libeshell-0.dll
-bin/libfilter-0.dll
 bin/libessmime-0.dll
-bin/libevolution-smime-0.dll
-bin/libeabutil-0.dll
+bin/libetable-0.dll
+bin/libetext-0.dll
+bin/libetimezonedialog-0.dll
+bin/libeutil-0.dll
+bin/libevolution-a11y-0.dll
+bin/libevolution-addressbook-a11y-0.dll
 bin/libevolution-addressbook-importers-0.dll
-bin/libecontacteditor-0.dll
-bin/libecontactlisteditor-0.dll
+bin/libevolution-calendar-a11y-0.dll
 bin/libevolution-calendar-importers-0.dll
 bin/libevolution-mail-importers-0.dll
+bin/libevolution-smime-0.dll
+bin/libevolution-widgets-a11y-0.dll
+bin/libfilter-0.dll
+bin/libmenus-0.dll
 bin/evolution.exe
-lib/bonobo/servers/GNOME_Evolution_Shell.server
 lib/bonobo/servers/GNOME_Evolution_Addressbook.server
-lib/bonobo/servers/GNOME_Evolution_Calendar_AlarmNotify.server
 lib/bonobo/servers/GNOME_Evolution_Calendar.server
+lib/bonobo/servers/GNOME_Evolution_Calendar_AlarmNotify.server
 lib/bonobo/servers/GNOME_Evolution_Mail.server
-lib/evolution/@BASE_VERSION@/components/libevolution-addressbook.dll
-lib/evolution/@BASE_VERSION@/components/libevolution-calendar.dll
-lib/evolution/@BASE_VERSION@/components/libevolution-mail.dll
-libexec/evolution/@BASE_VERSION@/evolution-addressbook-export.exe
-libexec/evolution/@BASE_VERSION@/evolution-alarm-notify.exe
+lib/bonobo/servers/GNOME_Evolution_Shell.server
 share/mime-info/evolution.keys
 share/mime-info/evolution.mime
-share/evolution/@BASE_VERSION@/errors
-share/evolution/@BASE_VERSION@/glade
-share/evolution/@BASE_VERSION@/ecps
-share/evolution/@BASE_VERSION@/etspec
-share/evolution/@BASE_VERSION@/addresstypes.xml
-share/evolution/@BASE_VERSION@/filtertypes.xml
-share/evolution/@BASE_VERSION@/vfoldertypes.xml
-share/evolution/@BASE_VERSION@/searchtypes.xml
-share/evolution/@BASE_VERSION@/default
-share/evolution/@BASE_VERSION@/weather
-share/evolution/@BASE_VERSION@/ui
-share/evolution/@BASE_VERSION@/views
-etc/gconf
+share/evolution/@BASE_VERSION@
+share/icons/hicolor
+etc/gconf/gconf.xml.defaults/apps/evolution
+etc/gconf/gconf.xml.defaults/schemas/apps/evolution
+etc/gconf/schemas
 EOF
 
-zip -r $ZIP share/evolution/@BASE_VERSION@/images
-zip $ZIP lib/evolution/@BASE_VERSION@/plugins/*.eplug lib/evolution/@BASE_VERSION@/plugins/*.dll lib/evolution/@BASE_VERSION@/plugins/*.xml lib/evolution/@BASE_VERSION@/plugins/*.glade
+zip $ZIP lib/evolution/@BASE_VERSION@/components/*dll
+zip $ZIP lib/evolution/@BASE_VERSION@/plugins/*.eplug 
+zip $ZIP lib/evolution/@BASE_VERSION@/plugins/*.dll 
+zip $ZIP lib/evolution/@BASE_VERSION@/plugins/*.xml
+
+zip $ZIP libexec/evolution/@BASE_VERSION@/*exe
 
 if [ -f share/locale/de/LC_MESSAGES/evolution- BASE_VERSION@.mo ]; then
   zip $ZIP share/locale/*/LC_MESSAGES/evolution- BASE_VERSION@.mo
@@ -72,45 +63,30 @@
 
 rm $DEVZIP
 zip -r $DEVZIP -@ <<EOF
-lib/libeutil.dll.a
+lib/libeabutil.dll.a
 lib/libeconduit.dll.a
-lib/libevolution-a11y.dll.a
-lib/libevolution-calendar-a11y.dll.a
-lib/libevolution-widgets-a11y.dll.a
-lib/libevolution-addressbook-a11y.dll.a
-lib/libetimezonedialog.dll.a
-lib/libetable.dll.a
-lib/libetext.dll.a
-lib/libemiscwidgets.dll.a
+lib/libecontacteditor.dll.a
+lib/libecontactlisteditor.dll.a
 lib/libefilterbar.dll.a
-lib/libmenus.dll.a
+lib/libemiscwidgets.dll.a
 lib/libeshell.dll.a
-lib/libfilter.dll.a
 lib/libessmime.dll.a
-lib/libevolution-smime.dll.a
-lib/libeabutil.dll.a
+lib/libetable.dll.a
+lib/libetext.dll.a
+lib/libetimezonedialog.dll.a
+lib/libeutil.dll.a
+lib/libevolution-a11y.dll.a
+lib/libevolution-addressbook-a11y.dll.a
 lib/libevolution-addressbook-importers.dll.a
-lib/libecontacteditor.dll.a
-lib/libecontactlisteditor.dll.a
+lib/libevolution-calendar-a11y.dll.a
 lib/libevolution-calendar-importers.dll.a
 lib/libevolution-mail-importers.dll.a
-lib/pkgconfig/evolution-shell.pc
+lib/libevolution-smime.dll.a
+lib/libevolution-widgets-a11y.dll.a
+lib/libfilter.dll.a
+lib/libmenus.dll.a
 lib/pkgconfig/evolution-plugin.pc
-include/evolution- BASE_VERSION@/e-conduit
-include/evolution- BASE_VERSION@/e-util
-include/evolution- BASE_VERSION@/table
-include/evolution- BASE_VERSION@/text
-include/evolution- BASE_VERSION@/misc
-include/evolution- BASE_VERSION@/menus
-include/evolution- BASE_VERSION@/shell
-include/evolution- BASE_VERSION@/addressbook
-include/evolution- BASE_VERSION@/calendar
-include/evolution- BASE_VERSION@/mail
-share/idl/evolution- BASE_VERSION@/Evolution-ConfigControl.idl
-share/idl/evolution- BASE_VERSION@/Evolution-Component.idl
-share/idl/evolution- BASE_VERSION@/Evolution-Shell.idl
-share/idl/evolution- BASE_VERSION@/Evolution.idl
-share/idl/evolution- BASE_VERSION@/evolution-calendar.idl
-share/idl/evolution- BASE_VERSION@/Evolution-Composer.idl
-share/idl/evolution- BASE_VERSION@/Evolution-Mail.idl
+lib/pkgconfig/evolution-shell.pc
+include/evolution- BASE_VERSION@
+share/idl/evolution- BASE_VERSION@
 EOF

Modified: branches/mbarnes-composer/help/C/evolution.xml
==============================================================================
--- branches/mbarnes-composer/help/C/evolution.xml	(original)
+++ branches/mbarnes-composer/help/C/evolution.xml	Wed Mar 26 19:54:10 2008
@@ -139,9 +139,6 @@
     <para>For information about command line options, open a terminal window and type <command>evolution --help</command>.</para>
    </listitem>
    <listitem>
-    <para>For support, late-breaking news, and errata, visit the Novell support center at <ulink url="http://support.novell.com";>support.novell.com</ulink>.</para>
-   </listitem>
-   <listitem>
     <para>In the Evolution interface, click Help &gt; Contents.</para>
    </listitem>
   </itemizedlist>
@@ -153,9 +150,7 @@
 
  <chapter id="usage-mainwindow">
   <title>Getting Started</title>
-  <para>Evolutionâ makes the tasks of storing, organizing, and retrieving your personal information easy, so you can work and communicate more effectively with others. It is a highly evolved <link linkend="groupware">groupware</link> program, an integral part of the Internet-connected desktop.</para>
-  <para>Evolution can help you work in a group by handling e-mail, address, and other contact information, and one or more calendars. It can do that on one or several computers, connected directly or over a network, for one person or for large groups.</para>
-  <para>With Evolution, you can accomplish your most common daily tasks quickly. For example, it takes only one or two clicks to enter appointment or contact information sent to you by e-mail, or to send e-mail to a contact or appointment. People who get lots of e-mail will appreciate advanced features like <link linkend="vfolder">search folders</link>, which let you save searches as though they were ordinary e-mail folders.</para>
+  <para>Evolution is a <link linkend="groupware">groupware</link> application thathelps you work in a group by handling e-mail, address, memos, tasks, and one or more calendars. This makes the tasks of storing, organizing, and retrieving your personal information easy, so you can work and communicate more effectively with others.</para>
   <itemizedlist>
    <listitem>
     <para><link linkend="usage-mainwindow-starting">Starting Evolution for the First Time</link></para>
@@ -410,7 +405,7 @@
        </listitem>
        <listitem id="bsthlvl">
         <para>Select if you want to check new messages for junk content.</para>
-        <para>For additional information on junk content, see  <link linkend="usage-mail-organize-spam">Stopping Junk Mail (Spam)</link> and <link linkend="mail-prefs-junk">Junk Mail Preferences</link>.</para>
+        <para>For additional information on junk content, see  <link linkend="usage-mail-organize-spam">Stopping Junk Mail (Spam)</link> and <link linkend="mail-prefs-junk">Junk </link>.</para>
        </listitem>
        <listitem id="bsthm9q">
         <para>Select if you want to only check for junk messages in the Inbox folder.</para>
@@ -418,7 +413,7 @@
        <listitem id="bsthmhx">
         <para>Select if you want to automatically synchronize remote mail locally.</para>
         <para>Evolution, by default downloads only the header information such as From, Subject, and Date.  The body of the message and the attachments are downloaded only when you click the message. Thus you can save time and network usage. This is useful when you don't read all the messages you receive.</para>
-        <para>If you check this option, evolution fetches the headers as well as the body of the message simultaneously. In this case, the time taken to open a message is comparitevely less. In addition to that, you can download the mails for reading them offline, when you have checked this option.</para>
+        <para>If you check this option, evolution fetches the headers as well as the body of the message simultaneously. In this case, the time taken to open a message is comparatively less. In addition to that, you can download the mails for reading them offline, when you have checked this option.</para>
        </listitem>
        <listitem id="bsthnab">
         <para>Type your Post Office Agent SOAP port in the Post Office Agent SOAP Port field.</para>
@@ -638,7 +633,7 @@
 
      <section id="b185akx6">
       <title>Standard Unix mbox spool directory Receiving Options</title>
-      <para>If you select Standard Unix Mbox Spool directory as your receiving server type, you need to specify the following options:</para>
+      <para>If you select Standard Unix mbox Spool directory as your receiving server type, you need to specify the following options:</para>
       <orderedlist>
        <listitem id="b185aln9">
         <para>Select if you want Evolution to automatically check for new mail.If you select this option, you need to specify how often Evolution should check for new messages.</para>
@@ -825,8 +820,8 @@
    </section>
 
    <section id="usage-mainwindow-shortcutbar">
-    <title>The Side Bar</title>
-    <para>The most important job for Evolution is to give you access to your information and help you use it quickly. One way it does that is through the side bar, which is the column on the left side of the main window. The switcher at the bottom of the side bar let you switch between the Evolution tools, such as Mail and Contacts, are the shortcuts. Above them is a list of folders for the current Evolution tool.</para>
+    <title>The Sidebar</title>
+    <para>Sidebar is the vertical panel on the left side of the Evolution main window. At the bottom of the sidebar is the Switcher, that lets you switch between the Evolution tools like Mail, Memo,Tasks and Contacts. Above the Switcher you can see a list of folders for the current Evolution tool.</para>
     <para>The folder list organizes your e-mail, calendars, contact lists, and task lists in a tree, similar to a <link linkend="filetree">file tree</link>. Most people find one to four folders at the base of the tree, depending on the tool and their system configuration. Each Evolution tool has at least one folder, called On This Computer, for local information. For example, the folder list for the e-mail tool shows any remote e-mail storage you have set up, plus local folders and search folders, which are discussed in <link linkend="usage-mail-organize-vfolders">Using Search Folders</link>.</para>
     <para>If you get large amounts of e-mail, you might want more folders than just your Inbox. You can create multiple calendar, task, or contacts folders.</para>
     <para>To create a new folder:</para>
@@ -863,11 +858,11 @@
      <formalpara id="b13cfibm">
       <title>Toolbar Style:</title>
       <para>Shows buttons using the desktop toolbar settings.</para>
-     </formalpara>
-     <formalpara id="b13cfifx">
-      <title>Hide Buttons:</title>
-      <para>This option hides all the shortcut buttons of switcher.</para>
-     </formalpara>
+    </formalpara>
+    <formalpara id="b13cfifx">
+     <title>Hide Buttons:</title>
+     <para>This option hides all the shortcut buttons of switcher.</para>
+    </formalpara>
     </section>
 
     <section id="subfolders">
@@ -968,19 +963,18 @@
     <para>To use the contacts tool, click Contacts in the switcher. By default, the display shows all your contacts in alphabetical order, in a minicard view. You can select other views from the View menu, and adjust the width of the columns by clicking and dragging the gray column dividers.</para>
     <mediaobject id="usage-contact-fig"><imageobject><imagedata format="PNG" fileref="figures/contacts_mainwindow_a.png"/></imageobject></mediaobject>
     <para>Another advantage of the Evolution contacts is its integration with the rest of the application. For example, you can right-click an e-mail address in Evolution mail to instantly create a contact entry.</para>
-    <para><emphasis>Contact list</emphasis></para>
+    <para><emphasis>Contact List</emphasis></para>
     <para>The largest section of the contacts display shows a list of individual contacts. You can also search the contacts in the same way that you search e-mail folders, using the search tool on the right side of the toolbar.</para>
     <para>For detailed instructions on how to use the address book, read <link linkend="usage-contact">Evolution Contacts: the Address Book</link>.</para>
    </section>
   </section>
 
   <section id="b17qy921">
-   <title>Backup And Restore Evolution</title>
-   <para>With the Backup and Restore plugin enabled, you can successfully backup Evolution to your machine and restore it whenever it is required. The back up saves your Evolution gconf settings, mails, contacts, tasks, memos and calendars and creates an archive.</para>
-   <para>To take the backup,</para>
+   <title>Backing Up And Restoring Evolution</title>
+   <para>With the Backup and Restore plug-in enabled, you can successfully back up Evolution to your machine and restore it whenever it is required. The backup saves your Evolution gconf settings, mail, contacts, tasks, memos, and calendars and creates an archive.</para>
    <orderedlist>
     <listitem id="b17qydgx">
-     <para>Select File &gt; Backup Settings to select the folder to save the backup.</para>
+     <para>Select File &gt; Backup Settings to select the folder where you want to save the backup.</para>
      <mediaobject id="b17qyglq"><imageobject><imagedata format="PNG" fileref="figures/evo_backup.png"/></imageobject></mediaobject>
      <para>Evolution is always backed up as evolution-backup.tar.gz.</para>
      <para>Before the backup process starts, it asks you to close Evolution and displays a warning as shown below:</para>
@@ -988,28 +982,27 @@
      
     </listitem>
     <listitem id="b17qygt2">
-     <para>Click Restart Evolution after backup to restart Evolution immediately after the backup process.</para>
+     <para>Select Restart Evolution after backup to restart Evolution immediately after the backup process.</para>
     </listitem>
     <listitem id="b17qykwp">
-     <para>Click Yes to close Evolution and start backup.</para>
+     <para>Click Yes to close Evolution and start the backup.</para>
      <mediaobject id="b17qym3m"><imageobject><imagedata format="PNG" fileref="figures/evo_backup_prgsbar.png"/></imageobject></mediaobject>
      <para>Evolution will auto-restart after the process.</para>
     </listitem>
    </orderedlist>
 
    <section id="b17qymxs">
-    <title>Restore Evolution</title>
+    <title>Restoring Evolution</title>
     <para>This feature restores your settings from the archive.</para>
-    <para>To restore Evolution,</para>
     <orderedlist>
      <listitem id="b17rbrfm">
       <para>Select File &gt; Restore Settings to open the available evolution.tar.gz files</para>
      </listitem>
      <listitem id="b17rbry6">
       <para>Select the evolution.tar.gz and click Save.</para>
-      <para>Before the process starts, it asks you to close Evolution. Close the windows and click Restore to restore Evolution.</para>
+      <para>Before the process starts, a pop-up window appears and asks you to close Evolution. Close all the windows and then click Restore in the pop-up window.</para>
       <tip>
-       <para>If you are creating your first account via the startup-wizard, you have an option to restore from the archive if it is available locally.</para>
+       <para> If you are creating your first account via the Startup Wizard, you can use the option to restore from the archive if it is available locally.</para>
       </tip>
       <mediaobject id="b17rbvcy"><imageobject><imagedata format="PNG" fileref="figures/evo_restore.png"/></imageobject></mediaobject>
       <para>Evolution will auto-restart after the process.</para>
@@ -1022,7 +1015,7 @@
    <title>Crash Recovery</title>
    <para>Evolution displays a crash detection message when you restart it after a crash.</para>
    <mediaobject id="b1a5aezg"><imageobject><imagedata format="PNG" fileref="figures/evo_crash_recovery.png"/></imageobject></mediaobject>
-   <para>Click Ignore to restore the preview pane displayed when Evolution was crashed. If you click Recover, Evolution opens with all preview panes hidden.</para>
+   <para>Click Ignore to restore the preview pane displayed when Evolution crashed. If you click Recover, Evolution opens with all preview panes hidden.</para>
   </section>
   <section id="bsekq8r">
    <title>Command Line Options</title>
@@ -1144,46 +1137,49 @@
 
    <section id="b17rgdac">
     <title>Magic Spacebar For Reading Mail</title>
-    <para>With Magic Spacebar, you can easily read the unread messages in all the mail folders. You can read mail, scroll the mail and switch folders using the spacebar on your keyboard.</para>
-    <para>When you are on the Mail view, the spacebar will give you the following behavior:</para>
+    <para>With Magic Spacebar, you can easily read the unread messages in all the mail folders. You can read mail, scroll through mail and switch folders by using the Spacebar on your keyboard.</para>
+    <para>To enable Magic Spacebar:</para>
+    <orderedlist>
+     <listitem id="b1axmc7p">
+      <para>Click Edit &gt; Preferences &gt; Mail Preferences and select the Enable Magic Spacebar check box.</para>
+     </listitem>
+    </orderedlist>
+    <para>When you are in the Mail view, the Spacebar has the following behavior:</para>
     <itemizedlist>
      <listitem>
-      <para>When you press the spacebar for the first time, it takes you to the next unread message.</para>
+      <para>When you press the Spacebar for the first time, it takes you to the next unread message.</para>
      </listitem>
      <listitem>
-      <para>If the message is more than one screen long, the spacebar works as pagedown.</para>
+      <para>If the message is more than one screen long, the apacebar works as Page Down key.</para>
      </listitem>
      <listitem>
-      <para>If you press the spacebar after you reach the bottom of the page, it takes you to the next unread message if any.</para>
+      <para>If you press the Spacebar after you reach the bottom of the page, it takes you to the next unread message.</para>
      </listitem>
      <listitem>
-      <para>If there are no more unread messages in the mailbox,  pressing spacebar takes you to the next unread message in the next folder.</para>
+      <para>If there are no more unread messages in the mailbox,  pressing the Spacebar takes you to the next unread message in the next folder.</para>
      </listitem>
      <listitem>
-      <para>If new messages arrive in a number of folders, spacebar toggles between those folders. This feature allows you to switch to the next unread message in a different folder without having to click the folder.</para>
+      <para>If new messages arrive in a number of folders, the Spacebar toggles between those folders. This feature allows you to switch to the next unread message in a different folder without clicking the folder.</para>
      </listitem>
     </itemizedlist>
    </section>
 
    <section id="b13qb7i4">
     <title>Checking for New Mail</title>
-    <para>To check your mail, click Send/Receive in the toolbar. If you haven't created any mail accounts yet, the setup assistant asks you for the information it needs to check your e-mail. For information on creating mail accounts, see <link linkend="usage-mainwindow-starting">Starting Evolution for the First Time</link>.</para>
-    <note>
-     <para>âGet Mail' in the Evolution toolbar replaced with Send/Receive tool in SLED.</para>
-    </note>
-    <para>If this is your first time checking mail, or you haven't asked Evolution to store your password, you are prompted for the password. Enter your password to download your e-mail.</para>
+    <para>To check your mail, click Send/Receive in the toolbar. If you haven&apos;t created any mail accounts yet, the setup assistant asks you for the information it needs to check your e-mail. For information on creating mail accounts, see <link linkend="usage-mainwindow-starting">Starting Evolution for the First Time</link>.</para>
+    <para>If this is your first time checking mail, or you haven&apos;t asked Evolution to store your password, you are prompted for the password. Enter your password to download your e-mail.</para>
     <para>If you get an error message instead of mail, you probably need to check your network settings. To learn how to do that, see <link linkend="mail-prefs-headers">Mail Header Preferences</link>, or ask your system administrator.</para>
    </section>
 
    <section id="b17qh4uo">
     <title>New Mail Notification</title>
-    <para>Evolution notifies you of new e-mail arriving. When you receive a new mail in your inbox,  a blinking icon appears on the Switcher.</para>
+    <para>Evolution notifies you of new e-mail. When you receive a new mail in your inbox,  a blinking icon appears on the Switcher.</para>
     <mediaobject id="b1a5asi6"><imageobject><imagedata format="PNG" fileref="figures/evo_newmail.png"/></imageobject></mediaobject>
-    <para>You can also view a blinking icon <inlinegraphic format="PNG" fileref="figures/evo_blink.png"/>  in the notification area that disappears when you open the new e-mail. You can keep the mose over the <inlinegraphic format="PNG" fileref="figures/evo_blink.png"/> icon to view the notification message.</para>
+    <para>You can also view a blinking icon <inlinegraphic format="PNG" fileref="figures/evo_blink.png"/>  in the notification area that disappears when you open the new e-mail. Mouse over the <inlinegraphic format="PNG" fileref="figures/evo_blink.png"/> icon to view the notification message.</para>
    </section>
 
    <section id="b131ni8g">
-    <title>Vertical View Vs Classical View</title>
+    <title>Vertical View Versus Classical View</title>      
     <para>Evolution provides you vertical view in addition to the classical view. In the vertical view, message preview pane is located at the right side of the message list when compared to the Classical view where the message preview pane is placed below the message list. Vertical View enables you to use the extra width of the wide screen monitors.</para>
     <formalpara id="b131nl11">
      <title>Vertical View:</title>
@@ -1518,37 +1514,37 @@
     </orderedlist>
     <para>You can also drag a file into the composer window. If you want to send it as an inline attachment, right-click the attachment and click Properties, then select Automatic Display of Attachments.</para>
     <para>When you send the message, a copy of the attached file goes with it. Be aware that large attachments can take a long time to send and receive.</para>
-
-    <section id="b17rcxmf">
-     <title>Attachment Reminder:</title>
-     <para>With Attachment Reminder plugin enabled, Evolution reminds you to attach a file to your email if it appears that you have not. If it finds that you have missed to attach a file, a message is displayed as shown below:</para>
-     <mediaobject id="b17rcrvr"><imageobject><imagedata format="PNG" fileref="figures/attach_reminder_a.png.png"/></imageobject></mediaobject>
-     <orderedlist>
-      <listitem id="b17rctav">
-       <para>Click Continue Editing to attach the missing file you are reminded of, or click Send to send the message without any attachment.</para>
-      </listitem>
-     </orderedlist>
-     <para>To enable the Attachment Reminder,</para>
-     <orderedlist>
-      <listitem id="b17rclym">
-       <para>Select Edit &gt; Plugins &gt; Attachment Reminder.</para>
-      </listitem>
-      <listitem id="b17rcma2">
-       <para>Click Configure to add the keywords.</para>
-       <mediaobject id="b17rcni6"><imageobject><imagedata format="PNG" fileref="figures/evo_attachreminder_plugin.png"/></imageobject></mediaobject>
-       
-      </listitem>
-      <listitem id="b17rcq0r">
-       <para>Click Add to add keywords such as &ldquo;Attach&rdquo; or &ldquo;Attachment&rdquo;.</para>
-       <para>Based on the keywords you have added here, it searches every email you are sending. If it finds the keywords such as &ldquo;attach&rdquo; in your e-mail and no actual attached file, you are reminded of missing attachments.</para>
-      </listitem>
-      <listitem id="b1a57zh3">
-       <para>To edit any of the existing keywords, select the keyword and click Edit and modify.</para>
-      </listitem>
-     </orderedlist>
-    </section>
    </section>
-
+   <section id="b17rcxmf">
+    <title>Attachment Reminder:</title>
+    <para>Evolution has an Attachment Reminder plugin you can use to remind yourself to attach a file to an e-mail. If it determines that you have not attached the file, it displays the following message:</para>
+    <mediaobject id="b17rcrvr"><imageobject><imagedata format="PNG" fileref="figures/attach_reminder_a.png.png"/></imageobject></mediaobject>
+    <orderedlist>
+     <listitem id="b17rctav">
+      <para>Click Continue Editing to attach the missing file, or click Send to send the message without any attachment.</para>
+     </listitem>
+    </orderedlist>
+    <para>To enable the Attachment Reminder:</para>
+    <orderedlist>
+     <listitem id="b17rclym">
+      <para>Select Edit &gt; Plugins &gt; Attachment Reminder.</para>
+     </listitem>
+     <listitem id="b17rcma2">
+      <para>Click Configuration, then make sure that Remind Missing Attachments is selected.</para>
+      <mediaobject id="b17rcni6"><imageobject><imagedata format="PNG" fileref="figures/evo_attachreminder_plugin.png"/></imageobject></mediaobject>
+     </listitem>
+     <listitem id="b17rcq0r">
+      <para>Select keywords such as &quot;Attach&quot; or &quot;Attachment&quot; and click Add.</para>
+      <para>Based on the keywords you have added here, it searches every mail you are sending. If it finds the keywords such as &ldquo;attach&rdquo; in your mail and there is no actual attached file, you are reminded of missing attachments.</para>
+     </listitem>
+     <listitem id="b1a57zh3">
+      <para>To edit any of the existing keywords, select the keyword, click Edit, then modify the word as desired.</para>
+     </listitem>
+     <listitem id="b1a57zh4">
+      <para>When you have finished making your selections, click Close to exit the Plugin Manager.</para>
+     </listitem>
+    </orderedlist>
+   </section>
    <section id="usage-mail-getnsend-send-to-types">
     <title>Specifying Additional Recipients for E-Mail</title>
     <para>Evolution, like most e-mail programs, recognizes three types of addressee: primary recipients, secondary recipients, and hidden (blind) recipients. The simplest way to direct a message is to put the e-mail address or addresses in the To: field, which denotes primary recipients. Use the Cc: field to send a message to secondary recipients.</para>
@@ -2240,7 +2236,7 @@
 
  <chapter id="usage-mail-organize">
   <title>Organizing Your E-Mail</title>
-  <para>Whether you only get a few e-mail messages a day, or you receive hundreds, you probably want to sort and organize them. Evolutionâ has the tools to help you do it.</para>
+  <para>Whether you only get a few e-mail messages a day, or you receive hundreds, you probably want to sort and organize them. Evolution has the tools to help you do it.</para>
   <itemizedlist>
    <listitem>
     <para><link linkend="importing-mail-and-settings">Importing Your Old E-Mail</link></para>
@@ -3118,21 +3114,21 @@
 
   <section id="usage-mail-organize-spam">
    <title>Stopping Junk Mail (Spam)</title>
-   <para>Evolution can check for junk mail for you. Evolution uses SpamAssassin&z-3rdParty;  and/ or Bogofilter* with trainable Bayesian filters to perform the spam check. When the software detects mail that appears to be junk mail, it will flag it and hide it from your view. Messages that are flagged as junk mail are displayed only in the Junk folder.</para>
+   <para>Evolution can check for junk mail for you. Evolution uses SpamAssassin  and/ or Bogofilter with trainable Bayesian filters to perform the spam check. When the software detects mail that appears to be junk mail, it will flag it and hide it from your view. Messages that are flagged as junk mail are displayed only in the Junk folder.</para>
    <para>The junk mail filter can learn which kinds of mail are legitimate and which are not if you train it. When you first start using junk mail blocking, check the Junk folder to be sure that legitimate mail doesn't get flagged as junk mail. If good mail, is incorrectly flagged, remove it from the Junk folder by right-clicking it and selecting Mark as Not Junk or press Shift+Ctrl+J. If Evolution misses junk mail, right-click the message, then click Mark as Junk or press Ctrl+J. When you correct it, the filter can recognize similar messages in the future, and becomes more accurate as time goes on.</para>
    <para>Every filter needs to learn at the least 100 spam and 100 ham to start working. For that, you must  mark each message manually by clicking the <emphasis>Not junk</emphasis> button in the toolbar to learn that it is ham. The <emphasis>Junk</emphasis> button learns a message as spam.</para>
    <para>To change your junk mail filtering preferences, click Edit &gt; Preferences, then click Mail Preferences. For more information on this see, <link linkend="mail-prefs-junk">Junk Mail Preferences</link>.</para>
    <para>For additional junk mail settings, see <link linkend="more-mail-options">Receiving Mail Options</link>.</para>
    <note>
-    <para>SpamAssassin* is an application that scan through the mail box to find junk mails. Evolution uses SpamAssassin as the default spam-filtering application. For more information, see<ulink url="http://spamassassin.apache.org/";> The Apache SpamAssassin Project</ulink>.</para>
-    <para>Bogofilter* is a mail filter that classifies mail as spam or ham (non-spam) by a statistical analysis of the message's header and content (body). It is able to learn from the user's classifications and corrections. For more information on Bogofilter, see <ulink url="http://bogofilter.sourceforge.net/";>The Bogofilter site</ulink>.</para>
+    <para>SpamAssassin is an application that scan through the mail box to find junk mails. Evolution uses SpamAssassin as the default spam-filtering application. For more information, see<ulink url="http://spamassassin.apache.org/";> The Apache SpamAssassin Project</ulink>.</para>
+    <para>Bogofilter is a mail filter that classifies mail as spam or ham (non-spam) by a statistical analysis of the message's header and content (body). It is able to learn from the user's classifications and corrections. For more information on Bogofilter, see <ulink url="http://bogofilter.sourceforge.net/";>The Bogofilter site</ulink>.</para>
    </note>
   </section>
  </chapter>
 
  <chapter id="usage-contact">
   <title>Evolution Contacts: the Address Book</title>
-  <para>This section shows you how to use the Evolutionâ contacts tool to organize any amount of contact information, share addresses over a network, and save time with everyday tasks.</para>
+  <para>This section shows you how to use the Evolution contacts tool to organize any amount of contact information, share addresses over a network, and save time with everyday tasks.</para>
   <itemizedlist>
    <listitem>
     <para><link linkend="usage-contact-cards">Contacts and Cards</link></para>
@@ -3689,8 +3685,8 @@
   
    <section id="b1a47igh">
     <title>Google Calendar </title>
-    <para>Evolution allows you to access your Google calendar. You can view the Google calendar offline and create, modify and delete the calendar items online.</para>
-    <para>To integrate Google calendar to Evolution:</para>
+    <para>Evolution allows you to access your Google calendar. You can view the Google calendar offline or create, modify, and delete the calendar items online.</para>
+    <para>To integrate the Google calendar to Evolution:</para>
     <orderedlist>
      <listitem id="b1a47ou5">
       <para>Click New, then select Calendar to open the New Calendar dialog.</para>
@@ -3701,18 +3697,18 @@
       
      </listitem>
      <listitem id="b1a4aebo">
-      <para>Enter the following:</para>
+      <para>Specify the following:</para>
       <itemizedlist>
        <listitem>
         <formalpara id="b1a4aey4">
          <title>Name:</title>
-         <para>Specify a name for the Google calendar</para>
+         <para> Specify a name for the Google calendar</para>
         </formalpara>
        </listitem>
        <listitem>
         <formalpara id="b1a4af9o">
          <title>Username:</title>
-         <para>Specify your username for your Google account</para>
+         <para> Specify your username for your Google account</para>
         </formalpara>
        </listitem>
       </itemizedlist>
@@ -3721,14 +3717,14 @@
       <para>Set the time to automatically refresh the calendar. </para>
      </listitem>
      <listitem id="b1a4ak4r">
-      <para>Select Use SSL to enable SSL for communication between Evolution and Google server.</para>
+      <para>Select Use SSL to enable SSL for communication between Evolution and the Google server.</para>
      </listitem>
      <listitem id="b1a4amec">
-      <para>If you want to set a color label for the calendar, click the Color tab and select the desired color and click OK.</para>
+      <para>If you want to set a color label for the calendar, click the Color tab, select the desired color, then click OK.</para>
      </listitem>
      <listitem id="b1a4ao1h">
       <para>If you want to view the calendar items offline, select Copy calendar content locally for offline operation check box.</para>
-      <para>If you have marked for offline operation, you cannot modify or create the calendar items.</para>
+      <para>If you select this option, you cannot modify or create the calendar items.</para>
      </listitem>
      <listitem id="b1a4awms">
       <para>Click OK to save your modifications.</para>
@@ -4114,9 +4110,10 @@
 
   <section id="CHDJAEFJ">
    <title>Searching for Calendar Items</title>
+   <para>You can use a customized search, an advanced search, or a quick search to search for Calendar items.</para>
    <formalpara id="b131myk7">
     <title>Customized Search:</title>
-    <para>Evolution enables you to find the Calender items by using Customized Search. To start searching for various calendar items, use the following procedure:</para>
+    <para>Evolution enables you to find the Calendar items by using a Customized Search.</para>
    </formalpara>
    <orderedlist>
     <listitem id="b131n1cx">
@@ -4142,15 +4139,14 @@
    </orderedlist>
    <formalpara id="b17qbhpu">
     <title>Advanced Search:</title>
-    <para>You can perform an advanced search based on any of the search type mentioned above.</para>
+    <para>You can perform an advanced search based on any of the search types.</para>
    </formalpara>
-   <para>To perform an advanced search:</para>
    <orderedlist>
     <listitem id="b17qblvd">
      <para>Select the desired search type from the drop-down list.</para>
     </listitem>
     <listitem id="b17qbhvy">
-     <para>Select Advanced Search to open Advanced Search dialogue box.</para>
+     <para>Select Advanced Search to open Advanced Search dialog box.</para>
      <para>Search name field displays the search type you have selected.</para>
      <mediaobject id="b17qbkiq"><imageobject><imagedata format="PNG" fileref="figures/evo_cal_advsearch.png"/></imageobject></mediaobject>
      
@@ -4159,7 +4155,7 @@
      <para>Click Add to add rules.</para>
     </listitem>
     <listitem id="b17qcpti">
-     <para>Select the criteria and then, type a search entry in the given field.</para>
+     <para>Select the criteria, and then type a search entry in the given field.</para>
     </listitem>
     <listitem id="b17qcr6c">
      <para>Click OK.</para>
@@ -4170,9 +4166,8 @@
    </orderedlist>
    <formalpara id="b131n58d">
     <title>Quick Search:</title>
-    <para>Displays all the Calendar items that match the in-built criteria that you have selected from the drop-down list in the Search bar.</para>
+    <para>Displays all the Calendar items that match the criteria that you have selected from the drop-down list in the Search bar.</para>
    </formalpara>
-   <para>To perform quick search, perform the following procedure:</para>
    <orderedlist>
     <listitem id="b131n6zv">
      <para>Click the Show drop-down list.</para>
@@ -4258,7 +4253,7 @@
      </itemizedlist>
     </listitem>
    </orderedlist>
-   <para>You can view the desired items listed in the Calender view.</para>
+   <para>You can view the desired items listed in the Calendar view.</para>
   </section>
 
   <section id="CHDFEJGG">
@@ -4430,10 +4425,10 @@
    </section>
 
    <section id="b17qcv9q">
-    <title>Searching For Task Items</title>
+    <title>Searching for Task Items</title>
     <formalpara id="b17qcy13">
      <title>Customized Search:</title>
-     <para>Evolution enables you to find the task items by using Customized Search. To start searching for various task items, use the following procedure:</para>
+     <para>Evolution enables you to find the task items by using Customized Search.</para>
     </formalpara>
     <orderedlist>
      <listitem id="b17qcy7p">
@@ -4459,12 +4454,11 @@
     </orderedlist>
     <formalpara id="b17qczaw">
      <title>Advanced Search:</title>
-     <para>You can perform an advanced search based on any of the search type mentioned above.</para>
+     <para>You can perform an advanced search based on any of the search type.</para>
     </formalpara>
-    <para>To perform an advanced search:</para>
     <orderedlist>
      <listitem id="b17qczhr">
-      <para>Select Advanced Search to open Advanced Search dialogue box.</para>
+      <para>Select Advanced Search to open Advanced Search dialog box.</para>
       <para>Search name field displays the search type you have selected.</para>
       <mediaobject id="b17qcztn"><imageobject><imagedata format="PNG" fileref="figures/evo_cal_advsearch.png"/></imageobject></mediaobject>
       
@@ -4473,45 +4467,45 @@
       <para>Click Add to add rules.</para>
      </listitem>
      <listitem id="b17qd0b1">
-      <para>Select the criteria and then, type a search entry in the given field.</para>
+      <para>Select the criteria, and then type a search entry in the given field.</para>
      </listitem>
     </orderedlist>
     <formalpara id="b17qd1cq">
      <title>Quick Search:</title>
-     <para>Displays all the task items that match the in-built criteria that you have selected from the drop-down list at the top left side, just above the display pane.</para>
+     <para>Displays all the task items that match the criteria that you have selected from the drop-down list at the top left side, just above the display pane.</para>
     </formalpara>
     <para>This feature provides the following best quick search options. This allows you to quickly see when tasks are due, as it can become unwieldy for planning if you have a lot of tasks in hand.</para>
     <formalpara id="b17qeipm">
      <title>Any Category:</title>
-     <para>It shows all the tasks that fall under any category.</para>
+     <para>Displays all the tasks that fall under any category.</para>
     </formalpara>
     <formalpara id="b17qej5f">
      <title>Unmatched:</title>
-     <para>It shows all the tasks that do not fall under any of the categories listed here.</para>
+     <para>Displays all the tasks that do not fall under any of the categories listed here.</para>
     </formalpara>
     <formalpara id="b17qdqzj">
      <title>Next 7 Days' Tasks:</title>
-     <para>It shows all the active tasks that are due within the next seven dates. You can view all the tasks that end within the next seven days from the current date.</para>
+     <para>Displays all the active tasks that are due within the next seven days.</para>
     </formalpara>
     <formalpara id="b17qdsg5">
      <title>Active Tasks:</title>
-     <para>It shows all the tasks whose due date is yet to come. This allows you to see the date due for tasks due in the future.</para>
+     <para>Displays all the tasks whose due date is yet to come. This allows you to see the date due for tasks due in the future.</para>
     </formalpara>
     <formalpara id="b17qeai3">
      <title>Over Due Tasks:</title>
-     <para>It shows all the tasks whose end date has already passed.</para>
+     <para>Displays all the tasks whose end date has already passed.</para>
     </formalpara>
     <formalpara id="b17qed9o">
      <title>Completed Tasks:</title>
-     <para>It shows the tasks whose status is 100% completed.</para>
+     <para>Displays the tasks whose status is 100% completed.</para>
     </formalpara>
     <formalpara id="b17qei0d">
      <title>Tasks With Attachment:</title>
-     <para>It shows all the tasks with attachment.</para>
+     <para>It shows all the tasks with attachments.</para>
     </formalpara>
     <formalpara id="b17qejz7">
      <title>&lt;List of Categories&gt;:</title>
-     <para>Lists all the tasks that belong to a particular category such as Anniversary, Holidays, Gifts etc.</para>
+     <para>Lists all the tasks that belong to a particular category such as Anniversary, Holidays, Gifts, etc.</para>
     </formalpara>
     <para>To perform quick search,</para>
     <orderedlist>
@@ -4648,7 +4642,7 @@
    </orderedlist>
 
    <section id="b1012vdk">
-    <title>The Memo list</title>
+    <title>The Memo List</title>
     <para>As with calendars and tasks, you can create multiple memo lists. Each memo list is assigned a color, and you can use the Memos switcher to hide and show memos.</para>
     <para>To create a new memo list: </para>
     <orderedlist>
@@ -4665,10 +4659,11 @@
    </section>
 
    <section id="b17qeph9">
-    <title>Searching For Memo Items</title>
+    <title>Searching for Memo Items</title>
+    <para>You can use a customized search, an advanced search, or a quick search to search for Memo Items.</para>
     <formalpara id="b17qermf">
      <title>Customized Search:</title>
-     <para>Evolution enables you to find the Memo items by using Customized Search. To start searching for various Memo items, use the following procedure:</para>
+     <para>Evolution enables you to find the Memo items by using a Customized Search.</para>
     </formalpara>
     <orderedlist>
      <listitem id="b17qers6">
@@ -4694,15 +4689,14 @@
     </orderedlist>
     <formalpara id="b17qesf9">
      <title>Advanced Search:</title>
-     <para> You can perform an advanced search based on any of the search type mentioned above.</para>
+     <para> You can perform an advanced search based on any of the search types.</para>
     </formalpara>
-    <para>To perform an advanced search:</para>
     <orderedlist>
      <listitem id="b17qetff">
       <para>Select the desired search type from the drop-down list.</para>
      </listitem>
      <listitem id="b17qetjk">
-      <para>Select Advanced Search to open Advanced Search dialogue box.</para>
+      <para>Select Advanced Search to open Advanced Search dialog box.</para>
       <para>Search name field displays the search type you have selected.</para>
       <mediaobject id="b17qewa3"><imageobject><imagedata format="PNG" fileref="figures/evo_cal_advsearch.png"/></imageobject></mediaobject>
       
@@ -4711,7 +4705,7 @@
       <para>Click Add to add rules. </para>
      </listitem>
      <listitem id="b17qewzp">
-      <para>Select the criteria and then, type a search entry in the given field.</para>
+      <para>Select the criteria, then type a search entry in the given field.</para>
      </listitem>
      <listitem id="b17qexap">
       <para>Click OK.</para>
@@ -4722,9 +4716,8 @@
     </orderedlist>
     <formalpara id="b17qeyur">
      <title>Quick Search: </title>
-     <para>Displays all the Memo items that match the in-built criteria that you have selected from the Show drop-down list in the Search bar.</para>
+     <para>Displays all the Memo items that match the criteria that you have selected from the Show drop-down list in the Search bar.</para>
     </formalpara>
-    <para>To perform quick search, </para>
     <orderedlist>
      <listitem id="b17qezgk">
       <para>Click the Show drop-down list.</para>
@@ -5223,10 +5216,9 @@
     <section id="b17reixo">
      <title>Delegating Calendar Items</title>
      <para>You can send Meetings or Appointments on behalf of someone else if you have subscribed to his or her Calendar.</para>
-     <para>To delegate a Meeting,</para>
      <orderedlist>
       <listitem id="b17rf0ow">
-       <para>Select the delegator's calendar.</para>
+       <para>Select the delegator's Calendar.</para>
       </listitem>
       <listitem id="b17rekzs">
        <para>Open a new Meeting composer window.</para>
@@ -5235,9 +5227,8 @@
        <para>Add the recipients. </para>
       </listitem>
       <listitem id="b17renoo">
-       <para>Click Send after filling in all other informations required.</para>
-       <para>When the recipient receives the calendar item, he or she can read the message on top that the <emphasis>&lt;Delegator&gt;</emphasis> through <emphasis>&lt;Delegate&gt;</emphasis> requests your presence at the following meeting.</para>
-       <para>When a delegate receives the calendar item from another delegate, he or she can read that the &lt;<emphasis>Delegator</emphasis>&gt; through &lt;<emphasis>Delegate</emphasis>&gt; request the presence at the following meeting. Please respond of behalf of his or her &lt;<emphasis>Delegator</emphasis>&gt;.</para>
+       <para>Fill in the information, then click Send.</para>
+       <para>When the recipient receives the calendar item, a message indicates that the item was created by someone on behalf of the Delegator.</para>
       </listitem>
      </orderedlist>
     </section>
@@ -5255,7 +5246,7 @@
        <para>Click Edit &gt; Preferences or press Shift+Ctrl+S, then click the Exchange Settings tab.</para>
       </listitem>
       <listitem id="b17qx94g">
-       <para>Click Delegation Assistant to open the Delegates dialogue box.</para>
+       <para>Click Delegation Assistant to open the Delegates dialog box.</para>
        <mediaobject id="bxorvbh"><imageobject><imagedata format="PNG" fileref="figures/delgt-add.png"/></imageobject></mediaobject>
        
       </listitem>
@@ -5264,7 +5255,7 @@
        <para>Remember that the Global Address List (GAL) appears empty until you have searched for something in it.</para>
       </listitem>
       <listitem id="b17qxknb">
-       <para>Select the delegate and click Edit to open the delegate permission dialogue box.</para>
+       <para>Select the delegate and click Edit to open the delegate permission dialog box.</para>
        <mediaobject id="b17qxmcm"><imageobject><imagedata format="PNG" fileref="figures/evo_delegate_permission_a.png"/></imageobject></mediaobject>
        
       </listitem>
@@ -5291,7 +5282,7 @@
        <para>Click OK.</para>
       </listitem>
      </orderedlist>
-     <para>The delegate will be notified through a separate mail that he/she is being added to your list of delegates. The mail summarizes all the rights that has been assigned to him or her.</para>
+     <para>The delegate is notified through a separate mail that he or she is being added to your list of delegates. The mail summarizes all the rights that have been assigned to the delegate.</para>
     </section>
 
     <section id="exchange-delegated-to-you">
@@ -5810,11 +5801,11 @@
     <para>Evolution provides several ways for you to confirm that your item was delivered. You can easily track message status of any message you have sent. For example, you can see when an e-mail was delivered and when the recipient opened or deleted the e-mail.</para>
     <formalpara id="b17sa0q2">
      <title>Track an Item You Sent:</title>
-     <para>You can check the status in the Message Status window of an e-mail You have sent.</para>
+     <para> You can check the status in the Message Status window of an e-mail you have sent.</para>
     </formalpara>
     <formalpara id="b17sa0y1">
      <title>Receive Notification When the Item is Opened or Deleted:</title>
-     <para>You can receive notification when the recipient opens or deletes a message. For information, see <link linkend="Ak05sv1">Requesting a Reply for Items You Send</link>.</para>
+     <para> You can receive notification when the recipient opens or deletes a message. For information, see <link linkend="Ak05sv1">Requesting a Reply for Items You Send</link>.</para>
     </formalpara>
     <formalpara id="b17sa1iu">
      <title>Request a Reply:</title>
@@ -5822,9 +5813,7 @@
     </formalpara>
 
     <section id="b17qstbk">
-     <title>Status Tracking </title>
-     <para>You can enable Status Tracking before you send any messages.</para>
-     <para>To track the status of the message you are sending,</para>
+     <title>Enabling Status Tracking</title>
      <orderedlist>
       <listitem id="b17qt8ih">
        <para>In the Compose Message window, click Insert &gt; Send Options &gt; Status Tracking</para>
@@ -5840,13 +5829,10 @@
        <para>For more information, see <link linkend="Aal54a9">Checking the Status of an Item You Have Sent</link>.</para>
       </listitem>
       <listitem id="b17qtcil">
-       <para>Select the check box next to Auto-delete sent item to delete the sent item automatically from the Sent folder.</para>
+       <para>(Optional)Select the check box next to Auto-delete sent item to automatically delete the sent item from the Sent folder.</para>
       </listitem>
       <listitem id="b17qte6b">
-       <formalpara id="b17qte7x">
-        <title>Return Notification:</title>
-        <para>In the Return Notification, specify the type of return receipt you want.</para>
-       </formalpara>
+       <para>Under Return Notification, specify the type of return receipt you want.</para>
       </listitem>
       <listitem id="b17qtf00">
        <para>Click OK.</para>
@@ -5859,7 +5845,7 @@
      <orderedlist>
       <listitem id="Aaezj33">
        <para>Right-click an e-mail in your Sent folder, then click Track Message Status.</para>
-       <para>With Message Tracking, you will know when the item reached the recipients or read by them. You will also know exactly who received your message, who read your message, who deleted and when.</para>
+       <para>With Message Tracking, you know when the item reaches the recipients or is read by them. You also know exactly who received your message, who read your message, and who deleted it and when.</para>
       </listitem>
      </orderedlist>
     </section>
@@ -5887,49 +5873,43 @@
      <listitem id="Ak05z6c">
       <para>In the Compose Message window, click Insert &gt; Send Options.</para>
       <mediaobject id="Ak06ek0"><imageobject><imagedata format="PNG" fileref="figures/evo_sendstatus_a.png"/></imageobject></mediaobject>
-      
      </listitem>
      <listitem id="Ak05zcd">
       <para>Click Reply Requested, then specify when you want to receive the reply.</para>
       <para>If you select When Convenient, then Reply Requested: When Convenient appears at the top of the message. If you select Within x Days, then Reply Requested: By <varname>day month numeric day time year</varname> appears at the top of the message.</para>
      </listitem>
      <listitem id="b17qtynu">
-      <para>Click Set expiration date, and specify the number of date for the message to get expired.</para>
-      <para>Until the specified count of days have passed, your message remains in the recipient's Inbox.</para>
+      <para>Click Set Expiration Date, then specify the number of days for this message to remain in the recipient's Inbox.</para>
      </listitem>
      <listitem id="Ak060fu">
       <para>Click OK.</para>
      </listitem>
     </orderedlist>
    </section>
-
    <section id="b17qtwxt">
     <title>Setting Message Delivery Options</title>
-    <para>You can delay the delivery of an individual message by having them held in the Outbox for a specified time after clicking Send.</para>
+    <para>You can delay the delivery of an individual message by having it held in the Outbox for a specified time.</para>
     <orderedlist>
      <listitem id="b17qubge">
       <para>Click Delay message delivery.</para>
      </listitem>
      <listitem id="b17qubw7">
-      <para>Set the Date and Time until you want the message to be held in the Outbox.</para>
+      <para>Use the Date and Time options to specify how long the message should remain in the Outbox before it is sent to the recipient.</para>
      </listitem>
      <listitem id="b17qud1r">
       <para>Click OK.</para>
      </listitem>
     </orderedlist>
    </section>
-
    <section id="Aal4xf4">
     <title>Displaying Sent Items</title>
-    <para>You might want to display items you previously sent. For example, you can read a sent e-mail.</para>
     <orderedlist>
      <listitem id="Ak05v13">
       <para>Click the Sent Items folder in the Folder List.</para>
      </listitem>
     </orderedlist>
-    <para>All sent items reside in this folder unless you select a different folder for sent e-mail in the account editor default settings. For more information refer <link linkend="b17s9qmz">Changing Default Folder for Sent and Draft Items</link> under <link linkend="b13uhy6r">Default Settings</link>.</para>
+    <para>All sent items reside in this folder unless you select a different folder for sent e-mail in the account editor default settings. For more information, refer to <link linkend="b17s9qmz">Changing Default Folder for Sent and Draft Items</link> under <link linkend="b13uhy6r">Default Settings</link>.</para>
    </section>
-
    <section id="bxjm31g">
     <title>Delegating an Item</title>
     <orderedlist>
@@ -5946,13 +5926,11 @@
     <para>Each contact gets a copy of the appointment or meeting.</para>
 
     <section id="b17rea9d">
-     <title>Status Tracking</title>
-     <para>To track the status of the message you have sent,</para>
+     <title>Enabling Status Tracking</title>
      <orderedlist>
       <listitem id="b17rearj">
        <para>In the Compose Meeting window, click Insert &gt; Send Options &gt; Status Tracking</para>
        <mediaobject id="b17reckf"><imageobject><imagedata format="PNG" fileref="figures/evo_calstatus_a.png"/></imageobject></mediaobject>
-       
       </listitem>
       <listitem id="b17recrx">
        <para>Select the check box next to Create a sent item to track information.</para>
@@ -5962,13 +5940,10 @@
        <para>Based on this selection, you can view the status of the send message in the Sent Items folder.</para>
       </listitem>
       <listitem id="b17red21">
-       <para>Select the check box next to Auto-delete sent item to delete the sent item automatically from the Sent folder.</para>
+       <para>(Optional)Select the check box next to Auto-delete sent item to automatically delete the sent item from the Sent folder.</para>
       </listitem>
       <listitem id="b17red4i">
-       <formalpara id="b17red6q">
-        <title>Return Notification:</title>
-        <para>In the Return Notification, specify the type of return receipt you want.</para>
-       </formalpara>
+       <para>Under Return Notification, specify the type of return receipt you want.</para>
       </listitem>
       <listitem id="b17redc7">
        <para>Click OK.</para>
@@ -5977,7 +5952,7 @@
     </section>
    </section>
   </section>
-
+  
   <section id="Aai4ois">
    <title>Giving Other People Access to Your Mailbox or Calendar</title>
    <para>Use Proxy to manage another user's Mailbox and Calendar. Proxy lets you perform various actions, such as reading, accepting, and declining items on behalf of another user, within the restrictions the other user sets.</para>
@@ -6431,7 +6406,7 @@
      <para><link linkend="mail-prefs-html">HTML Mail Preferences</link></para>
     </listitem>
     <listitem>
-     <para><link linkend="mail-prefs-colors">Color Preferences</link></para>
+     <para><link linkend="mail-prefs-colors">Label Preferences</link></para>
     </listitem>
     <listitem>
      <para><link linkend="mail-prefs-headers">Mail Header Preferences</link></para>
@@ -6490,14 +6465,12 @@
 
    <section id="mail-prefs-colors">
     <title>Label Preferences</title>
-    <para>The Label preferences option lets you add color labels for different kinds of messages. You can add, edit or remove the labels. You can also assign colors to each label you have created. </para>
+    <para>The Label preferences option lets you add color labels for different kinds of messages. You can add, edit, or remove the labels. You can also assign colors to each label you create. You cannot remove the default labels.</para>
     <mediaobject id="b1ahji7w"><imageobject><imagedata format="PNG" fileref="figures/evo_labels_a.png"/></imageobject></mediaobject>
-    <note>
-     <para>You cannot remove the default labels.</para>
-    </note>
+    <para>To create a label:</para>
     <orderedlist>
      <listitem id="b1a58p9g">
-      <para>Click Add and specify the name in the Label Name dialog.</para>
+      <para>Click Add and specify the name in the Label Name dialog box.</para>
      </listitem>
      <listitem id="b1a58pyg">
       <para>Click the color tab and select a color, then click OK.</para>
@@ -6512,7 +6485,7 @@
       <para>Edit name and color, then click OK.</para>
      </listitem>
     </orderedlist>
-    <para>To assign a label for mail:</para>
+    <para>To assign a label to a specific e-mail message:</para>
     <orderedlist>
      <listitem id="b1a58ynk">
       <para>Right-click the message from the message preview.</para>
@@ -6538,19 +6511,19 @@
 
    <section id="mail-prefs-junk">
     <title>Junk Mail Preferences</title>
-    <para>You can check your incoming messages for junk content using Bogofilter or/and  SpamAssassin tool with trainable Bayesian filters.Note that you need to enable the respective junk plugins to enable junk filtering. </para>
-    <para>To enable junk filtering using SpamAssassin and/or Bogofilter,</para>
+    <para>You can check your incoming messages for junk content by using Bogofilter and  SpamAssassin* tools, which have trainable Bayesian filters. You need to enable the Junk plugins to start filtering junk mail.</para>
+    <para>To enable Junk plugins:</para>
     <orderedlist>
      <listitem id="b17rdxkm">
       <para>Select Edit &gt; Plugins </para>
      </listitem>
      <listitem id="b17rdxz8">
-      <para>Select Bogofilter junk plugin and SpamAssassin junk plugin.</para>
+      <para>Select the junk plugins you want. You can select either Bogofilter or SpamAssassin, or you can select both.</para>
      </listitem>
     </orderedlist>
     <formalpara id="b17rdsy5">
      <title>General:</title>
-     <para>You can enable checking incoming mails for junk contents and also decide how often you want to delete junk mails on exit. You also have the option to choose either SpamAssassin or Bogofilter or both. Click Check incoming mail for junk.</para>
+     <para>You can check incoming e-mail for junk contents and also decide how often you want to delete junk mail. You also have the option to choose either SpamAssassin or Bogofilter, or you can select both.</para>
     </formalpara>
     <formalpara id="bsaz9zd">
      <title>Checking Incoming Mail for Junk:</title>
@@ -6558,21 +6531,21 @@
     </formalpara>
     <formalpara id="b17xmakf">
      <title>Delete junk mails on exit:</title>
-     <para>Select Delete junk messages on exit and also specify when to delete the junk messages from the options (Every time, Once per day, Once per week, Once per month).</para>
+     <para>This option deletes junk messages when you exit. You can also specify when to delete the junk messages (every time, once per day, once per week, once per month).</para>
     </formalpara>
     <formalpara id="b17rfn2y">
      <title>Default junk plugin:</title>
-     <para>Select SpamAssassin or/and Bogofilter as your junk filter. You can view them only if you have enabled the respective plugins. When you select any option, it also reports if the underlying binary is available or not.</para>
+     <para>Select either SpamAssassin or Bogofilter, or both, as your junk filter. You can view them only if you have enabled the respective plugins. When you select any option, it also reports if the underlying binary is available or not.</para>
     </formalpara>
     <mediaobject id="b17rds6i"><imageobject><imagedata format="PNG" fileref="figures/evo_junk_a.png"/></imageobject></mediaobject>
     <formalpara id="b17rfjfx">
      <title>SpamAssassin Options:</title>
-     <para>Remote test performs filtering junk mails on remote servers. It also includes online tests, like checking for blacklisted message senders and ISPs. </para>
+     <para>Remote Test performs junk mail filtering on remote servers. It also includes online tests, like checking for blacklisted message senders and ISPs. </para>
     </formalpara>
-    <para>This option uses tests that require a network connection, such as checking to see if a message is in a list of known junk messages, or if the sender or gateway are blacklisted by anti-spam organizations.Online tests can make filtering slower, because remote tests add to the amount of time it takes to check for junk mail, but increase accuracy. When you select this option, you do not need to do any additional setup to make this work.</para>
+    <para>This option uses tests that require a network connection, such as checking to see if a message is in a list of known junk messages, or if the sender or gateway are blacklisted by anti-spam organizations. Online tests can make filtering slower, because remote tests add to the amount of time it takes to check for junk mail, but they increase accuracy. When you select this option, you do not need to do any additional setup.</para>
     <formalpara id="b17rfjnv">
      <title>Bogofilter Options:</title>
-     <para>Select Convert mail text to unicode to enable unicode based filtering. For more information on Bogofilter, see <ulink url="http://bogofilter.sourceforge.net/";>Bogofilter site</ulink>.</para>
+     <para>Select Convert mail text to Unicode to enable Unicode* filtering. For more information on Bogofilter, see the <ulink url="http://bogofilter.sourceforge.net/";>Bogofilter site</ulink>.</para>
     </formalpara>
     <note>
      <para>Check new messages for junk contents option under Edit &gt; Preferences &gt; Mail Accounts &gt; Edit &gt; Receiving option is enabled only for IMAP. Check incoming mail for junk option under Edit &gt; Prefernces &gt; Mail Preferences &gt; Junk &gt; General refers only to POP and Local Delivery.</para>
@@ -6645,7 +6618,7 @@
 
    <section id="bshpjuj">
     <title>Spell Checking</title>
-    <para>To choose a spell-checking language, select it here. You must install the gnome-spell package, available through ZENworks Linux Management, for spell-checking to be available in Evolution. Additional dictionaries are also available through Red Carpet and are detected automatically if you have installed them. You must also install the aspell package. If this is the case, please contact your packager. To have the composer automatically check your spelling while you type, select Check Spelling While I Type. You can set the color for misspelled words.</para>
+    <para>To choose a spell-checking language, select it here. You must install the gnome-spell package, for spell-checking to be available in Evolution. Additional dictionaries are also available through Red Carpet and are detected automatically if you have installed them. You must also install the aspell package. If this is the case, please contact your packager. To have the composer automatically check your spelling while you type, select Check Spelling While I Type. You can set the color for misspelled words.</para>
    </section>
   </section>
 
@@ -6903,10 +6876,10 @@
   
   <section id="b1a4ol61">
    <title>Debug Logs</title>
-   <para>Evolution allows you to view the error logs and set the display duration for the error message in the statusbar. When an error occurs, statusbar display the error message for the specified duration and then it is moved to the debug file. </para>
+   <para>Evolution allows you to view the error logs and set the display duration for the error messages that appear in the statusbar. When an error occurs, statusbar displays the error message for the specified time, then it is moved to the debug file.</para>
    <orderedlist>
     <listitem id="b1a4opqg">
-     <para>From Help menu, select Debug Logs.</para>
+     <para>From the Help menu, select Debug Logs.</para>
      <mediaobject id="b1a4or91"><imageobject><imagedata format="PNG" fileref="figures/evo_debuglogs_a.png"/></imageobject></mediaobject>
     </listitem>
     <listitem id="b1a4orv0">
@@ -6915,7 +6888,7 @@
     </listitem>
    </orderedlist>
    <note>
-    <para>The <inlinegraphic format="PNG" fileref="figures/evo_dialog-warning.png"/> icon indicates that the error message displayed is a warning. The <inlinegraphic format="PNG" fileref="figures/evo_dialog-info.png"/> icon is displayed with a &ldquo;for-your-information&rdquo; message.</para>
+    <para>The <inlinegraphic format="PNG" fileref="figures/evo_dialog-warning.png"/> icon indicates that the error message is a warning. The <inlinegraphic format="PNG" fileref="figures/evo_dialog-info.png"/> icon indicates an informational message.</para>
    </note>
   </section>
  </chapter>
@@ -7157,7 +7130,6 @@
   <title>Known Bugs and Limitations</title>
   <para>Evolutionâ bug tracking is done at the <ulink url="http://bugzilla.gnome.org";>GNOME bug tracking System</ulink>. You can use that, or the GNOME Bug Report Tool (known as bug-buddy at the command line) if you find bugs or want to request new features.</para>
   <para>A complete list of feature requests and other issues with Evolution is available online in the GNOME bug tracking system. You can learn more about the Evolution development process at the <ulink url="http://gnome.org/projects/evolution/developer.shtml";>Evolution Developer site</ulink>.</para>
-  <para>If you need additional help with Evolution, visit the <ulink url="http://support.novell.com";>Novell support site at</ulink>.</para>
  </appendix>
 
  <appendix id="authors">
@@ -7237,7 +7209,7 @@
   <glossentry id="automatic-indexing">
    <glossterm>automatic indexing</glossterm>
    <glossdef>
-    <para>A pre-downloading procedure that allows Novell Evolutionâ to quickly refer to data. It enables faster searches and decreases memory usage for data displays.</para>
+    <para>A pre-downloading procedure that allows Evolution to quickly refer to data. It enables faster searches and decreases memory usage for data displays.</para>
    </glossdef>
   </glossentry>
   <glossentry id="bsi89la">

Modified: branches/mbarnes-composer/help/Makefile.am
==============================================================================
--- branches/mbarnes-composer/help/Makefile.am	(original)
+++ branches/mbarnes-composer/help/Makefile.am	Wed Mar 26 19:54:10 2008
@@ -129,5 +129,5 @@
 	figures/ver_view_a.png 			\
 	figures/vfolder-createrule-fig.png 	
 
-DOC_LINGUAS = de el en_GB es fr oc ru sv mk
+DOC_LINGUAS = cs de el en_GB es fr oc ru sv mk
 

Modified: branches/mbarnes-composer/help/fr/figures/evo_attachreminder_plugin.png
==============================================================================
Binary files. No diff available.

Modified: branches/mbarnes-composer/help/fr/figures/mailer_preferences.png
==============================================================================
Binary files. No diff available.

Modified: branches/mbarnes-composer/mail/GNOME_Evolution_Mail.server.in.in
==============================================================================
--- branches/mbarnes-composer/mail/GNOME_Evolution_Mail.server.in.in	(original)
+++ branches/mbarnes-composer/mail/GNOME_Evolution_Mail.server.in.in	Wed Mar 26 19:54:10 2008
@@ -161,6 +161,30 @@
 
   </oaf_server>
 
+  <!-- Network Preferences -->
+  <oaf_server iid="OAFIID:GNOME_Evolution_Mail_NetworkPrefs_ConfigControl:@VERSION@"
+	      type="factory"
+	      location="OAFIID:GNOME_Evolution_Mail_Factory:@VERSION@">
+
+    <oaf_attribute name="repo_ids" type="stringv">
+      <item value="IDL:GNOME/Evolution/ConfigControl:@VERSION@"/>
+    </oaf_attribute>
+
+    <oaf_attribute name="evolution2:config_item:title" type="string"
+		   _value="Network Preferences"/>
+
+    <oaf_attribute name="evolution2:config_item:description" type="string"
+		   _value="Configure your network connection settings here"/>
+
+    <oaf_attribute name="evolution2:config_item:icon_name" type="string"
+		   value="stock_proxy"/>
+    
+    <oaf_attribute name="evolution2:config_item:priority" type="string" value="-8"/>
+    
+    <oaf_attribute name="name" type="string"
+		   _value="Evolution Network configuration control"/>
+
+  </oaf_server>
 </oaf_info>
 
 

Modified: branches/mbarnes-composer/mail/Makefile.am
==============================================================================
--- branches/mbarnes-composer/mail/Makefile.am	(original)
+++ branches/mbarnes-composer/mail/Makefile.am	Wed Mar 26 19:54:10 2008
@@ -164,6 +164,8 @@
 	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			\

Modified: branches/mbarnes-composer/mail/default/Makefile.am
==============================================================================
--- branches/mbarnes-composer/mail/default/Makefile.am	(original)
+++ branches/mbarnes-composer/mail/default/Makefile.am	Wed Mar 26 19:54:10 2008
@@ -1,4 +1,4 @@
 
-SUBDIRS=C zh_CN de es fi fr ja lt mk nl pl pt sv
+SUBDIRS=C zh_CN de es fi fr ja ko lt mk nl pl pt sv
 
 

Modified: branches/mbarnes-composer/mail/em-folder-browser.c
==============================================================================
--- branches/mbarnes-composer/mail/em-folder-browser.c	(original)
+++ branches/mbarnes-composer/mail/em-folder-browser.c	Wed Mar 26 19:54:10 2008
@@ -1104,7 +1104,7 @@
 			    }
 
 			    /* Create a camel vee folder */
-			    storeuri = g_strdup_printf("vfolder:%s/mail/vfolder", mail_component_peek_base_directory (mail_component_peek ()));
+			    storeuri = g_strdup_printf("vfolder:%s/vfolder", mail_component_peek_base_directory (mail_component_peek ()));
 			    vfolder_store = camel_session_get_store (session, storeuri, NULL);
 			    efb->account_search_vf = (CamelVeeFolder *)camel_vee_folder_new (vfolder_store,_("Account Search"),CAMEL_STORE_VEE_FOLDER_AUTO);
 
@@ -1153,7 +1153,7 @@
 
 		    if (!efb->all_account_search_vf) {
 			    /* Create a camel vee folder */
-			    storeuri = g_strdup_printf("vfolder:%s/mail/vfolder", mail_component_peek_base_directory (mail_component_peek ()));
+			    storeuri = g_strdup_printf("vfolder:%s/vfolder", mail_component_peek_base_directory (mail_component_peek ()));
 			    vfolder_store = camel_session_get_store (session, storeuri, NULL);
 			    efb->all_account_search_vf = (CamelVeeFolder *)camel_vee_folder_new (vfolder_store,_("All Account Search"),CAMEL_STORE_VEE_FOLDER_AUTO);
 

Modified: branches/mbarnes-composer/mail/em-folder-tree-model.c
==============================================================================
--- branches/mbarnes-composer/mail/em-folder-tree-model.c	(original)
+++ branches/mbarnes-composer/mail/em-folder-tree-model.c	Wed Mar 26 19:54:10 2008
@@ -339,8 +339,14 @@
 	if (model->state)
 		xmlFreeDoc (model->state);
 
-	if ((model->state = e_xml_parse_file (filename)))
-		return;
+	if ((model->state = e_xml_parse_file (filename)) != NULL) {
+		node = xmlDocGetRootElement (model->state);
+		if (!node || strcmp ((char *)node->name, "tree-state") != 0) {
+			/* it is not expected XML file, thus free it and use the default */
+			xmlFreeDoc (model->state);
+		} else
+			return;
+	}
 
 	/* setup some defaults - expand "Local Folders" and "Search Folders" */
 	model->state = xmlNewDoc ((const unsigned char *)"1.0");

Modified: branches/mbarnes-composer/mail/em-folder-tree.c
==============================================================================
--- branches/mbarnes-composer/mail/em-folder-tree.c	(original)
+++ branches/mbarnes-composer/mail/em-folder-tree.c	Wed Mar 26 19:54:10 2008
@@ -54,6 +54,7 @@
 #include "e-util/e-request.h"
 #include "e-util/e-icon-factory.h"
 #include "e-util/e-error.h"
+#include "e-util/e-util.h"
 
 #include "em-vfolder-rule.h"
 
@@ -566,7 +567,7 @@
 	EMFolderTreeModel *model;
 	EMFolderTree *emft;
 
-	model = em_folder_tree_model_new (mail_component_peek_base_directory (mail_component_peek ()));
+	model = em_folder_tree_model_new (e_get_user_data_dir ());
 	emft = (EMFolderTree *) em_folder_tree_new_with_model (model);
 	g_object_unref (model);
 
@@ -938,23 +939,6 @@
 }
 
 static void
-emft_drop_async__done (struct _DragDataReceivedAsync *m)
-{
-	gboolean success, delete;
-
-	/* ?? */
-	if (m->aborted) {
-		success = FALSE;
-		delete = FALSE;
-	} else {
-		success = !camel_exception_is_set (&m->base.ex);
-		delete = success && m->move && !m->moved;
-	}
-	
-	gtk_drag_finish (m->context, success, delete, GDK_CURRENT_TIME);
-}
-
-static void
 emft_drop_async__free (struct _DragDataReceivedAsync *m)
 {
 	g_object_unref(m->context);
@@ -969,7 +953,7 @@
 	sizeof (struct _DragDataReceivedAsync),
 	(MailMsgDescFunc) emft_drop_async__desc,
 	(MailMsgExecFunc) emft_drop_async__exec,
-	(MailMsgDoneFunc) emft_drop_async__done,
+	(MailMsgDoneFunc) NULL,
 	(MailMsgFreeFunc) emft_drop_async__free
 };
 

Modified: branches/mbarnes-composer/mail/em-folder-view.c
==============================================================================
--- branches/mbarnes-composer/mail/em-folder-view.c	(original)
+++ branches/mbarnes-composer/mail/em-folder-view.c	Wed Mar 26 19:54:10 2008
@@ -614,7 +614,7 @@
 		galviewsmaildir = g_build_filename (EVOLUTION_GALVIEWSDIR,
 						    "mail",
 						    NULL);
-		dir = g_build_filename (evolution_dir, "mail", "views", NULL);
+		dir = g_build_filename (evolution_dir, "views", NULL);
 		gal_view_collection_set_storage_directories (collection, galviewsmaildir, dir);
 		g_free (dir);
 		g_free (galviewsmaildir);

Modified: branches/mbarnes-composer/mail/em-folder-view.h
==============================================================================
--- branches/mbarnes-composer/mail/em-folder-view.h	(original)
+++ branches/mbarnes-composer/mail/em-folder-view.h	Wed Mar 26 19:54:10 2008
@@ -20,26 +20,39 @@
  *
  */
 
-
-#ifndef _EM_FOLDER_VIEW_H
-#define _EM_FOLDER_VIEW_H
+#ifndef EM_FOLDER_VIEW_H
+#define EM_FOLDER_VIEW_H
 
 #include <gtk/gtkvbox.h>
 #include <gtk/gtkprintoperation.h>
 #include "mail/em-popup.h"
 
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
+/* Standard GObject macros */
+#define EM_TYPE_FOLDER_VIEW \
+	(em_folder_view_get_type ())
+#define EM_FOLDER_VIEW(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), EM_TYPE_FOLDER_VIEW, EMFolderView))
+#define EM_FOLDER_VIEW_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), EM_TYPE_FOLDER_VIEW, EMFolderViewClass))
+#define EM_IS_FOLDER_VIEW(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), EM_TYPE_FOLDER_VIEW))
+#define EM_IS_FOLDER_VIEW_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), EM_TYPE_FOLDER_VIEW))
+#define EM_FOLDER_VIEW_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), EM_TYPE_FOLDER_VIEW, EMFolderViewClass))
+
+G_BEGIN_DECLS
 
 struct _MessageList;
 struct _EMFormatHTMLDisplay;
 struct _CamelFolder;
 struct _CamelMedium;
 
-#define EM_FOLDER_VIEW_GET_CLASS(emfv)  ((EMFolderViewClass *) G_OBJECT_GET_CLASS (emfv))
-
 typedef struct _EMFolderView EMFolderView;
 typedef struct _EMFolderViewClass EMFolderViewClass;
 
@@ -142,8 +155,6 @@
 void em_folder_view_set_hide_deleted(EMFolderView *emfv, gboolean status);
 void em_folder_view_setup_view_instance (EMFolderView *emfv);
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
 
-#endif /* ! _EM_FOLDER_VIEW_H */
+#endif /* EM_FOLDER_VIEW_H */

Modified: branches/mbarnes-composer/mail/em-format-html.c
==============================================================================
--- branches/mbarnes-composer/mail/em-format-html.c	(original)
+++ branches/mbarnes-composer/mail/em-format-html.c	Wed Mar 26 19:54:10 2008
@@ -46,6 +46,7 @@
 #include <libedataserver/e-time-utils.h>
 #include "e-util/e-icon-factory.h"
 #include "e-util/e-util-private.h"
+#include "e-util/e-util.h"
 
 #include <gtkhtml/gtkhtml.h>
 #include <gtkhtml/gtkhtml-embedded.h>
@@ -254,9 +255,12 @@
 			sizeof(EMFormatHTML), 0,
 			(GInstanceInitFunc)efh_init
 		};
-		const char *base_directory = mail_component_peek_base_directory (mail_component_peek ());
+		const char *base_directory = e_get_user_data_dir ();
 		char *path;
 
+		/* Trigger creation of mail component. */
+		mail_component_peek ();
+
 		efh_parent = g_type_class_ref(em_format_get_type());
 		type = g_type_register_static(em_format_get_type(), "EMFormatHTML", &info, 0);
 

Modified: branches/mbarnes-composer/mail/em-format.c
==============================================================================
--- branches/mbarnes-composer/mail/em-format.c	(original)
+++ branches/mbarnes-composer/mail/em-format.c	Wed Mar 26 19:54:10 2008
@@ -1193,7 +1193,7 @@
 	opart = camel_mime_part_new();
 	valid = camel_cipher_decrypt(context, part, opart, ex);
 	if (valid == NULL) {
-		em_format_format_error(emf, stream, ex->desc?ex->desc:_("Could not parse S/MIME message: Unknown error"));
+		em_format_format_error(emf, stream, "%s", ex->desc?ex->desc:_("Could not parse S/MIME message: Unknown error"));
 		em_format_part_as(emf, stream, part, NULL);
 	} else {
 		if (emfc == NULL)
@@ -1350,7 +1350,7 @@
 	if (valid == NULL) {
 		em_format_format_error(emf, stream, ex->desc?_("Could not parse PGP/MIME message"):_("Could not parse PGP/MIME message: Unknown error"));
 		if (ex->desc)
-			em_format_format_error(emf, stream, ex->desc);
+			em_format_format_error(emf, stream, "%s", ex->desc);
 		em_format_part_as(emf, stream, part, "multipart/mixed");
 	} else {
 		if (emfc == NULL)
@@ -1515,7 +1515,7 @@
 		if (valid == NULL) {
 			em_format_format_error(emf, stream, ex->desc?_("Error verifying signature"):_("Unknown error verifying signature"));
 			if (ex->desc)
-				em_format_format_error(emf, stream, ex->desc);
+				em_format_format_error(emf, stream, "%s", ex->desc);
 			em_format_part_as(emf, stream, part, "multipart/mixed");
 		} else {
 			if (emfc == NULL)
@@ -1586,7 +1586,7 @@
 	if (!valid) {
 		em_format_format_error(emf, stream, ex->desc?_("Error verifying signature"):_("Unknown error verifying signature"));
 		if (ex->desc)
-			em_format_format_error(emf, stream, ex->desc);
+			em_format_format_error(emf, stream, "%s", ex->desc);
 		em_format_format_source(emf, stream, ipart);
 		/* I think this will loop: em_format_part_as(emf, stream, part, "text/plain"); */
 		camel_exception_free(ex);
@@ -1658,7 +1658,7 @@
 	if (!valid) {
 		em_format_format_error(emf, stream, ex->desc?_("Could not parse PGP message"):_("Could not parse PGP message: Unknown error"));
 		if (ex->desc)
-			em_format_format_error(emf, stream, ex->desc);
+			em_format_format_error(emf, stream, "%s", ex->desc);
 		em_format_format_source(emf, stream, ipart);
 		/* I think this will loop: em_format_part_as(emf, stream, part, "text/plain"); */
 		camel_exception_free(ex);

Modified: branches/mbarnes-composer/mail/em-icon-stream.c
==============================================================================
--- branches/mbarnes-composer/mail/em-icon-stream.c	(original)
+++ branches/mbarnes-composer/mail/em-icon-stream.c	Wed Mar 26 19:54:10 2008
@@ -262,10 +262,13 @@
 }
 
 GdkPixbuf *
-em_icon_stream_get_image(const char *key, unsigned int maxwidth, unsigned int maxheight)
+em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int maxheight)
 {
 	struct _emis_cache_node *node;
 	GdkPixbuf *pb = NULL;
+	const char *key;
+
+	key = tkey ? tkey : "";
 
 	/* forces the cache to be setup if not */
 	em_icon_stream_get_type();
@@ -316,10 +319,13 @@
 }
 
 int
-em_icon_stream_is_resized(const char *key, unsigned int maxwidth, unsigned int maxheight)
+em_icon_stream_is_resized(const char *tkey, unsigned int maxwidth, unsigned int maxheight)
 {
 	int res = FALSE;
 	struct _emis_cache_node *node;
+	const char *key;
+
+	key = tkey ? tkey : "";
 
 	/* forces the cache to be setup if not */
 	em_icon_stream_get_type();

Modified: branches/mbarnes-composer/mail/em-message-browser.c
==============================================================================
--- branches/mbarnes-composer/mail/em-message-browser.c	(original)
+++ branches/mbarnes-composer/mail/em-message-browser.c	Wed Mar 26 19:54:10 2008
@@ -20,7 +20,6 @@
  *
  */
 
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -34,9 +33,7 @@
 #undef interface
 #endif
 
-#include <gtk/gtkscrolledwindow.h>
-#include <gtk/gtkbutton.h>
-
+#include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
 #include <gconf/gconf-client.h>
@@ -58,6 +55,9 @@
 
 #include "evolution-shell-component-utils.h" /* Pixmap stuff, sigh */
 
+#define EM_MESSAGE_BROWSER_GET_PRIVATE(obj) \
+	(G_TYPE_INSTANCE_GET_PRIVATE \
+	((obj), EM_TYPE_MESSAGE_BROWSER, EMMessageBrowserPrivate))
 
 #define DEFAULT_WIDTH  600
 #define DEFAULT_HEIGHT 400
@@ -66,144 +66,224 @@
 	GtkWidget *preview;	/* container for message display */
 };
 
-static void emmb_set_message(EMFolderView *emfv, const char *uid, int nomarkseen);
-static void emmb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state);
-
-static EMFolderViewClass *emmb_parent;
+static gpointer parent_class;
+static GtkAllocation window_size = { 0, 0, 0, 0 };
 
 static void
-free_one_ui_file (gpointer data,
-		  gpointer user_data)
+emmb_close (BonoboUIComponent *uid,
+            gpointer data,
+            const gchar *path)
 {
-	g_free (data);
+	EMMessageBrowser *emmb = data;
+	GtkWidget *toplevel;
+
+	toplevel = gtk_widget_get_toplevel (GTK_WIDGET (emmb));
+	gtk_widget_destroy (toplevel);
 }
 
+static BonoboUIVerb emmb_verbs[] = {
+	BONOBO_UI_UNSAFE_VERB ("MessageBrowserClose", emmb_close),
+	BONOBO_UI_VERB_END
+};
+
 static void
-emmb_init(GObject *o)
+emmb_set_message (EMFolderView *emfv,
+                  const gchar *uid,
+                  gint nomarkseen)
 {
-	EMMessageBrowser *emmb = (EMMessageBrowser *)o;
-	struct _EMMessageBrowserPrivate *p;
-
-	p = emmb->priv = g_malloc0(sizeof(struct _EMMessageBrowserPrivate));
-
-	((EMFolderView *)emmb)->preview_active = TRUE;
-
-	g_slist_foreach (emmb->view.ui_files, free_one_ui_file, NULL);
-	g_slist_free(emmb->view.ui_files);
+	EMMessageBrowser *emmb = EM_MESSAGE_BROWSER (emfv);
+	EMFolderViewClass *folder_view_class;
+	CamelMessageInfo *info;
 
-	emmb->view.ui_files = g_slist_append(NULL,
-					     g_build_filename (EVOLUTION_UIDIR,
-							       "evolution-mail-messagedisplay.xml",
-							       NULL));
-	emmb->view.ui_files = g_slist_append(emmb->view.ui_files,
-					     g_build_filename (EVOLUTION_UIDIR,
-							       "evolution-mail-message.xml",
-							       NULL));
+	/* Chain up to parent's set_message() method. */
+	folder_view_class = EM_FOLDER_VIEW_CLASS (parent_class);
+	folder_view_class->set_message (emfv, uid, nomarkseen);
 
-	/* currently: just use a scrolledwindow for preview widget */
-	p->preview = gtk_scrolled_window_new(NULL, NULL);
-	gtk_scrolled_window_set_policy((GtkScrolledWindow *)p->preview, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_set_shadow_type((GtkScrolledWindow *)p->preview, GTK_SHADOW_IN);
-	gtk_widget_show(p->preview);
+	if (uid == NULL) {
+		gtk_widget_destroy (GTK_WIDGET (emfv));
+		return;
+	}
 
-	gtk_container_add((GtkContainer *)p->preview, (GtkWidget *)emmb->view.preview->formathtml.html);
-	gtk_widget_show((GtkWidget *)emmb->view.preview->formathtml.html);
+	info = camel_folder_get_message_info (emfv->folder, uid);
 
-	gtk_widget_show(p->preview);
+	if (info != NULL) {
+		gtk_window_set_title (
+			GTK_WINDOW (emmb->window),
+			camel_message_info_subject (info));
+		camel_folder_free_message_info (emfv->folder, info);
+	}
 
-	gtk_box_pack_start ((GtkBox *)emmb, p->preview, TRUE, TRUE, 0);
-	gtk_box_pack_start((GtkBox *)emmb, em_format_html_get_search_dialog (emmb->view.preview), FALSE, FALSE, 0);
+	/* Well we don't know if it got displayed (yet) ... but whatever ... */
+	if (!nomarkseen)
+		camel_folder_set_message_flags (
+			emfv->folder, uid,
+			CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
 }
 
 static void
-emmb_finalise(GObject *o)
+emmb_activate (EMFolderView *emfv,
+               BonoboUIComponent *uic,
+               gint state)
 {
-	EMMessageBrowser *emmb = (EMMessageBrowser *)o;
+	EMFolderViewClass *folder_view_class;
+
+	folder_view_class = EM_FOLDER_VIEW_CLASS (parent_class);
 
-	g_free(emmb->priv);
-	((GObjectClass *)emmb_parent)->finalize(o);
+	if (state) {
+		/* Chain up to parent's activate() method. */
+		folder_view_class->activate (emfv, uic, state);
+
+		bonobo_ui_component_add_verb_list_with_data (
+			uic, emmb_verbs, emfv);
+		bonobo_ui_component_set_prop(
+			uic, "/commands/EditPaste", "sensitive", "0", NULL);
+	} else {
+		const BonoboUIVerb *verb;
+
+		for (verb = &emmb_verbs[0]; verb->cname; verb++)
+			bonobo_ui_component_remove_verb (uic, verb->cname);
+
+		/* Chain up to parent's activate() method. */
+		folder_view_class->activate (emfv, uic, state);
+	}
 }
 
 static void
-emmb_destroy(GtkObject *o)
+emmb_list_message_selected_cb (struct _MessageList *ml,
+                               const gchar *uid,
+                               EMMessageBrowser *emmb)
 {
-	EMMessageBrowser *emmb = (EMMessageBrowser *)o;
+	EMFolderView *emfv = EM_FOLDER_VIEW (emmb);
+	CamelMessageInfo *info;
 
-	if (emmb->view.list) {
-		gtk_widget_destroy((GtkWidget *)emmb->view.list);
-		emmb->view.list = NULL;
-	}
+	if (uid == NULL)
+		return;
+
+	info = camel_folder_get_message_info (emfv->folder, uid);
+	if (info == NULL)
+		return;
 
-	((GtkObjectClass *)emmb_parent)->destroy(o);
+	gtk_window_set_title (
+		GTK_WINDOW (emmb->window),
+		camel_message_info_subject (info));
+	gtk_widget_grab_focus (
+		GTK_WIDGET (emfv->preview->formathtml.html));
+
+	camel_folder_free_message_info (emfv->folder, info);
 }
 
 static void
-emmb_class_init(GObjectClass *klass)
+emmb_window_size_allocate (GtkWidget *widget,
+                           GtkAllocation *allocation)
 {
-	klass->finalize = emmb_finalise;
+	GConfClient *client;
 
-	((GtkObjectClass *)klass)->destroy = emmb_destroy;
+	/* FIXME Have GConfBridge handle this. */
 
-	((EMFolderViewClass *) klass)->update_message_style = FALSE;
+	/* save to in-memory variable for current session access */
+	window_size = *allocation;
 
-	((EMFolderViewClass *)klass)->set_message = emmb_set_message;
-	((EMFolderViewClass *)klass)->activate = emmb_activate;
+	/* save the setting across sessions */
+	client = gconf_client_get_default ();
+	gconf_client_set_int (
+		client, "/apps/evolution/mail/message_window/width",
+		window_size.width, NULL);
+	gconf_client_set_int (
+		client, "/apps/evolution/mail/message_window/height",
+		window_size.height, NULL);
+	g_object_unref (client);
 }
 
-GType
-em_message_browser_get_type(void)
+static int
+emmb_key_press_event_cb (EMMessageBrowser *emmb,
+                         GdkEventKey *event)
 {
-	static GType type = 0;
+	if (event->keyval == GDK_Escape) {
+		GtkWidget *toplevel;
 
-	if (type == 0) {
-		static const GTypeInfo info = {
-			sizeof(EMMessageBrowserClass),
-			NULL, NULL,
-			(GClassInitFunc)emmb_class_init,
-			NULL, NULL,
-			sizeof(EMMessageBrowser), 0,
-			(GInstanceInitFunc)emmb_init
-		};
-		emmb_parent = g_type_class_ref(em_folder_view_get_type());
-		type = g_type_register_static(em_folder_view_get_type(), "EMMessageBrowser", &info, 0);
+		toplevel = gtk_widget_get_toplevel (GTK_WIDGET (emmb));
+		gtk_widget_destroy (toplevel);
+		g_signal_stop_emission_by_name (emmb, "key-press-event");
+
+		return TRUE;
 	}
 
-	return type;
+	return FALSE;
 }
 
-static GtkAllocation window_size = { 0, 0, 0, 0 };
-
 static void
-window_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
+emmb_destroy (GtkObject *gtk_object)
 {
-	GConfClient *gconf;
+	EMFolderView *emfv = EM_FOLDER_VIEW (gtk_object);
 
-	/* save to in-memory variable for current session access */
-	window_size = *allocation;
+	if (emfv->list) {
+		gtk_widget_destroy (GTK_WIDGET (emfv->list));
+		emfv->list = NULL;
+	}
 
-	/* save the setting across sessions */
-	gconf = gconf_client_get_default ();
-	gconf_client_set_int (gconf, "/apps/evolution/mail/message_window/width", window_size.width, NULL);
-	gconf_client_set_int (gconf, "/apps/evolution/mail/message_window/height", window_size.height, NULL);
-	g_object_unref (gconf);
+	/* Chain up to parent's destroy() method. */
+	GTK_OBJECT_CLASS (parent_class)->destroy (gtk_object);
 }
 
 static void
-emmb_list_message_selected (struct _MessageList *ml, const char *uid, EMMessageBrowser *emmb)
+emmb_class_init (EMMessageBrowserClass *class)
 {
-	EMFolderView *emfv = (EMFolderView *) emmb;
-	CamelMessageInfo *info;
+	GtkObjectClass *gtk_object_class;
+	EMFolderViewClass *folder_view_class;
 
-	if (uid && (info = camel_folder_get_message_info (emfv->folder, uid))) {
-		gtk_window_set_title ((GtkWindow *) emmb->window, camel_message_info_subject (info));
-		gtk_widget_grab_focus ((GtkWidget *) (emmb->view.preview->formathtml.html));
-		camel_folder_free_message_info (emfv->folder, info);
-	}
+	parent_class = g_type_class_peek_parent (class);
+	g_type_class_add_private (class, sizeof (EMMessageBrowserPrivate));
+
+	gtk_object_class = GTK_OBJECT_CLASS (class);
+	gtk_object_class->destroy = emmb_destroy;
+
+	folder_view_class = EM_FOLDER_VIEW_CLASS (class);
+	folder_view_class->update_message_style = FALSE;
+	folder_view_class->set_message = emmb_set_message;
+	folder_view_class->activate = emmb_activate;
 }
 
-GtkWidget *em_message_browser_new(void)
+static void
+emmb_init (EMMessageBrowser *emmb)
 {
-	EMMessageBrowser *emmb = g_object_new(em_message_browser_get_type(), NULL);
+	EMFolderView *emfv = EM_FOLDER_VIEW (emmb);
+	GtkWidget *widget;
+	gchar *filename;
+
+	emmb->priv = EM_MESSAGE_BROWSER_GET_PRIVATE (emmb);
+
+	emfv->preview_active = TRUE;
+
+	g_slist_foreach (emfv->ui_files, (GFunc) g_free, NULL);
+	g_slist_free (emfv->ui_files);
+	emfv->ui_files = NULL;
+
+	filename = g_build_filename (
+		EVOLUTION_UIDIR, "evolution-mail-messagedisplay.xml", NULL);
+	emfv->ui_files = g_slist_append (emfv->ui_files, filename);
+
+	filename = g_build_filename (
+		EVOLUTION_UIDIR, "evolution-mail-message.xml", NULL);
+	emfv->ui_files = g_slist_append (emfv->ui_files, filename);
+
+	widget = gtk_scrolled_window_new (NULL, NULL);
+	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_widget_show (widget);
+	emmb->priv->preview = widget;
+
+	widget = GTK_WIDGET (emfv->preview->formathtml.html);
+	gtk_container_add (GTK_CONTAINER (emmb->priv->preview), widget);
+	gtk_widget_show (widget);
+
+	gtk_box_pack_start (
+		GTK_BOX (emmb), emmb->priv->preview, TRUE, TRUE, 0);
+	gtk_box_pack_start(
+		GTK_BOX (emmb), em_format_html_get_search_dialog (
+		emfv->preview), FALSE, FALSE, 0);
 
 	/** @HookPoint-EMMenu: Standalone Message View Menu
 	 * @Id: org.gnome.evolution.mail.messagebrowser
@@ -212,125 +292,109 @@
 	 *
 	 * The main menu of standalone message viewer.
 	 */
-	((EMFolderView *)emmb)->menu = em_menu_new("org.gnome.evolution.mail.messagebrowser");
-
-	return (GtkWidget *)emmb;
+	EM_FOLDER_VIEW (emmb)->menu =
+		em_menu_new ("org.gnome.evolution.mail.messagebrowser");
 }
 
-static int
-messagebrowser_key_pressed (EMMessageBrowser *emmb, GdkEventKey *event, void *user_data)
+GType
+em_message_browser_get_type (void)
 {
-	if (event->keyval == GDK_Escape) {
-		gtk_widget_destroy(gtk_widget_get_toplevel((GtkWidget *)emmb));
-		g_signal_stop_emission_by_name (emmb, "key-press-event");
-		return TRUE;
+	static GType type = 0;
+
+	if (G_UNLIKELY (type == 0)) {
+		static const GTypeInfo type_info = {
+			sizeof (EMMessageBrowserClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) emmb_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,  /* class_data */
+			sizeof (EMMessageBrowser),
+			0,     /* n_preallocs */
+			(GInstanceInitFunc) emmb_init,
+			NULL   /* value_table */
+		};
+
+		type = g_type_register_static (
+			EM_TYPE_FOLDER_VIEW, "EMMessageBrowser",
+			&type_info, 0);
 	}
 
-	return FALSE;
+	return type;
 }
 
-GtkWidget *em_message_browser_window_new(void)
+GtkWidget *
+em_message_browser_new (void)
+{
+	return g_object_new (EM_TYPE_MESSAGE_BROWSER, NULL);
+}
+
+GtkWidget *
+em_message_browser_window_new (void)
 {
 	EMMessageBrowser *emmb;
 	BonoboUIContainer *uicont;
 	BonoboUIComponent *uic;
 
-	emmb = (EMMessageBrowser *)em_message_browser_new();
-	gtk_widget_show((GtkWidget *)emmb);
-	/* FIXME: title set elsewhere? */
-	emmb->window = g_object_new(bonobo_window_get_type(), "title", "Evolution", NULL);
-	bonobo_window_set_contents((BonoboWindow *)emmb->window, (GtkWidget *)emmb);
+	emmb = (EMMessageBrowser *) em_message_browser_new ();
+	gtk_widget_show (GTK_WIDGET (emmb));
 
-	uicont = bonobo_window_get_ui_container((BonoboWindow *)emmb->window);
-	uic = bonobo_ui_component_new_default();
-	bonobo_ui_component_set_container(uic, BONOBO_OBJREF(uicont), NULL);
+	/* FIXME: title set elsewhere? */
+	emmb->window = g_object_new (
+		BONOBO_TYPE_WINDOW, "title", "Evolution", NULL);
+	bonobo_window_set_contents (
+		BONOBO_WINDOW (emmb->window), GTK_WIDGET (emmb));
+
+	uic = bonobo_ui_component_new_default ();
+	uicont = bonobo_window_get_ui_container (BONOBO_WINDOW (emmb->window));
+	bonobo_ui_component_set_container (uic, BONOBO_OBJREF (uicont), NULL);
 
-	em_folder_view_activate((EMFolderView *)emmb, uic, TRUE);
+	em_folder_view_activate (EM_FOLDER_VIEW (emmb), uic, TRUE);
 
 	if (window_size.width == 0) {
 		/* initialize @window_size with the previous session's size */
-		GConfClient *gconf;
-		GError *err = NULL;
 
-		gconf = gconf_client_get_default ();
+		/* FIXME Have GConfBridge handle this. */
+
+		GConfClient *client;
+		GError *error = NULL;
 
-		window_size.width = gconf_client_get_int (gconf, "/apps/evolution/mail/message_window/width", &err);
-		if (err != NULL) {
+		client = gconf_client_get_default ();
+
+		window_size.width = gconf_client_get_int (
+			client, "/apps/evolution/mail/message_window/width",
+			&error);
+		if (error != NULL) {
 			window_size.width = DEFAULT_WIDTH;
-			g_clear_error (&err);
+			g_clear_error (&error);
 		}
 
-		window_size.height = gconf_client_get_int (gconf, "/apps/evolution/mail/message_window/height", &err);
-		if (err != NULL) {
+		window_size.height = gconf_client_get_int (
+			client, "/apps/evolution/mail/message_window/height",
+			&error);
+		if (error != NULL) {
 			window_size.height = DEFAULT_HEIGHT;
-			g_clear_error (&err);
+			g_clear_error (&error);
 		}
 
-		g_object_unref (gconf);
+		g_object_unref (client);
 	}
 
-	gtk_window_set_default_size ((GtkWindow *) emmb->window, window_size.width, window_size.height);
-	g_signal_connect (emmb->window, "size-allocate", G_CALLBACK (window_size_allocate), NULL);
-	g_signal_connect (((EMFolderView *) emmb)->list, "message_selected", G_CALLBACK (emmb_list_message_selected), emmb);
-	g_signal_connect (emmb, "key-press-event" , G_CALLBACK (messagebrowser_key_pressed), NULL);
+	gtk_window_set_default_size (
+		GTK_WINDOW (emmb->window),
+		window_size.width, window_size.height);
+
+	g_signal_connect (
+		emmb->window, "size-allocate",
+		G_CALLBACK (emmb_window_size_allocate), NULL);
+	g_signal_connect (
+		EM_FOLDER_VIEW (emmb)->list, "message_selected",
+		G_CALLBACK (emmb_list_message_selected_cb), emmb);
+	g_signal_connect (
+		emmb, "key-press-event",
+		G_CALLBACK (emmb_key_press_event_cb), NULL);
 
 	/* cleanup? */
 
-	return (GtkWidget *)emmb;
-}
-
-/* ********************************************************************** */
-
-static void
-emmb_set_message(EMFolderView *emfv, const char *uid, int nomarkseen)
-{
-	EMMessageBrowser *emmb = (EMMessageBrowser *) emfv;
-	CamelMessageInfo *info;
-
-	emmb_parent->set_message(emfv, uid, nomarkseen);
-
-	if (uid == NULL) {
-		gtk_widget_destroy((GtkWidget *)emfv);
-		return;
-	}
-
-	if ((info = camel_folder_get_message_info (emfv->folder, uid))) {
-		gtk_window_set_title ((GtkWindow *) emmb->window, camel_message_info_subject (info));
-		camel_folder_free_message_info (emfv->folder, info);
-	}
-
-	/* Well we don't know if it got displayed (yet) ... but whatever ... */
-	if (!nomarkseen)
-		camel_folder_set_message_flags(emfv->folder, uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
-}
-
-static void
-emmb_close(BonoboUIComponent *uid, void *data, const char *path)
-{
-	EMMessageBrowser *emmb = data;
-
-	gtk_widget_destroy(gtk_widget_get_toplevel((GtkWidget *)emmb));
-}
-
-static BonoboUIVerb emmb_verbs[] = {
-	BONOBO_UI_UNSAFE_VERB ("MessageBrowserClose", emmb_close),
-	BONOBO_UI_VERB_END
-};
-
-static void
-emmb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state)
-{
-	if (state) {
-		emmb_parent->activate(emfv, uic, state);
-
-		bonobo_ui_component_add_verb_list_with_data(uic, emmb_verbs, emfv);
-		bonobo_ui_component_set_prop(uic, "/commands/EditPaste", "sensitive", "0", NULL);
-	} else {
-		const BonoboUIVerb *v;
-
-		for (v = &emmb_verbs[0]; v->cname; v++)
-			bonobo_ui_component_remove_verb(uic, v->cname);
-
-		emmb_parent->activate(emfv, uic, state);
-	}
+	return GTK_WIDGET (emmb);
 }

Modified: branches/mbarnes-composer/mail/em-message-browser.h
==============================================================================
--- branches/mbarnes-composer/mail/em-message-browser.h	(original)
+++ branches/mbarnes-composer/mail/em-message-browser.h	Wed Mar 26 19:54:10 2008
@@ -1,30 +1,55 @@
 
-#ifndef _EM_MESSAGE_BROWSER_H
-#define _EM_MESSAGE_BROWSER_H
+#ifndef EM_MESSAGE_BROWSER_H
+#define EM_MESSAGE_BROWSER_H
 
+#include <gtk/gtkwidget.h>
 #include "em-folder-view.h"
 
+/* Standard GObject macros */
+#define EM_TYPE_MESSAGE_BROWSER \
+	(em_message_browser_get_type ())
+#define EM_MESSAGE_BROWSER(obj) \
+	(G_TYPE_CHECK_INSTANCE_CAST \
+	((obj), EM_TYPE_MESSAGE_BROWSER, EMMessageBrowser))
+#define EM_MESSAGE_BROWSER_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_CAST \
+	((cls), EM_TYPE_MESSAGE_BROWSER, EMMessageBrowserClass))
+#define EM_IS_MESSAGE_BROWSER(obj) \
+	(G_TYPE_CHECK_INSTANCE_TYPE \
+	((obj), EM_TYPE_MESSAGE_BROWSER))
+#define EM_IS_MESSAGE_BROWSER_CLASS(cls) \
+	(G_TYPE_CHECK_CLASS_TYPE \
+	((cls), EM_TYPE_MESSAGE_BROWSER))
+#define EM_MESSAGE_BROWSER_GET_CLASS(obj) \
+	(G_TYPE_INSTANCE_GET_CLASS \
+	((obj), EM_TYPE_MESSAGE_BROWSER, EMMessageBrowserClass))
+
+G_BEGIN_DECLS
+
 typedef struct _EMMessageBrowser EMMessageBrowser;
 typedef struct _EMMessageBrowserClass EMMessageBrowserClass;
+typedef struct _EMMessageBrowserPrivate EMMessageBrowserPrivate;
 
 struct _EMMessageBrowser {
-	EMFolderView view;
+	EMFolderView parent;
 
 	/* container, if setup */
-	struct _GtkWidget *window;
+	GtkWidget *window;
 
-	struct _EMMessageBrowserPrivate *priv;
+	EMMessageBrowserPrivate *priv;
 };
 
 struct _EMMessageBrowserClass {
 	EMFolderViewClass parent_class;
 };
 
-GType em_message_browser_get_type(void);
+GType		em_message_browser_get_type	(void);
+
+GtkWidget *     em_message_browser_new		(void);
 
-GtkWidget *em_message_browser_new(void);
+/* Also sets up a bonobo container window w/ docks and so on. */
+GtkWidget *     em_message_browser_window_new	(void);
 
-/* also sets up a bonobo container window w/ docks and so on */
-GtkWidget *em_message_browser_window_new(void);
+G_END_DECLS
 
-#endif /* ! _EM_MESSAGE_BROWSER_H */
+#endif /* EM_MESSAGE_BROWSER_H */

Modified: branches/mbarnes-composer/mail/em-migrate.c
==============================================================================
--- branches/mbarnes-composer/mail/em-migrate.c	(original)
+++ branches/mbarnes-composer/mail/em-migrate.c	Wed Mar 26 19:54:10 2008
@@ -2813,6 +2813,31 @@
 	g_object_unref (client);
 }
 
+/* fixing typo in SpamAssassin name */
+static void
+em_update_sa_junk_setting_2_23 (void)
+{
+	GConfClient *client;
+	GConfValue  *key;
+
+	client = gconf_client_get_default ();
+
+	key = gconf_client_get (client, "/apps/evolution/mail/junk/default_plugin", NULL);
+	if (key) {
+		const char *str = gconf_value_get_string (key);
+
+		if (str && strcmp (str, "Spamassasin") == 0)
+			gconf_client_set_string (client, "/apps/evolution/mail/junk/default_plugin", "SpamAssassin", NULL);
+
+		gconf_value_free (key);
+		g_object_unref (client);
+
+		return;
+	}
+
+	g_object_unref (client);
+}
+
 int
 em_migrate (const char *evolution_dir, int major, int minor, int revision, CamelException *ex)
 {
@@ -2902,6 +2927,9 @@
 	if (major < 2 || (major == 2 && minor < 22))
 		em_update_message_notify_settings_2_21 ();
 
+	if (major < 2 || (major == 2 && minor < 24))
+		em_update_sa_junk_setting_2_23 ();
+
 #endif	/* !G_OS_WIN32 */
 	return 0;
 }

Modified: branches/mbarnes-composer/mail/em-popup.c
==============================================================================
--- branches/mbarnes-composer/mail/em-popup.c	(original)
+++ branches/mbarnes-composer/mail/em-popup.c	Wed Mar 26 19:54:10 2008
@@ -56,6 +56,7 @@
 #include <camel/camel-mime-utils.h>
 #include <camel/camel-mime-part.h>
 #include <camel/camel-url.h>
+#include <camel/camel-stream-mem.h>
 
 #include <camel/camel-vee-folder.h>
 #include <camel/camel-vtrash-folder.h>
@@ -697,6 +698,40 @@
 }
 
 static void
+emp_add_vcard (EPopup *ep, EPopupItem *item, void *data)
+{
+	EPopupTarget *target = ep->target;
+	CamelMimePart *part;
+	CamelDataWrapper *content;
+	CamelStreamMem *mem;
+	
+
+	if (target->type == EM_POPUP_TARGET_ATTACHMENTS)
+		part = ((EAttachment *) ((EMPopupTargetAttachments *) target)->attachments->data)->body;
+	else
+		part = ((EMPopupTargetPart *) target)->part;
+
+	if (!part)
+		return;
+
+	content = camel_medium_get_content_object (CAMEL_MEDIUM (part));
+	mem = CAMEL_STREAM_MEM (camel_stream_mem_new ());
+
+	if (camel_data_wrapper_decode_to_stream (content, CAMEL_STREAM (mem)) == -1 ||
+	    !mem->buffer->data)
+		g_warning ("Read part's content failed!");
+	else {
+		GString *vcard = g_string_new_len ((const gchar *) mem->buffer->data, mem->buffer->len);
+
+		em_utils_add_vcard (target->widget, vcard->str);
+
+		g_string_free (vcard, TRUE);
+	}
+
+	camel_object_unref (mem);
+}
+
+static void
 emp_standard_menu_factory(EPopup *emp, void *data)
 {
 	int i, len;
@@ -768,7 +803,6 @@
 					apps = gnome_vfs_mime_get_all_applications(name_type);
 			}
 		}
-		g_free (mime_type);
 
 		if (apps) {
 			GString *label = g_string_new("");
@@ -800,6 +834,23 @@
 			g_string_free(label, TRUE);
 			g_list_free(apps);
 		}
+
+		if (g_ascii_strcasecmp (mime_type, "text/x-vcard") == 0||
+		    g_ascii_strcasecmp (mime_type, "text/vcard") == 0) {
+			EPopupItem *item;
+
+			item = g_malloc0 (sizeof (*item));
+			item->type = E_POPUP_ITEM;
+			item->path = "00.00.vcf.00"; /* make it first item */
+			item->label = _("_Add to Address Book");
+			item->activate = emp_add_vcard;
+			item->user_data = NULL;
+			item->image = "contact-new";
+
+			e_popup_add_items (emp, g_slist_append (NULL, item), NULL, NULL, NULL);
+		}
+
+		g_free (mime_type);
 	}
 
 	for (i=0;i<len;i++) {

Modified: branches/mbarnes-composer/mail/em-utils.c
==============================================================================
--- branches/mbarnes-composer/mail/em-utils.c	(original)
+++ branches/mbarnes-composer/mail/em-utils.c	Wed Mar 26 19:54:10 2008
@@ -255,7 +255,7 @@
 		char *user;
 
 		fc = g_object_get_data ((GObject *) dialog, "context");
-		user = g_strdup_printf ("%s/mail/filters.xml",
+		user = g_strdup_printf ("%s/filters.xml",
 					mail_component_peek_base_directory (mail_component_peek ()));
 		rule_context_save ((RuleContext *) fc, user);
 		g_free (user);
@@ -293,7 +293,7 @@
 	}
 
 	fc = em_filter_context_new ();
-	user = g_strdup_printf ("%s/mail/filters.xml", base_directory);
+	user = g_strdup_printf ("%s/filters.xml", base_directory);
 	system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
 	rule_context_load ((RuleContext *) fc, system, user);
 	g_free (user);
@@ -666,39 +666,51 @@
 	g_free(type);
 }
 
-/**
- * em_utils_add_address:
- * @parent:
- * @email:
- *
- * Add address @email to the addressbook.
- **/
-void em_utils_add_address(struct _GtkWidget *parent, const char *email)
+/* one of email or vcard should be always NULL, never both of them */
+static void
+emu_add_address_or_vcard (struct _GtkWidget *parent, const char *email, const char *vcard)
 {
-	CamelInternetAddress *cia;
 	GtkWidget *win;
 	GtkWidget *control;
 	/*GtkWidget *socket;*/
-	char *buf;
+	char *email_buf = NULL;
 
-	cia = camel_internet_address_new ();
-	if (camel_address_decode ((CamelAddress *) cia, email) == -1) {
+	if (email) {
+		CamelInternetAddress *cia;
+
+		cia = camel_internet_address_new ();
+		if (camel_address_decode ((CamelAddress *) cia, email) == -1) {
+			camel_object_unref (cia);
+			return;
+		}
+
+		email_buf = camel_address_format ((CamelAddress *) cia);
 		camel_object_unref (cia);
-		return;
 	}
 
-	buf = camel_address_format ((CamelAddress *) cia);
-	camel_object_unref (cia);
-
 	win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 	gtk_window_set_title((GtkWindow *)win, _("Add address"));
-	gtk_window_set_transient_for((GtkWindow *)win, ((GtkWindow *)parent));
+
+	if (parent && !GTK_IS_WINDOW (parent)) {
+		parent = gtk_widget_get_toplevel (parent);
+		if (!parent || !(GTK_WIDGET_TOPLEVEL (parent)))
+			parent = NULL;
+	}
+
+	if (parent)
+		gtk_window_set_transient_for((GtkWindow *)win, ((GtkWindow *)parent));
+
 	gtk_window_set_position((GtkWindow *)win, GTK_WIN_POS_CENTER_ON_PARENT);
 	gtk_window_set_type_hint((GtkWindow *)win, GDK_WINDOW_TYPE_HINT_DIALOG);
 
 	control = bonobo_widget_new_control("OAFIID:GNOME_Evolution_Addressbook_AddressPopup:" BASE_VERSION, CORBA_OBJECT_NIL);
-	bonobo_widget_set_property((BonoboWidget *)control, "email", TC_CORBA_string, buf, NULL);
-	g_free (buf);
+
+	if (email_buf)
+		bonobo_widget_set_property ((BonoboWidget *) control, "email", TC_CORBA_string, email_buf, NULL);
+	else
+		bonobo_widget_set_property ((BonoboWidget *) control, "vcard", TC_CORBA_string, vcard, NULL);
+
+	g_free (email_buf);
 
 	bonobo_event_source_client_add_listener(bonobo_widget_get_objref((BonoboWidget *)control), emu_add_address_cb, NULL, NULL, win);
 
@@ -709,6 +721,29 @@
 	gtk_widget_show_all(win);
 }
 
+/**
+ * em_utils_add_address:
+ * @parent:
+ * @email:
+ *
+ * Add address @email to the addressbook.
+ **/
+void
+em_utils_add_address (struct _GtkWidget *parent, const char *email)
+{
+	emu_add_address_or_vcard (parent, email, NULL);
+}
+
+/**
+ * em_utils_add_vcard:
+ * Adds whole vCard to the addressbook.
+ **/
+void
+em_utils_add_vcard (struct _GtkWidget *parent, const char *vcard)
+{
+	emu_add_address_or_vcard (parent, NULL, vcard);
+}
+
 /* ********************************************************************** */
 /* Flag-for-Followup... */
 

Modified: branches/mbarnes-composer/mail/em-utils.h
==============================================================================
--- branches/mbarnes-composer/mail/em-utils.h	(original)
+++ branches/mbarnes-composer/mail/em-utils.h	Wed Mar 26 19:54:10 2008
@@ -61,6 +61,7 @@
 void em_utils_save_messages (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids);
 
 void em_utils_add_address(struct _GtkWidget *parent, const char *email);
+void em_utils_add_vcard(struct _GtkWidget *parent, const char *vcard);
 
 void em_utils_flag_for_followup (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids);
 void em_utils_flag_for_followup_clear (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids);

Modified: branches/mbarnes-composer/mail/evolution-mail.schemas.in
==============================================================================
--- branches/mbarnes-composer/mail/evolution-mail.schemas.in	(original)
+++ branches/mbarnes-composer/mail/evolution-mail.schemas.in	Wed Mar 26 19:54:10 2008
@@ -1073,7 +1073,7 @@
       <applyto>/apps/evolution/mail/junk/default_plugin</applyto>
       <owner>evolution-mail</owner>
       <type>string</type>
-      <default>Spamassasin</default>
+      <default>Bogofilter</default>
       <locale name="C">
          <short>The default plugin for Junk hook</short>
          <long>

Modified: branches/mbarnes-composer/mail/importers/mail-importer.c
==============================================================================
--- branches/mbarnes-composer/mail/importers/mail-importer.c	(original)
+++ branches/mbarnes-composer/mail/importers/mail-importer.c	Wed Mar 26 19:54:10 2008
@@ -396,9 +396,9 @@
 					break;
 				}
 			/* FIXME: need a better way to get default store location */
-			uri = g_strdup_printf("mbox:%s/mail/local#%s", mail_component_peek_base_directory(NULL), folder);
+			uri = g_strdup_printf("mbox:%s/local#%s", mail_component_peek_base_directory(NULL), folder);
 		} else {
-			uri = g_strdup_printf("mbox:%s/mail/local#%s/%s", mail_component_peek_base_directory(NULL), folderparent, folder);
+			uri = g_strdup_printf("mbox:%s/local#%s/%s", mail_component_peek_base_directory(NULL), folderparent, folder);
 		}
 
 		printf("importing to uri %s\n", uri);

Modified: branches/mbarnes-composer/mail/mail-autofilter.c
==============================================================================
--- branches/mbarnes-composer/mail/mail-autofilter.c	(original)
+++ branches/mbarnes-composer/mail/mail-autofilter.c	Wed Mar 26 19:54:10 2008
@@ -359,7 +359,7 @@
 	g_return_if_fail (msg != NULL);
 
 	fc = em_filter_context_new ();
-	user = g_strdup_printf ("%s/mail/filters.xml",
+	user = g_strdup_printf ("%s/filters.xml",
 				mail_component_peek_base_directory (mail_component_peek ()));
 	system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
 	rule_context_load ((RuleContext *)fc, system, user);
@@ -386,7 +386,7 @@
 	enewuri = em_uri_from_camel(newuri);
 
 	fc = em_filter_context_new ();
-	user = g_strdup_printf ("%s/mail/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
+	user = g_strdup_printf ("%s/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
 	system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
 	rule_context_load ((RuleContext *)fc, system, user);
 	g_free (system);
@@ -417,7 +417,7 @@
 	euri = em_uri_from_camel(uri);
 
 	fc = em_filter_context_new ();
-	user = g_strdup_printf ("%s/mail/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
+	user = g_strdup_printf ("%s/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
 	system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
 	rule_context_load ((RuleContext *)fc, system, user);
 	g_free (system);

Modified: branches/mbarnes-composer/mail/mail-component-factory.c
==============================================================================
--- branches/mbarnes-composer/mail/mail-component-factory.c	(original)
+++ branches/mbarnes-composer/mail/mail-component-factory.c	Wed Mar 26 19:54:10 2008
@@ -28,6 +28,7 @@
 #include "em-account-prefs.h"
 #include "em-mailer-prefs.h"
 #include "em-composer-prefs.h"
+#include "em-network-prefs.h"
 
 #include "mail-config-factory.h"
 #include "mail-config.h"
@@ -67,7 +68,8 @@
 		return BONOBO_OBJECT (component);
 	} else if (strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID) == 0
 		   || strcmp (component_id, EM_MAILER_PREFS_CONTROL_ID) == 0
-		   || strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID) == 0) {
+		   || strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID) == 0
+		   || strcmp (component_id, EM_NETWORK_PREFS_CONTROL_ID) == 0) {
 		return mail_config_control_factory_cb (factory, component_id, CORBA_OBJECT_NIL);
 	}
 

Modified: branches/mbarnes-composer/mail/mail-component.c
==============================================================================
--- branches/mbarnes-composer/mail/mail-component.c	(original)
+++ branches/mbarnes-composer/mail/mail-component.c	Wed Mar 26 19:54:10 2008
@@ -49,6 +49,7 @@
 #include "e-util/e-icon-factory.h"
 
 #include "misc/e-info-label.h"
+#include "e-util/e-util.h"
 #include "e-util/e-error.h"
 #include "e-util/e-util-private.h"
 #include "e-util/e-logger.h"
@@ -281,7 +282,7 @@
 	camel_exception_init(&ex);
 
 	url = camel_url_new("mbox:", NULL);
-	tmp = g_strdup_printf("%s/mail/local", p->base_directory);
+	tmp = g_build_filename (p->base_directory, "local", NULL);
 	camel_url_set_path(url, tmp);
 	g_free(tmp);
 	tmp = camel_url_to_string(url, 0);
@@ -356,7 +357,7 @@
 	MailComponentPrivate *priv = component->priv;
 
 	if (priv->search_context == NULL) {
-		char *user = g_build_filename(component->priv->base_directory, "mail/searches.xml", NULL);
+		char *user = g_build_filename(component->priv->base_directory, "searches.xml", NULL);
 		char *system = g_build_filename (EVOLUTION_PRIVDATADIR, "searchtypes.xml", NULL);
 
 		priv->search_context = (RuleContext *)em_search_context_new ();
@@ -516,6 +517,7 @@
 
 	if (emfv->folder) {
 		char *name, *title;
+		const char *use_name; /* will contain localized name, if necessary */
 		guint32 visible, unread, deleted, junked;
 		GPtrArray *selected;
 		GString *tmp = g_string_new("");
@@ -561,11 +563,12 @@
 		if (emfv->folder->parent_store == mail_component_peek_local_store(NULL)
 		    && (!strcmp (name, "Drafts") || !strcmp (name, "Inbox")
 			|| !strcmp (name, "Outbox") || !strcmp (name, "Sent")))
-			e_info_label_set_info(el, _(name), tmp->str);
+			use_name = _(name);
 		else
-			e_info_label_set_info(el, name, tmp->str);
+			use_name = name;
 
-		title = g_strdup_printf("%s (%s)", _(name), tmp->str);
+		e_info_label_set_info (el, use_name, tmp->str);
+		title = g_strdup_printf ("%s (%s)", use_name, tmp->str);
 		e_component_view_set_title(component_view, title);
 		g_free(title);
 
@@ -1046,7 +1049,7 @@
 	component = mail_component_peek ();
 
 	camel_exception_init (&ex);
-	if (em_migrate (component->priv->base_directory, major, minor, revision, &ex) == -1) {
+	if (em_migrate (e_get_user_data_dir (), major, minor, revision, &ex) == -1) {
 		GNOME_Evolution_Component_UpgradeFailed *failedex;
 
 		failedex = GNOME_Evolution_Component_UpgradeFailed__alloc();
@@ -1208,7 +1211,10 @@
 	priv->lock = g_mutex_new();
 	priv->quit_state = -1;
 
-	priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
+	/* FIXME This is used as both a filename and URI path throughout
+	 *       the mail code.  Need to clean this up; maybe provide a
+	 *       mail_component_get_base_uri() function. */
+	priv->base_directory = g_build_filename (e_get_user_data_dir (), "mail", NULL);
 #ifdef G_OS_WIN32
 	{
 		char *p = priv->base_directory;
@@ -1216,16 +1222,17 @@
 			*p++ = '/';
 	}
 #endif
-	if (g_mkdir_with_parents (priv->base_directory, 0777) == -1 && errno != EEXIST)
+
+	if (g_mkdir_with_parents (e_get_user_data_dir (), 0777) == -1 && errno != EEXIST)
 		abort ();
 
-	priv->model = em_folder_tree_model_new (priv->base_directory);
+	priv->model = em_folder_tree_model_new (e_get_user_data_dir ());
 	priv->logger = e_logger_create ("mail");
 	priv->activity_handler = e_activity_handler_new ();
 	e_activity_handler_set_logger (priv->activity_handler, priv->logger);
 	e_activity_handler_set_error_flush_time (priv->activity_handler, mail_config_get_error_timeout ()*1000);
 
-	mail_session_init (priv->base_directory);
+	mail_session_init (e_get_user_data_dir ());
 
 	priv->async_event = mail_async_event_new();
 	priv->store_hash = g_hash_table_new_full (
@@ -1635,6 +1642,7 @@
 	vbox = gtk_vbox_new (FALSE, 6);
 	hbox = gtk_hbox_new (FALSE, 6);	
 	gtk_container_add ((GtkContainer *) window, vbox);
+	/* Translators: This is the first part of the sentence "Show _errors in the status bar for" - XXX - "second(s)." */
 	label = gtk_label_new_with_mnemonic (_("Show _errors in the status bar for"));
 	gtk_box_pack_start ((GtkBox *) hbox, label, FALSE, FALSE, 6);
 	spin = gtk_spin_button_new_with_range(1.0, 60.0, 1.0);
@@ -1642,7 +1650,8 @@
 	g_signal_connect (spin, "value-changed", G_CALLBACK (spin_value_changed), NULL);
 	gtk_label_set_mnemonic_widget ((GtkLabel *) label, spin);
 	gtk_box_pack_start ((GtkBox *) hbox, spin, FALSE, FALSE, 6);
-	label = gtk_label_new_with_mnemonic (_("seconds."));
+	/* Translators: This is the second part of the sentence "Show _errors in the status bar for" - XXX - "second(s)." */
+	label = gtk_label_new_with_mnemonic (_("second(s)."));
 	gtk_box_pack_start ((GtkBox *) hbox, label, FALSE, FALSE, 6);
 	gtk_box_pack_start ((GtkBox *) vbox, hbox, FALSE, FALSE, 6);
 

Modified: branches/mbarnes-composer/mail/mail-config-factory.c
==============================================================================
--- branches/mbarnes-composer/mail/mail-config-factory.c	(original)
+++ branches/mbarnes-composer/mail/mail-config-factory.c	Wed Mar 26 19:54:10 2008
@@ -30,6 +30,7 @@
 #include "em-account-prefs.h"
 #include "em-composer-prefs.h"
 #include "em-mailer-prefs.h"
+#include "em-network-prefs.h"
 
 #include "mail-config-factory.h"
 
@@ -48,6 +49,8 @@
 		prefs = em_mailer_prefs_new ();
 	} else if (!strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID)) {
 		prefs = em_composer_prefs_new ();
+	} else if (!strcmp (component_id, EM_NETWORK_PREFS_CONTROL_ID)) {
+		prefs = em_network_prefs_new ();
 	} else {
 		g_return_val_if_reached(NULL);
 	}

Modified: branches/mbarnes-composer/mail/mail-config.c
==============================================================================
--- branches/mbarnes-composer/mail/mail-config.c	(original)
+++ branches/mbarnes-composer/mail/mail-config.c	Wed Mar 26 19:54:10 2008
@@ -377,7 +377,7 @@
 	config = g_new0 (MailConfig, 1);
 	config->gconf = gconf_client_get_default ();
 	config->mime_types = g_ptr_array_new ();
-	config->gtkrc = g_build_filename (g_get_home_dir (), ".evolution", "mail", "config", "gtkrc-mail-fonts", NULL);
+	config->gtkrc = g_build_filename (e_get_user_data_dir (), "mail", "config", "gtkrc-mail-fonts", NULL);
 
 	mail_config_clear ();
 
@@ -878,9 +878,9 @@
 	e_filename_make_safe (safe);
 	/* blah, easiest thing to do */
 	if (prefix[0] == '*')
-		tmp = g_strdup_printf ("%s/mail/%s%s.xml", base_directory, prefix + 1, safe);
+		tmp = g_strdup_printf ("%s/%s%s.xml", base_directory, prefix + 1, safe);
 	else
-		tmp = g_strdup_printf ("%s/mail/%s%s", base_directory, prefix, safe);
+		tmp = g_strdup_printf ("%s/%s%s", base_directory, prefix, safe);
 	g_free (safe);
 	return tmp;
 }
@@ -998,7 +998,7 @@
 
 	url = mail_config_folder_to_safe_url (folder);
 	basename = g_strdup_printf ("%s%s", prefix, url);
-	filename = g_build_filename (evolution_dir, "mail", "config", basename, NULL);
+	filename = g_build_filename (evolution_dir, "config", basename, NULL);
 	g_free (basename);
 	g_free (url);
 
@@ -1019,7 +1019,7 @@
 	struct stat st;
 	int i;
 
-	base_directory = mail_component_peek_base_directory (mail_component_peek ());
+	base_directory = e_get_user_data_dir ();
 	filename = g_build_filename (base_directory, "signatures", NULL);
 	if (g_lstat (filename, &st)) {
 		if (errno == ENOENT) {

Modified: branches/mbarnes-composer/mail/mail-config.glade
==============================================================================
--- branches/mbarnes-composer/mail/mail-config.glade	(original)
+++ branches/mbarnes-composer/mail/mail-config.glade	Wed Mar 26 19:54:10 2008
@@ -550,8 +550,8 @@
 			      <property name="invisible_char">*</property>
 			      <property name="activates_default">False</property>
 			      <accessibility>
-				<atkrelation target="identity_address_label" type="labelled-by"/>
 				<atkrelation target="label464" type="labelled-by"/>
+				<atkrelation target="identity_address_label" type="labelled-by"/>
 			      </accessibility>
 			    </widget>
 			    <packing>
@@ -633,8 +633,8 @@
 			      <property name="invisible_char">*</property>
 			      <property name="activates_default">False</property>
 			      <accessibility>
-				<atkrelation target="label464" type="labelled-by"/>
 				<atkrelation target="identity_full_name_label" type="labelled-by"/>
+				<atkrelation target="label464" type="labelled-by"/>
 			      </accessibility>
 			    </widget>
 			    <packing>
@@ -836,8 +836,8 @@
 			  <property name="invisible_char">*</property>
 			  <property name="activates_default">False</property>
 			  <accessibility>
-			    <atkrelation target="identity_organization_label" type="labelled-by"/>
 			    <atkrelation target="label466" type="labelled-by"/>
+			    <atkrelation target="identity_organization_label" type="labelled-by"/>
 			  </accessibility>
 			</widget>
 			<packing>
@@ -890,8 +890,8 @@
 			  <property name="invisible_char">*</property>
 			  <property name="activates_default">False</property>
 			  <accessibility>
-			    <atkrelation target="label466" type="labelled-by"/>
 			    <atkrelation target="reply_to_label" type="labelled-by"/>
+			    <atkrelation target="label466" type="labelled-by"/>
 			  </accessibility>
 			</widget>
 			<packing>
@@ -6674,7 +6674,7 @@
 		    <widget class="GtkCheckButton" id="junk_header_check">
 		      <property name="visible">True</property>
 		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">C_heck custom headers for junk</property>
+		      <property name="label" translatable="yes">Check cu_stom headers for junk</property>
 		      <property name="use_underline">True</property>
 		      <property name="relief">GTK_RELIEF_NORMAL</property>
 		      <property name="focus_on_click">True</property>
@@ -6779,7 +6779,7 @@
 		    <widget class="GtkCheckButton" id="lookup_book">
 		      <property name="visible">True</property>
 		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Do _not mark messages as junk if sender is in my addressbook</property>
+		      <property name="label" translatable="yes">Do not mar_k messages as junk if sender is in my addressbook</property>
 		      <property name="use_underline">True</property>
 		      <property name="relief">GTK_RELIEF_NORMAL</property>
 		      <property name="focus_on_click">True</property>
@@ -9053,4 +9053,770 @@
   </child>
 </widget>
 
+<widget class="GtkWindow" id="network_prefs_tab">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">window1</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkNotebook" id="network_preferences_toplevel">
+      <property name="visible">True</property>
+      <property name="can_focus">True</property>
+      <property name="show_tabs">True</property>
+      <property name="show_border">True</property>
+      <property name="tab_pos">GTK_POS_TOP</property>
+      <property name="scrollable">False</property>
+      <property name="enable_popup">False</property>
+
+      <child>
+	<widget class="GtkVBox" id="vboxGeneral">
+	  <property name="border_width">12</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">18</property>
+
+	  <child>
+	    <widget class="GtkVBox" id="frameProxy">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label76">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Proxy Settings&lt;/span&gt;</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vboxProxy">
+		  <property name="border_width">12</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">8</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="rdoSysSettings">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Use system defaults</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="rdoNoProxy">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Direct connection to the Internet</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">rdoSysSettings</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="rdoManualProxy">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Manual proxy configuration:</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">rdoSysSettings</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment27">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">24</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox18">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkTable" id="table8">
+			      <property name="visible">True</property>
+			      <property name="n_rows">4</property>
+			      <property name="n_columns">4</property>
+			      <property name="homogeneous">False</property>
+			      <property name="row_spacing">6</property>
+			      <property name="column_spacing">6</property>
+
+			      <child>
+				<widget class="GtkLabel" id="lblHttpHost">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">H_TTP Proxy:</property>
+				  <property name="use_underline">True</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="mnemonic_widget">txtHttpHost</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">0</property>
+				  <property name="right_attach">1</property>
+				  <property name="top_attach">0</property>
+				  <property name="bottom_attach">1</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="lblHttpsHost">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_Secure HTTP Proxy:</property>
+				  <property name="use_underline">True</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="mnemonic_widget">txtHttpsHost</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">0</property>
+				  <property name="right_attach">1</property>
+				  <property name="top_attach">1</property>
+				  <property name="bottom_attach">2</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="lblSocksHost">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">S_OCKS Host:</property>
+				  <property name="use_underline">True</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="mnemonic_widget">txtSocksHost</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">0</property>
+				  <property name="right_attach">1</property>
+				  <property name="top_attach">2</property>
+				  <property name="bottom_attach">3</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="lblIgnoreHosts">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">No _Proxy for:</property>
+				  <property name="use_underline">True</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="mnemonic_widget">txtIgnoreHosts</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">0</property>
+				  <property name="right_attach">1</property>
+				  <property name="top_attach">3</property>
+				  <property name="bottom_attach">4</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkEntry" id="txtHttpHost">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="editable">True</property>
+				  <property name="visibility">True</property>
+				  <property name="max_length">0</property>
+				  <property name="text" translatable="yes"></property>
+				  <property name="has_frame">True</property>
+				  <property name="invisible_char">*</property>
+				  <property name="activates_default">False</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">1</property>
+				  <property name="right_attach">2</property>
+				  <property name="top_attach">0</property>
+				  <property name="bottom_attach">1</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkEntry" id="txtHttpsHost">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="editable">True</property>
+				  <property name="visibility">True</property>
+				  <property name="max_length">0</property>
+				  <property name="text" translatable="yes"></property>
+				  <property name="has_frame">True</property>
+				  <property name="invisible_char">*</property>
+				  <property name="activates_default">False</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">1</property>
+				  <property name="right_attach">2</property>
+				  <property name="top_attach">1</property>
+				  <property name="bottom_attach">2</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkEntry" id="txtSocksHost">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="editable">True</property>
+				  <property name="visibility">True</property>
+				  <property name="max_length">0</property>
+				  <property name="text" translatable="yes"></property>
+				  <property name="has_frame">True</property>
+				  <property name="invisible_char">*</property>
+				  <property name="activates_default">False</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">1</property>
+				  <property name="right_attach">2</property>
+				  <property name="top_attach">2</property>
+				  <property name="bottom_attach">3</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="lblHttpPort">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Port:</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">2</property>
+				  <property name="right_attach">3</property>
+				  <property name="top_attach">0</property>
+				  <property name="bottom_attach">1</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="lblHttpsPort">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Port:</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">2</property>
+				  <property name="right_attach">3</property>
+				  <property name="top_attach">1</property>
+				  <property name="bottom_attach">2</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="lblSocksPort">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Port:</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">2</property>
+				  <property name="right_attach">3</property>
+				  <property name="top_attach">2</property>
+				  <property name="bottom_attach">3</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkSpinButton" id="spnHttpPort">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="climb_rate">1</property>
+				  <property name="digits">0</property>
+				  <property name="numeric">False</property>
+				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+				  <property name="snap_to_ticks">False</property>
+				  <property name="wrap">False</property>
+				  <property name="adjustment">0 0 65535 1 10 10</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">3</property>
+				  <property name="right_attach">4</property>
+				  <property name="top_attach">0</property>
+				  <property name="bottom_attach">1</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkSpinButton" id="spnHttpsPort">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="climb_rate">1</property>
+				  <property name="digits">0</property>
+				  <property name="numeric">False</property>
+				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+				  <property name="snap_to_ticks">False</property>
+				  <property name="wrap">False</property>
+				  <property name="adjustment">0 0 65535 1 10 10</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">3</property>
+				  <property name="right_attach">4</property>
+				  <property name="top_attach">1</property>
+				  <property name="bottom_attach">2</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkSpinButton" id="spnSocksPort">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="climb_rate">1</property>
+				  <property name="digits">0</property>
+				  <property name="numeric">False</property>
+				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+				  <property name="snap_to_ticks">False</property>
+				  <property name="wrap">False</property>
+				  <property name="adjustment">0 0 65535 1 10 10</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">3</property>
+				  <property name="right_attach">4</property>
+				  <property name="top_attach">2</property>
+				  <property name="bottom_attach">3</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkEntry" id="txtIgnoreHosts">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="editable">True</property>
+				  <property name="visibility">True</property>
+				  <property name="max_length">0</property>
+				  <property name="text" translatable="yes"></property>
+				  <property name="has_frame">True</property>
+				  <property name="invisible_char">*</property>
+				  <property name="activates_default">False</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">1</property>
+				  <property name="right_attach">4</property>
+				  <property name="top_attach">3</property>
+				  <property name="bottom_attach">4</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="chkUseAuth">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Use Authe_ntication</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkAlignment" id="alignment26">
+			      <property name="visible">True</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xscale">1</property>
+			      <property name="yscale">1</property>
+			      <property name="top_padding">0</property>
+			      <property name="bottom_padding">0</property>
+			      <property name="left_padding">24</property>
+			      <property name="right_padding">0</property>
+
+			      <child>
+				<widget class="GtkTable" id="table11">
+				  <property name="visible">True</property>
+				  <property name="n_rows">2</property>
+				  <property name="n_columns">2</property>
+				  <property name="homogeneous">False</property>
+				  <property name="row_spacing">3</property>
+				  <property name="column_spacing">6</property>
+
+				  <child>
+				    <widget class="GtkLabel" id="lblAuthUser">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Us_ername:</property>
+				      <property name="use_underline">True</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_LEFT</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				      <property name="mnemonic_widget">txtAuthUser</property>
+				      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				      <property name="width_chars">-1</property>
+				      <property name="single_line_mode">False</property>
+				      <property name="angle">0</property>
+				    </widget>
+				    <packing>
+				      <property name="left_attach">0</property>
+				      <property name="right_attach">1</property>
+				      <property name="top_attach">0</property>
+				      <property name="bottom_attach">1</property>
+				      <property name="x_options">fill</property>
+				      <property name="y_options"></property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkLabel" id="lblAuthPwd">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Pass_word:</property>
+				      <property name="use_underline">True</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_LEFT</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				      <property name="mnemonic_widget">txtAuthPwd</property>
+				      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				      <property name="width_chars">-1</property>
+				      <property name="single_line_mode">False</property>
+				      <property name="angle">0</property>
+				    </widget>
+				    <packing>
+				      <property name="left_attach">0</property>
+				      <property name="right_attach">1</property>
+				      <property name="top_attach">1</property>
+				      <property name="bottom_attach">2</property>
+				      <property name="x_options">fill</property>
+				      <property name="y_options"></property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkEntry" id="txtAuthUser">
+				      <property name="visible">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="editable">True</property>
+				      <property name="visibility">True</property>
+				      <property name="max_length">0</property>
+				      <property name="text" translatable="yes"></property>
+				      <property name="has_frame">True</property>
+				      <property name="invisible_char">*</property>
+				      <property name="activates_default">False</property>
+				    </widget>
+				    <packing>
+				      <property name="left_attach">1</property>
+				      <property name="right_attach">2</property>
+				      <property name="top_attach">0</property>
+				      <property name="bottom_attach">1</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkEntry" id="txtAuthPwd">
+				      <property name="visible">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="editable">True</property>
+				      <property name="visibility">False</property>
+				      <property name="max_length">0</property>
+				      <property name="text" translatable="yes"></property>
+				      <property name="has_frame">True</property>
+				      <property name="invisible_char">*</property>
+				      <property name="activates_default">False</property>
+				    </widget>
+				    <packing>
+				      <property name="left_attach">1</property>
+				      <property name="right_attach">2</property>
+				      <property name="top_attach">1</property>
+				      <property name="bottom_attach">2</property>
+				    </packing>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="rdoAutoConfig">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Automatic proxy configuration URL:</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">rdoSysSettings</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment36">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">24</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkEntry" id="txtAutoConfigUrl">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="tab_expand">False</property>
+	  <property name="tab_fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="lblGeneral">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">General</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">-1</property>
+	  <property name="single_line_mode">False</property>
+	  <property name="angle">0</property>
+	</widget>
+	<packing>
+	  <property name="type">tab</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
 </glade-interface>

Modified: branches/mbarnes-composer/mail/mail-folder-cache.c
==============================================================================
--- branches/mbarnes-composer/mail/mail-folder-cache.c	(original)
+++ branches/mbarnes-composer/mail/mail-folder-cache.c	Wed Mar 26 19:54:10 2008
@@ -646,13 +646,13 @@
 	e_filename_make_safe(olduri);
 	newuri = folder_to_url(si->store, fi->full_name);
 	e_filename_make_safe(newuri);
-	oldfile = g_strdup_printf("%s/mail/config/custom_view-%s.xml", mail_component_peek_base_directory(NULL), olduri);
-	newfile = g_strdup_printf("%s/mail/config/custom_view-%s.xml", mail_component_peek_base_directory(NULL), newuri);
+	oldfile = g_strdup_printf("%s/config/custom_view-%s.xml", mail_component_peek_base_directory(NULL), olduri);
+	newfile = g_strdup_printf("%s/config/custom_view-%s.xml", mail_component_peek_base_directory(NULL), newuri);
 	g_rename(oldfile, newfile);
 	g_free(oldfile);
 	g_free(newfile);
-	oldfile = g_strdup_printf("%s/mail/config/current_view-%s.xml", mail_component_peek_base_directory(NULL), olduri);
-	newfile = g_strdup_printf("%s/mail/config/current_view-%s.xml", mail_component_peek_base_directory(NULL), newuri);
+	oldfile = g_strdup_printf("%s/config/current_view-%s.xml", mail_component_peek_base_directory(NULL), olduri);
+	newfile = g_strdup_printf("%s/config/current_view-%s.xml", mail_component_peek_base_directory(NULL), newuri);
 	g_rename(oldfile, newfile);
 	g_free(oldfile);
 	g_free(newfile);

Modified: branches/mbarnes-composer/mail/mail-ops.c
==============================================================================
--- branches/mbarnes-composer/mail/mail-ops.c	(original)
+++ branches/mbarnes-composer/mail/mail-ops.c	Wed Mar 26 19:54:10 2008
@@ -252,7 +252,7 @@
 	e_filename_make_safe (encoded_url);
 
 	evolution_dir = mail_component_peek_base_directory (mail_component_peek ());
-	filename = g_build_filename (evolution_dir, "mail", "pop", encoded_url, "uid-cache", NULL);
+	filename = g_build_filename (evolution_dir, "pop", encoded_url, "uid-cache", NULL);
 	g_free (encoded_url);
 
 	return filename;
@@ -1647,7 +1647,7 @@
 		trash = mail_tool_get_trash (m->account->source->url, FALSE, &m->base.ex);
 	} else {
 		evolution_dir = mail_component_peek_base_directory (mail_component_peek ());
-		uri = g_strdup_printf ("mbox:%s/mail/local", evolution_dir);
+		uri = g_strdup_printf ("mbox:%s/local", evolution_dir);
 		trash = mail_tool_get_trash (uri, TRUE, &m->base.ex);
 		g_free (uri);
 	}

Modified: branches/mbarnes-composer/mail/mail-session.c
==============================================================================
--- branches/mbarnes-composer/mail/mail-session.c	(original)
+++ branches/mbarnes-composer/mail/mail-session.c	Wed Mar 26 19:54:10 2008
@@ -433,10 +433,8 @@
 		mail_msg_unref (m);
 	}
 
-	if (m->ismain) {
-		user_message_free (m);
+	if (m->ismain)
 		mail_msg_unref (m);
-	}
 
 	return result;
 }
@@ -499,7 +497,7 @@
 
 	gconf = mail_config_get_gconf_client ();
 
-	user = g_strdup_printf ("%s/mail/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
+	user = g_strdup_printf ("%s/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
 	system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
 	fc = (RuleContext *) em_filter_context_new ();
 	rule_context_load (fc, system, user);

Modified: branches/mbarnes-composer/mail/mail-tools.c
==============================================================================
--- branches/mbarnes-composer/mail/mail-tools.c	(original)
+++ branches/mbarnes-composer/mail/mail-tools.c	Wed Mar 26 19:54:10 2008
@@ -115,7 +115,7 @@
 		if (strchr("/:;=|%&#!*^()\\, ", *c) || !isprint((int) *c))
 			*c = '_';
 
-	path = g_strdup_printf("%s/mail/spool", mail_component_peek_base_directory(NULL));
+	path = g_strdup_printf("%s/spool", mail_component_peek_base_directory(NULL));
 	if (g_stat(path, &st) == -1 && g_mkdir_with_parents(path, 0777) == -1) {
 		camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Could not create spool directory `%s': %s"),
 				     path, g_strerror(errno));

Modified: branches/mbarnes-composer/mail/mail-vfolder.c
==============================================================================
--- branches/mbarnes-composer/mail/mail-vfolder.c	(original)
+++ branches/mbarnes-composer/mail/mail-vfolder.c	Wed Mar 26 19:54:10 2008
@@ -588,7 +588,7 @@
 		dialog = e_error_new(NULL, "mail:vfolder-updated", changed->str, uri, NULL);
 		em_utils_show_info_silent (dialog);
 
-		user = g_strdup_printf ("%s/mail/vfolders.xml",
+		user = g_strdup_printf ("%s/vfolders.xml",
 					mail_component_peek_base_directory (mail_component_peek ()));
 		rule_context_save ((RuleContext *) context, user);
 		g_free (user);
@@ -655,7 +655,7 @@
 		char *user;
 
 		d(printf("Vfolders updated from renamed folder\n"));
-		user = g_strdup_printf("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
+		user = g_strdup_printf("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
 		rule_context_save((RuleContext *)context, user);
 		g_free(user);
 	}
@@ -839,7 +839,7 @@
 		g_object_unref(rule);
 		g_signal_connect(context, "rule_removed", G_CALLBACK(context_rule_removed), context);
 
-		user = g_strdup_printf("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
+		user = g_strdup_printf("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
 		rule_context_save((RuleContext *)context, user);
 		g_free(user);
 	} else {
@@ -882,7 +882,7 @@
 		filter_rule_set_name(rule, info->new->full_name);
 		g_signal_connect(rule, "changed", G_CALLBACK(rule_changed), folder);
 
-		user = g_strdup_printf("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
+		user = g_strdup_printf("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
 		rule_context_save((RuleContext *)context, user);
 		g_free(user);
 
@@ -917,7 +917,7 @@
 	pthread_mutex_unlock (&lock);
 
 	/* first, create the vfolder store, and set it up */
-	storeuri = g_strdup_printf("vfolder:%s/mail/vfolder", mail_component_peek_base_directory (mail_component_peek ()));
+	storeuri = g_strdup_printf("vfolder:%s/vfolder", mail_component_peek_base_directory (mail_component_peek ()));
 	vfolder_store = camel_session_get_store(session, storeuri, NULL);
 	if (vfolder_store == NULL) {
 		g_warning("Cannot open vfolder store - no vfolders available");
@@ -935,7 +935,7 @@
 	mail_component_load_store_by_uri (mail_component_peek (), storeuri, _("Search Folders"));
 
 	/* load our rules */
-	user = g_strdup_printf ("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
+	user = g_strdup_printf ("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
 	context = em_vfolder_context_new ();
 
 	xmlfile = g_build_filename (EVOLUTION_PRIVDATADIR, "vfoldertypes.xml", NULL);
@@ -976,7 +976,7 @@
 	char *user;
 
 	d(printf("vfolder_revert\n"));
-	user = g_strdup_printf("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
+	user = g_strdup_printf("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
 	rule_context_revert((RuleContext *)context, user);
 	g_free(user);
 }
@@ -988,7 +988,7 @@
 {
 	char *user;
 
-	user = g_strdup_printf ("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
+	user = g_strdup_printf ("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
 
 	switch(button) {
 	case GTK_RESPONSE_OK:
@@ -1032,7 +1032,7 @@
 		FilterRule *orig = g_object_get_data (G_OBJECT (w), "orig");
 
 		filter_rule_copy(orig, rule);
-		user = g_strdup_printf("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
+		user = g_strdup_printf("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
 		rule_context_save((RuleContext *)context, user);
 		g_free(user);
 	}
@@ -1105,7 +1105,7 @@
 
 		g_object_ref(rule);
 		rule_context_add_rule((RuleContext *)context, rule);
-		user = g_strdup_printf("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
+		user = g_strdup_printf("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
 		rule_context_save((RuleContext *)context, user);
 		g_free(user);
 	}

Modified: branches/mbarnes-composer/plugins/bogo-junk-plugin/org-gnome-bogo-junk-plugin.eplug.xml
==============================================================================
--- branches/mbarnes-composer/plugins/bogo-junk-plugin/org-gnome-bogo-junk-plugin.eplug.xml	(original)
+++ branches/mbarnes-composer/plugins/bogo-junk-plugin/org-gnome-bogo-junk-plugin.eplug.xml	Wed Mar 26 19:54:10 2008
@@ -3,7 +3,7 @@
 	<e-plugin type="shlib"
 	          location="@PLUGINDIR@/liborg-gnome-bogo-junk-plugin.so"
 	          id="org.gnome.evolution.bogo.bf_junk_plugin"
-	          name="Bogofilter junk plugin">
+	          _name="Bogofilter junk plugin">
 		<_description>Filters junk messages using Bogofilter.</_description>
 		<author name="Mikhail Zabaluev" email="mhz altlinux org"/>
 		<hook class="org.gnome.evolution.mail.junk:1.0">

Modified: branches/mbarnes-composer/plugins/exchange-operations/exchange-folder-subscription.c
==============================================================================
--- branches/mbarnes-composer/plugins/exchange-operations/exchange-folder-subscription.c	(original)
+++ branches/mbarnes-composer/plugins/exchange-operations/exchange-folder-subscription.c	Wed Mar 26 19:54:10 2008
@@ -73,7 +73,7 @@
 
 	name_selector_model = e_name_selector_peek_model (name_selector);
 	/* FIXME Limit to one user */
-	e_name_selector_model_add_section (name_selector_model, "User", "User", NULL);
+	e_name_selector_model_add_section (name_selector_model, "User", _("User"), NULL);
 
 	/* Listen for responses whenever the dialog is shown */
 	name_selector_dialog = e_name_selector_peek_dialog (name_selector);

Modified: branches/mbarnes-composer/plugins/exchange-operations/exchange-send-options.c
==============================================================================
--- branches/mbarnes-composer/plugins/exchange-operations/exchange-send-options.c	(original)
+++ branches/mbarnes-composer/plugins/exchange-operations/exchange-send-options.c	Wed Mar 26 19:54:10 2008
@@ -414,7 +414,7 @@
 	name_selector_dialog = e_name_selector_peek_dialog (priv->proxy_name_selector);
 
 	name_selector_model = e_name_selector_peek_model (priv->proxy_name_selector);
-	e_name_selector_model_add_section (name_selector_model, "Add User", "Add User", NULL);
+	e_name_selector_model_add_section (name_selector_model, "Add User", _("Add User"), NULL);
 
 	exchange_send_options_fill_widgets_with_data (sod);
 

Modified: branches/mbarnes-composer/plugins/face/face.c
==============================================================================
--- branches/mbarnes-composer/plugins/face/face.c	(original)
+++ branches/mbarnes-composer/plugins/face/face.c	Wed Mar 26 19:54:10 2008
@@ -29,6 +29,7 @@
 #include <glib/gi18n.h>
 #include <mail/em-menu.h>
 #include <e-util/e-error.h>
+#include <e-util/e-util.h>
 
 #define d(x) x
 
@@ -42,7 +43,7 @@
 	GError *error = NULL;
 
 	composer = (EMsgComposer *) t->target.widget;
-	filename = g_build_filename (g_get_home_dir (), ".evolution", "faces", NULL);
+	filename = g_build_filename (e_get_user_data_dir (), "faces", NULL);
 	g_file_get_contents (filename, &file_contents, NULL, &error);
 
 	if (error) {

Modified: branches/mbarnes-composer/plugins/groupwise-features/proxy.c
==============================================================================
--- branches/mbarnes-composer/plugins/groupwise-features/proxy.c	(original)
+++ branches/mbarnes-composer/plugins/groupwise-features/proxy.c	Wed Mar 26 19:54:10 2008
@@ -658,6 +658,8 @@
 
 	target_account = (EMConfigTargetAccount *)data->config->target;
 	account = target_account->account;
+	/* We are using some g_object_set on this. We shuold also avoid double-free later. So reffing */
+	g_object_ref (account);
 
 	camel_exception_init (&ex);
 	if (!(store = (CamelOfflineStore *) camel_session_get_service (session, e_account_get_string(account, E_ACCOUNT_SOURCE_URL), CAMEL_PROVIDER_STORE, &ex))) {
@@ -941,7 +943,7 @@
 	gtk_widget_show (GTK_WIDGET (priv->main));
 
 	name_selector_model = e_name_selector_peek_model (priv->proxy_name_selector);
-	e_name_selector_model_add_section (name_selector_model, "Add User", "Add User", NULL);
+	e_name_selector_model_add_section (name_selector_model, "Add User", _("Add User"), NULL);
 
 	name_selector_entry = e_name_selector_peek_section_entry (priv->proxy_name_selector, "Add User");
 	g_signal_connect (name_selector_entry, "changed",

Modified: branches/mbarnes-composer/plugins/groupwise-features/share-folder.c
==============================================================================
--- branches/mbarnes-composer/plugins/groupwise-features/share-folder.c	(original)
+++ branches/mbarnes-composer/plugins/groupwise-features/share-folder.c	Wed Mar 26 19:54:10 2008
@@ -723,7 +723,7 @@
 			G_CALLBACK (addressbook_dialog_response), sf);
 
 	name_selector_model = e_name_selector_peek_model (sf->name_selector);
-	e_name_selector_model_add_section (name_selector_model, "Add User", "Add User", NULL);
+	e_name_selector_model_add_section (name_selector_model, "Add User", _("Add User"), NULL);
 
 	name_selector_entry = e_name_selector_peek_section_entry (sf->name_selector, "Add User");
 	g_signal_connect (name_selector_entry, "changed",

Modified: branches/mbarnes-composer/plugins/mono/mono-plugin.c
==============================================================================
--- branches/mbarnes-composer/plugins/mono/mono-plugin.c	(original)
+++ branches/mbarnes-composer/plugins/mono/mono-plugin.c	Wed Mar 26 19:54:10 2008
@@ -10,7 +10,7 @@
 #include <mono/metadata/assembly.h>
 #include <mono/jit/jit.h>
 
-#define d(x)
+#define d(x) (x)
 
 static MonoDomain *domain;
 
@@ -26,6 +26,8 @@
 
 #define epm ((EPluginMono *)ep)
 
+void * load_plugin_type_register_function (void *a, void *b);
+
 static char *
 get_xml_prop(xmlNodePtr node, const char *id)
 {
@@ -57,6 +59,8 @@
 	MonoObject *x = NULL, *res;
 	void **params;
 
+	g_print ("\n\a epm_invoke in mono-plugin.c in mono plugin loader is called \n\a");
+
 	/* we need to do this every time since we may be called from any thread for some uses */
 	mono_thread_attach(domain);
 
@@ -82,13 +86,24 @@
 		if (p->klass) {
 			d(printf("looking up method '%s' in class\n", name));
 			/* class method */
+			
 			d = mono_method_desc_new(name, FALSE);
-			if (d == NULL) {
+			/*if (d == NULL) {
 				g_warning("Can't create method descriptor for '%s'", name);
 				return NULL;
+			}*/
+			
+			gpointer iter = NULL;
+			MonoMethod* mono_method;
+
+			d(printf ("\n\a About to get methods in klass\n\a"));
+			       
+			while ((mono_method = mono_class_get_methods (p->klass, &iter))) {
+				g_print ("\n\a Method name is : <%s>\n\a", mono_method_get_name(mono_method));
 			}
-
-			m = mono_method_desc_search_in_class(d, p->klass);
+			d(printf ("\n\a Got methods in klass \n\a"));
+//mono_class_get_method_from_name
+			m = mono_class_get_method_from_name (p->klass, name, -1);
 			if (m == NULL) {
 				g_warning("Can't find method callback '%s'", name);
 				return NULL;
@@ -181,7 +196,7 @@
 }
 
 void *
-org_gnome_evolution_mono_get_type(void *a, void *b)
+load_plugin_type_register_function (void *a, void *b)
 {
 	static GType type = 0;
 
@@ -193,6 +208,8 @@
 
 		epm_parent_class = g_type_class_ref(e_plugin_get_type());
 		type = g_type_register_static(e_plugin_get_type(), "EPluginMono", &info, 0);
+		e_plugin_register_type (type);
+		d(printf("\nType EPluginMono registered from the mono-plugin-loader\n"));
 		domain = mono_jit_init("Evolution");
 		mono_thread_attach(domain);
 	}

Modified: branches/mbarnes-composer/plugins/mono/org-gnome-evolution-mono.eplug.xml
==============================================================================
--- branches/mbarnes-composer/plugins/mono/org-gnome-evolution-mono.eplug.xml	(original)
+++ branches/mbarnes-composer/plugins/mono/org-gnome-evolution-mono.eplug.xml	Wed Mar 26 19:54:10 2008
@@ -1,16 +1,12 @@
 <?xml version="1.0"?>
 <e-plugin-list>
-  <e-plugin
-    type="shlib"
-    id="org.gnome.evolution.plugin.mono"
-    location="@PLUGINDIR@/liborg-gnome-evolution-mono SOEXT@"
-    _name="Mono Loader">
-    <_description>A plugin which implements mono plugins.</_description>
-    <author name="Michael Zucchi" email="notzed ximian com"/>
+	<e-plugin type="shlib" id="org.gnome.evolution.plugin.mono" 
+	location="@PLUGINDIR@/liborg-gnome-evolution-mono SOEXT@" _name="Mono Loader" load_level="1">
 
-    <hook class="org.gnome.evolution.plugin.type:1.0">
-      <plugin-type get-type="org_gnome_evolution_mono_get_type"/>
-    </hook>
+		<_description>A plugin which implements mono plugins.</_description>
 
-  </e-plugin>
+		<author name="Michael Zucchi" email="notzed ximian com"/>
+		<author name="Sankar P" email="psankar novell com"/>
+
+	</e-plugin>
 </e-plugin-list>

Modified: branches/mbarnes-composer/plugins/plugin-manager/org-gnome-plugin-manager.eplug.xml
==============================================================================
--- branches/mbarnes-composer/plugins/plugin-manager/org-gnome-plugin-manager.eplug.xml	(original)
+++ branches/mbarnes-composer/plugins/plugin-manager/org-gnome-plugin-manager.eplug.xml	Wed Mar 26 19:54:10 2008
@@ -4,7 +4,8 @@
     type="shlib"
     id="org.gnome.evolution.plugin.manager"
     location="@PLUGINDIR@/liborg-gnome-plugin-manager SOEXT@"
-    _name="Plugin Manager">
+    _name="Plugin Manager"
+    system_plugin="true">
     <_description>A plugin for managing which plugins are enabled or disabled.</_description>
     <author name="Michael Zucchi" email="notzed ximian com"/>
     <hook class="org.gnome.evolution.shell.bonobomenu:1.0">

Modified: branches/mbarnes-composer/plugins/plugin-manager/plugin-manager.c
==============================================================================
--- branches/mbarnes-composer/plugins/plugin-manager/plugin-manager.c	(original)
+++ branches/mbarnes-composer/plugins/plugin-manager/plugin-manager.c	Wed Mar 26 19:54:10 2008
@@ -288,9 +288,16 @@
 		GtkTreeIter iter;
 		GtkWidget *cfg_widget;
 
-		/* hide ourselves always */
-		if (!strcmp (ep->id, "org.gnome.evolution.plugin.manager"))
-			continue;
+		if (!g_getenv ("EVO_SHOW_ALL_PLUGINS")) { 
+			/* hide ourselves always */
+			if (ep->flags & E_PLUGIN_FLAGS_SYSTEM_PLUGIN)
+				continue;
+
+		} else {
+			/* Never ever show plugin-manager. User may disable it */
+			if (!strcmp (ep->id, "org.gnome.evolution.plugin.manager"))
+				continue;
+		}
 
 		cfg_widget = e_plugin_get_configure_widget (ep);
 		if (!cfg_widget) {
@@ -307,6 +314,7 @@
 				    COL_PLUGIN_DATA, ep,
 				    COL_PLUGIN_CFG_WIDGET, cfg_widget,
 				    -1);
+				    
 	}
 
 	/* setup the treeview */

Modified: branches/mbarnes-composer/plugins/sa-junk-plugin/em-junk-filter.c
==============================================================================
--- branches/mbarnes-composer/plugins/sa-junk-plugin/em-junk-filter.c	(original)
+++ branches/mbarnes-composer/plugins/sa-junk-plugin/em-junk-filter.c	Wed Mar 26 19:54:10 2008
@@ -845,7 +845,7 @@
 org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data)
 {
    	GtkWidget *check, *vbox, *label;
-	char *text = g_strdup_printf ("    <small>%s</small>", _("This will make Spamassasin more reliable, but slower"));
+	char *text = g_strdup_printf ("    <small>%s</small>", _("This will make SpamAssassin more reliable, but slower"));
 	guint i = ((GtkTable *)data->parent)->nrows;
 
 	if (data->old)

Modified: branches/mbarnes-composer/plugins/sa-junk-plugin/org-gnome-sa-junk-plugin.eplug.xml
==============================================================================
--- branches/mbarnes-composer/plugins/sa-junk-plugin/org-gnome-sa-junk-plugin.eplug.xml	(original)
+++ branches/mbarnes-composer/plugins/sa-junk-plugin/org-gnome-sa-junk-plugin.eplug.xml	Wed Mar 26 19:54:10 2008
@@ -7,7 +7,7 @@
 		<author name="Vivek Jain" email="jvivek novell com"/>
 		<hook class="org.gnome.evolution.mail.junk:1.0">
 			<group id="EMJunk" >
-				<item   name="Spamassasin" 
+				<item   name="SpamAssassin" 
 				        check_junk="em_junk_sa_check_junk" 
 				        report_junk="em_junk_sa_report_junk" 
 					report_non_junk="em_junk_sa_report_non_junk" 

Modified: branches/mbarnes-composer/plugins/tnef-attachments/Makefile.am
==============================================================================
--- branches/mbarnes-composer/plugins/tnef-attachments/Makefile.am	(original)
+++ branches/mbarnes-composer/plugins/tnef-attachments/Makefile.am	Wed Mar 26 19:54:10 2008
@@ -2,7 +2,8 @@
 	-I$(top_srcdir)					\
 	-DGETTEXT_PACKAGE="\"$(GETTEXT_PACKAGE)\""	\
 	-DLOCALEDIR="\"$(LOCALEDIR)\""			\
-	$(EVOLUTION_MAIL_CFLAGS)
+	$(EVOLUTION_MAIL_CFLAGS)			\
+	$(TNEF_CFLAGS)
 
 @EVO_PLUGIN_RULE@
 

Modified: branches/mbarnes-composer/plugins/tnef-attachments/tnef-plugin.c
==============================================================================
--- branches/mbarnes-composer/plugins/tnef-attachments/tnef-plugin.c	(original)
+++ branches/mbarnes-composer/plugins/tnef-attachments/tnef-plugin.c	Wed Mar 26 19:54:10 2008
@@ -17,7 +17,11 @@
 #include <fcntl.h>
 #include <ctype.h>
 #include <stdlib.h>
+#ifdef HAVE_YTNEF_H
 #include <ytnef.h>
+#elif defined HAVE_LIBYTNEF_YTNEF_H
+#include <libytnef/ytnef.h>
+#endif 
 
 #include <camel/camel-mime-part.h>
 #include <camel/camel-folder.h>

Modified: branches/mbarnes-composer/po/LINGUAS
==============================================================================
--- branches/mbarnes-composer/po/LINGUAS	(original)
+++ branches/mbarnes-composer/po/LINGUAS	Wed Mar 26 19:54:10 2008
@@ -5,6 +5,7 @@
 as
 az
 be
+be latin
 bg
 bn
 bn_IN

Modified: branches/mbarnes-composer/shell/apps_evolution_shell.schemas.in
==============================================================================
--- branches/mbarnes-composer/shell/apps_evolution_shell.schemas.in	(original)
+++ branches/mbarnes-composer/shell/apps_evolution_shell.schemas.in	Wed Mar 26 19:54:10 2008
@@ -241,5 +241,152 @@
         <long>A string description of the current printer settings.</long>
       </locale>
     </schema>
+
+    <!-- Network config defaults -->
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/proxy_type</key>
+      <applyto>/apps/evolution/shell/network_config/proxy_type</applyto>
+      <owner>evolution</owner>
+      <type>int</type>
+      <locale name="C">
+        <short>Proxy configuration mode</short>
+        <long>Select the proxy configuration mode. Supported values are 0, 1, 2, and 3 representing "use system settings", "no proxy", "use manual proxy configuration" and "use proxy configuration provided in the autoconfig url" respectively.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/http_port</key>
+      <applyto>/apps/evolution/shell/network_config/http_port</applyto>
+      <owner>evolution</owner>
+      <type>int</type>
+      <locale name="C">
+        <short>HTTP proxy port</short>
+        <long>The port on the machine defined by "/apps/evolution/shell/network_config/http_host" that you proxy through.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/http_host</key>
+      <applyto>/apps/evolution/shell/network_config/http_host</applyto>
+      <owner>evolution</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>HTTP proxy host name</short>
+        <long>The machine name to proxy HTTP through.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/secure_port</key>
+      <applyto>/apps/evolution/shell/network_config/secure_port</applyto>
+      <owner>evolution</owner>
+      <type>int</type>
+      <locale name="C">
+        <short>Secure HTTP proxy port</short>
+        <long>The port on the machine defined by "/apps/evolution/shell/network_config/secure_host" that you proxy through.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/secure_host</key>
+      <applyto>/apps/evolution/shell/network_config/secure_host</applyto>
+      <owner>evolution</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>Secure HTTP proxy host name</short>
+        <long>The machine name to proxy secure HTTP through.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/socks_port</key>
+      <applyto>/apps/evolution/shell/network_config/socks_port</applyto>
+      <owner>evolution</owner>
+      <type>int</type>
+      <locale name="C">
+        <short>SOCKS proxy port</short>
+        <long>The port on the machine defined by "/apps/evolution/shell/network_config/socks_host" that you proxy through.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/socks_host</key>
+      <applyto>/apps/evolution/shell/network_config/socks_host</applyto>
+      <owner>evolution</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>SOCKS proxy host name</short>
+        <long>The machine name to proxy socks through.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/use_http_proxy</key>
+      <applyto>/apps/evolution/shell/network_config/use_http_proxy</applyto>
+      <owner>evolution</owner>
+      <type>bool</type>
+      <locale name="C">
+        <short>Use HTTP proxy</short>
+        <long>Enables the proxy settings when accessing HTTP/Secure HTTP over the Internet.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/use_authentication</key>
+      <applyto>/apps/evolution/shell/network_config/use_authentication</applyto>
+      <owner>evolution</owner>
+      <type>bool</type>
+      <locale name="C">
+        <short>Authenticate proxy server connections</short>
+        <long>If true, then connections to the proxy server require authentication. The username/password combo is defined by "/apps/evolution/shell/network_config/authentication_user" and locally stored password in .gnome2_private/.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/authentication_user</key>
+      <applyto>/apps/evolution/shell/network_config/authentication_user</applyto>
+      <owner>evolution</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>HTTP proxy username</short>
+        <long>User name to pass as authentication when doing HTTP proxying.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/authentication_password</key>
+      <applyto>/apps/evolution/shell/network_config/authentication_password</applyto>
+      <owner>evolution</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>HTTP proxy password</short>
+        <long>Password to pass as authentication when doing HTTP proxying.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/ignore_hosts</key>
+      <applyto>/apps/evolution/shell/network_config/ignore_hosts</applyto>
+      <owner>evolution</owner>
+      <type>list</type>
+      <list_type>string</list_type>
+      <locale name="C">
+        <short>Non-proxy hosts</short>
+        <long>This key contains a list of hosts which are connected to directly, rather than via the proxy (if it is active). The values can be hostnames, domains (using an initial wildcard like *.foo.com), IP host addresses (both IPv4 and IPv6) and network addresses with a netmask (something like 192.168.0.0/24).</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/shell/network_config/autoconfig_url</key>
+      <applyto>/apps/evolution/shell/network_config/autoconfig_url</applyto>
+      <owner>evolution</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>Automatic proxy configuration URL</short>
+        <long>URL that provides proxy configuration values.</long>
+      </locale>
+    </schema>
+
   </schemalist>  
 </gconfschemafile>

Modified: branches/mbarnes-composer/shell/e-shell-window-commands.c
==============================================================================
--- branches/mbarnes-composer/shell/e-shell-window-commands.c	(original)
+++ branches/mbarnes-composer/shell/e-shell-window-commands.c	Wed Mar 26 19:54:10 2008
@@ -162,8 +162,10 @@
 	"Adam Weinberger",
 	"Adi Attar",
 	"Ahmad Riza H Nst",
+	"Aidan Delaney",
 	"Aishwarya K",
 	"Akagic Amila",
+	"Akhil Laddha",
 	"Akira Tagoh",
 	"Alastair McKinstry",
 	"Alastair Tse",
@@ -171,6 +173,8 @@
 	"Alessandro Decina",
 	"Alex Graveley",
 	"Alex Jiang",
+	"Alex Jones",
+	"Alex Kloss",
 	"Alexander Shopov",
 	"Alfred Peng",
 	"Ali Abdin",
@@ -181,9 +185,11 @@
 	"Anders Carlsson",
 	"Andre Klapper",
 	"Andrea Campi",
+	"Andreas Henriksson",
 	"Andreas Hyden",
 	"Andreas J. Guelzow",
 	"Andreas K\xC3\xB6hler",
+	"Andreas KÃhler",
 	"Andrew Ruthven",
 	"Andrew T. Veliath",
 	"Andrew Wu",
@@ -195,10 +201,14 @@
 	"Archit Baweja",
 	"Ariel Rios",
 	"Arik Devens",
+	"Armin Bauer",
 	"Arturo Espinosa Aldama",
 	"Arulanandan P",
-	"Arunprakash",
+	"Arun Prakash",
 	"Arvind Sundararajan",
+	"Arvind",
+	"Ashish",
+	"B S Srinidhi",
 	"Bastien Nocera",
 	"Behnam Esfahbod",
 	"Ben Gamari",
@@ -210,10 +220,13 @@
 	"Bharath Acharya",
 	"Bill Zhu",
 	"Bj\xC3\xB6rn Torkelsson",
+	"BjÃÂrn Lindqvist",
 	"Bob Doan",
+	"Bob Mauchin",
 	"Boby Wang",
 	"Bolian Yin",
 	"Brian Mury",
+	"Brian Pepple",
 	"Bruce Tao",
 	"Calvin Liu",
 	"Cantona Su",
@@ -235,6 +248,8 @@
 	"Chris Toshok",
 	"Christian Hammond",
 	"Christian Kellner",
+	"Christian Kirbach",
+	"Christian Krause",
 	"Christian Kreibich",
 	"Christian Neumair",
 	"Christophe Fergeau",
@@ -246,36 +261,50 @@
 	"Claudio Saavedra",
 	"Clifford R. Conover",
 	"Cody Russell",
+	"Colin Leroy",
 	"Craig Small",
 	"Dafydd Harries",
 	"Damian Ivereigh",
+	"Damien Carbery",
 	"Damon Chaplin",
 	"Dan Berger",
+	"Dan Damian",
+	"Dan Nguyen",
 	"Dan Winship",
 	"Daniel Gryniewicz",
 	"Daniel Nylander",
+	"Daniel van Eeden",
 	"Daniel Veillard",
 	"Daniel Yacob",
 	"Danilo \xC5\xA0" "egan",
+	"Danilo Segan",
 	"Darin Adler",
+	"Dave Benson",
 	"Dave Camp",
 	"Dave Fallon",
+	"Dave Malcolm",
 	"Dave West",
 	"David Farning",
+	"David Kaelbling",
 	"David Malcolm",
 	"David Moore",
 	"David Mosberger",
 	"David Richards",
 	"David Trowbridge",
+	"David Turner",
 	"David Woodhouse",
+	"Denis Washington",
 	"Devashish Sharma",
 	"Diego Escalante Urrelo",
 	"Diego Gonzalez",
 	"Diego Sevilla Ruiz",
 	"Dietmar Maurer",
 	"Dinesh Layek",
+	"Djihed Afifi",
 	"Dmitry Mastrukov",
+	"Dodji Seketeli",
 	"Duarte Loreto",
+	"Dulmandakh Sukhbaatar",
 	"Duncan Mak",
 	"Ebby Wiselyn",
 	"Ed Catmur",
@@ -305,6 +334,8 @@
 	"Frederic Crozat",
 	"Frederic Peters",
 	"Funda Wang",
+	"Gabor Kelemen",
+	"Ganesh",
 	"Gareth Owen",
 	"Gary Coady",
 	"Gary Ekker",
@@ -312,6 +343,8 @@
 	"Gediminas Paulauskas",
 	"George Lebl",
 	"Gerardo Marin",
+	"Gert Kulyk",
+	"Giancarlo Capella",
 	"Gil Osher",
 	"Gilbert Fang",
 	"Gilles Dartiguelongue",
@@ -322,15 +355,18 @@
 	"Grzegorz Goawski",
 	"Gustavo Gir\xC3\x8E" "ldez",
 	"Gustavo Maciel Dias Vieira",
+	"H P Nadig",
 	"H\xC3\xA9" "ctor Garc\xC3\xAD" "a \xC3\x81" "lvarez",
 	"Hans Petter Jansson",
 	"Hao Sheng",
 	"Hari Prasad Nadig",
+	"Harish K",
 	"Harish Krishnaswamy",
 	"Harry Lu",
 	"Hasbullah Bin Pit",
 	"Havoc Pennington",
 	"Heath Harrelson",
+	"Hein-Pieter van Braam",
 	"Herbert V. Riedel",
 	"Hiroyuki Ikezoe",
 	"Iain Buchanan",
@@ -341,27 +377,35 @@
 	"Ismael Olea",
 	"Israel Escalante",
 	"Iv\xC3\xA1" "n Frade",
+	"IvÃÂn Frade",
 	"J.H.M. Dassen (Ray)",
 	"JP Rosevear",
 	"J\xC3\xBC" "rg Billeter",
+	"JÃÃÂrg Billeter",
 	"Jack Jia",
+	"Jacob Ulysses Berkman",
 	"Jacob Berkman",
 	"Jaka Mocnik",
 	"Jakub Steiner",
+	"James Doc Livingston",
 	"James Bowes",
 	"James Henstridge",
 	"James Willcox",
 	"Jan Arne Petersen",
+	"Jan Tichavsky",
 	"Jan Van Buggenhout",
+	"Jared Moore",
 	"Jarkko Ranta",
 	"Jason Leach",
 	"Jason Tackaberry",
 	"Jayaradha",
 	"Jean-Noel Guiheneuf",
 	"Jedy Wang",
+	"Jeff Bailey",
 	"Jeff Cai",
 	"Jeff Garzik",
 	"Jeffrey Stedfast",
+	"Jens Granseuer",
 	"Jens Seidel",
 	"Jeremy Katz",
 	"Jeremy Wise",
@@ -376,6 +420,7 @@
 	"Joe Shaw",
 	"John Gotts",
 	"Johnny Jacob",
+	"Johnny",
 	"Jon Ander Hernandez",
 	"Jon K Hellan",
 	"Jon Oberheide",
@@ -384,10 +429,13 @@
 	"Jonathan Blandford",
 	"Jonathan Dieter",
 	"Jos Dehaes",
+	"Josselin Mouette",
+	"JP Rosvear",
 	"Jukka Zitting",
 	"Jules Colding",
 	"Julian Missig",
 	"Julio M. Merino Vidal",
+	"JÃrg Billeter",
 	"Karl Eichwalder",
 	"Karl Relton",
 	"Karsten Br\xC3\xA4" "ckelmann",
@@ -396,6 +444,7 @@
 	"Kenny Graunke",
 	"Keshav Upadhyaya",
 	"Kevin Breit",
+	"Kevin Piche",
 	"Kevin Vandersloot",
 	"Khasim Shaheed",
 	"Kidd Wang",
@@ -409,6 +458,8 @@
 	"Lauris Kaplinski",
 	"Leon Zhang",
 	"Li Yuan",
+	"LoÃÂc Minier",
+	"LoÃc Minier",
 	"Lorenzo Gil Sanchez",
 	"Luca Ferretti",
 	"Lucky Wankhede",
@@ -426,9 +477,11 @@
 	"Mark Gordon",
 	"Mark McLoughlin",
 	"Mark Moulder",
+	"Mark Tearle",
 	"Martha Burke",
 	"Martin Baulig",
 	"Martin Hicks",
+	"Martin Meyer",
 	"Martin Norb\xC3\xA4" "ck",
 	"Martyn Russell",
 	"Masahiro Sakai",
@@ -436,25 +489,32 @@
 	"Matias Mutchinick",
 	"Matt Bissiri",
 	"Matt Brown",
+	"Matt Loper",
 	"Matt Martin",
 	"Matt Wilson",
 	"Matthew Barnes",
+	"Matthew Daniel",
 	"Matthew Hall",
 	"Matthew Loper",
 	"Matthew Wilson",
+	"Matthias Clasen",
 	"Max Horn",
 	"Maxx Cao",
+	"Mayank Jain",
 	"Meilof Veeningen",
 	"Mengjie Yu",
+	"Michael Granger",
 	"Michael M. Morrison",
 	"Michael MacDonald",
 	"Michael Meeks",
+	"Michael Monreal",
 	"Michael Terry",
 	"Michael Zucchi",
 	"Michel Daenzer",
 	"Miguel Angel Lopez Hernandez",
 	"Miguel de Icaza",
 	"Mikael Hallendal",
+	"Mikael Nilsson",
 	"Mike Castle",
 	"Mike Kestner",
 	"Mike McEwan",
@@ -472,12 +532,18 @@
 	"Nathan Owens",
 	"Nicel KM",
 	"Nicholas J Kreucher",
+	"Nicholas Miell",
 	"Nick Sukharev",
 	"Nickolay V. Shmyrev",
 	"Nike Gerdts",
+	"Noel",
 	"Nuno Ferreira",
+	"Nyall Dawson",
+	"Ondrej Jirman",
 	"Oswald Rodrigues",
 	"Owen Taylor",
+	"Oystein Gisnas",
+	"P Chenthill",
 	"P S Chakravarthi",
 	"Pablo Gonzalo del Campo",
 	"Pablo Saratxaga",
@@ -485,7 +551,10 @@
 	"Paolo Molaro",
 	"Parag Goel",
 	"Parthasarathi Susarla",
+	"Pascal Terjan",
 	"Patrick Ohly",
+	"Paul Bolle",
+	"Paul Lindner",
 	"Pavel Cisler",
 	"Pavel Roskin",
 	"Pavithran",
@@ -514,6 +583,7 @@
 	"Ranjan Somani",
 	"Ray Strode",
 	"Rhys Jones",
+	"Ricardo Markiewicz",
 	"Richard Boulton",
 	"Richard Hult",
 	"Richard Li",
@@ -524,6 +594,8 @@
 	"Rodney Dawes",
 	"Rodrigo Moya",
 	"Rohini S",
+	"Rohini",
+	"Roland Illig",
 	"Ronald Kuetemeier",
 	"Roozbeh Pournader",
 	"Ross Burton",
@@ -536,6 +608,7 @@
 	"S N Tejasvi",
 	"S. \xC3\x87" "a\xC4\x9F" "lar Onur",
 	"S.Antony Vincent Pandian",
+	"S. Caglar Onur",
 	"Sam Creasey",
 	"Sam Yang",
 	"Sam\xC3\xBA" "el J\xC3\xB3" "n Gunnarsson",
@@ -563,6 +636,7 @@
 	"Srinivasa Ragavan",
 	"Stanislav Brabec",
 	"Stanislav Visnovsky",
+	"StÃphane Raimbault",
 	"Stephen Cook",
 	"Steve Murphy",
 	"Steven Zhang",
@@ -575,12 +649,15 @@
 	"Sven Herzberg",
 	"Szabolcs Ban",
 	"T\xC3\xB5" "ivo Leedj\xC3\xA4" "rv",
+	"Takao Fujiwara",
 	"Takayuki Kusano",
 	"Takeshi Aihana",
 	"Tambet Ingo",
 	"Taylor Hayward",
+	"Ted Percival",
 	"Theppitak Karoonboonyanan",
 	"Thomas Cataldo",
+	"Thomas Klausner",
 	"Thomas Mirlacher",
 	"Thouis R. Jones",
 	"Tim Wo",
@@ -591,6 +668,7 @@
 	"Timur Bakeyev",
 	"Tino Meinen",
 	"Tobias Mueller",
+	"TÃivo LeedjÃrv",
 	"Tom Tromey",
 	"Tomas Ogren",
 	"Tomasz K\xC5\x82" "oczko",
@@ -625,8 +703,11 @@
 	"William Jon McCann",
 	"Wouter Bolsterlee",
 	"Xan Lopez",
+	"Xiurong Simon Zheng",
 	"Yanko Kaneti",
+	"Yi Jin",
 	"Yong Sun",
+	"Yu Mengjie",
 	"Yuedong Du",
 	"Yukihiro Nakai",
 	"Yuri Pankov",

Modified: branches/mbarnes-composer/shell/main.c
==============================================================================
--- branches/mbarnes-composer/shell/main.c	(original)
+++ branches/mbarnes-composer/shell/main.c	Wed Mar 26 19:54:10 2008
@@ -25,6 +25,11 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 
+#ifdef G_OS_WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+
 #include "e-util/e-dialog-utils.h"
 #include "e-util/e-bconf-map.h"
 
@@ -549,7 +554,7 @@
 }
 
 #else
-#define setup_segv_redirect() 0
+#define setup_segv_redirect() (void)0
 #endif
 
 static gint
@@ -591,6 +596,61 @@
 	{ NULL }
 };
 
+#ifdef G_OS_WIN32
+static void
+set_paths (void)
+{
+	/* Set PATH to include the Evolution executable's folder
+	 * and the lib/evolution/$(BASE_VERSION)/components folder.
+	 */
+	wchar_t exe_filename[MAX_PATH];
+	wchar_t *p;
+	gchar *exe_folder_utf8;
+	gchar *components_folder_utf8;
+	gchar *top_folder_utf8;
+	gchar *path;
+
+	GetModuleFileNameW (NULL, exe_filename, G_N_ELEMENTS (exe_filename));
+
+	p = wcsrchr (exe_filename, L'\\');
+	g_assert (p != NULL);
+
+	*p = L'\0';
+	exe_folder_utf8 = g_utf16_to_utf8 (exe_filename, -1, NULL, NULL, NULL);
+
+	p = wcsrchr (exe_filename, L'\\');
+	g_assert (p != NULL);
+
+	*p = L'\0';
+	top_folder_utf8 = g_utf16_to_utf8 (exe_filename, -1, NULL, NULL, NULL);
+	components_folder_utf8 =
+		g_strconcat (top_folder_utf8,
+			     "/lib/evolution/" BASE_VERSION "/components",
+			     NULL);
+
+	path = g_build_path (";",
+			     exe_folder_utf8,
+			     components_folder_utf8,
+			     g_getenv ("PATH"),
+			     NULL);
+	if (!g_setenv ("PATH", path, TRUE))
+		g_warning ("Could not set PATH for Evolution and its child processes");
+
+	g_free (path);
+
+	/* Set BONOBO_ACTIVATION_PATH */
+	if (g_getenv ("BONOBO_ACTIVATION_PATH" ) == NULL) {
+		path = g_build_filename (top_folder_utf8,
+					 "lib/bonobo/servers",
+					 NULL);
+		if (!g_setenv ("BONOBO_ACTIVATION_PATH", path, TRUE))
+			g_warning ("Could not set BONOBO_ACTIVATION_PATH");
+		g_free (path);
+	}
+	g_free (top_folder_utf8);
+}
+#endif
+
 int
 main (int argc, char **argv)
 {
@@ -598,8 +658,8 @@
 	extern void link_shutdown (void);
 #endif
 
-#if DEVELOPMENT
 	GConfClient *client;
+#if DEVELOPMENT
 	gboolean skip_warning_dialog;
 #endif
 	GnomeProgram *program;
@@ -620,6 +680,10 @@
 
 	g_option_context_set_translation_domain(context, GETTEXT_PACKAGE);
 
+#ifdef G_OS_WIN32
+	set_paths ();
+#endif
+
 	program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
 				      GNOME_PROGRAM_STANDARD_PROPERTIES,
 				      GNOME_PARAM_GOPTION_CONTEXT, context,
@@ -641,13 +705,10 @@
 		exit (0);
 	}
 
-#ifdef G_OS_WIN32
-	gtk_rc_parse_string ("gtk-fallback-icon-theme = \"gnome\"");
-#endif
-
-#if DEVELOPMENT
 	client = gconf_client_get_default ();
 
+#if DEVELOPMENT
+	
 	if (force_migrate) {
 		destroy_config (client);
 	}
@@ -713,10 +774,10 @@
 	else
 		g_idle_add ((GSourceFunc) idle_cb, remaining_args);
 
-	g_object_unref (client);
 #else
 	g_idle_add ((GSourceFunc) idle_cb, remaining_args);
 #endif
+	g_object_unref (client);
 
 	bonobo_main ();
 

Modified: branches/mbarnes-composer/smime/lib/e-cert-db.c
==============================================================================
--- branches/mbarnes-composer/smime/lib/e-cert-db.c	(original)
+++ branches/mbarnes-composer/smime/lib/e-cert-db.c	Wed Mar 26 19:54:10 2008
@@ -87,6 +87,7 @@
 #include "plstr.h"
 #include "prprf.h"
 #include "prmem.h"
+#include "e-util/e-util.h"
 #include "e-util/e-dialog-utils.h"
 #include "e-util/e-util-private.h"
 #include <gtk/gtkmessagedialog.h>
@@ -177,18 +178,11 @@
 	char *evolution_dir_path;
 	gboolean success;
 
-	evolution_dir_path = g_build_filename (g_get_home_dir (), ".evolution", NULL);
-
 #ifdef G_OS_WIN32
 	/* NSS wants filenames in system codepage */
-	{
-		char *cp_path = g_win32_locale_filename_from_utf8 (evolution_dir_path);
-
-		if (cp_path) {
-			g_free (evolution_dir_path);
-			evolution_dir_path = cp_path;
-		}
-	}
+	evolution_dir_path = g_win32_locale_filename_from_utf8 (e_get_user_data_dir ());
+#else
+	evolution_dir_path = g_strdup (e_get_user_data_dir ());
 #endif
 
 	/* we initialize NSS here to make sure it only happens once */

Modified: branches/mbarnes-composer/widgets/misc/e-attachment.c
==============================================================================
--- branches/mbarnes-composer/widgets/misc/e-attachment.c	(original)
+++ branches/mbarnes-composer/widgets/misc/e-attachment.c	Wed Mar 26 19:54:10 2008
@@ -275,6 +275,17 @@
 
 	gnome_vfs_file_info_unref (info);
 
+	if (type) {
+		/* gnome_vfs can sometimes return invalid type, so check for it */
+		CamelContentType *ctype = camel_content_type_decode (type);
+
+		if (!ctype) {
+			g_free (type);
+			type = NULL;
+		} else
+			camel_content_type_unref (ctype);
+	}
+
 	return type;
 }
 

Modified: branches/mbarnes-composer/widgets/misc/e-calendar-item.c
==============================================================================
--- branches/mbarnes-composer/widgets/misc/e-calendar-item.c	(original)
+++ branches/mbarnes-composer/widgets/misc/e-calendar-item.c	Wed Mar 26 19:54:10 2008
@@ -853,633 +853,6 @@
 /*
  * DRAWING ROUTINES - functions to paint the canvas item.
  */
-#ifndef ENABLE_CAIRO
-static void
-e_calendar_item_draw		(GnomeCanvasItem *canvas_item,
-				 GdkDrawable	 *drawable,
-				 int		  x,
-				 int		  y,
-				 int		  width,
-				 int		  height)
-{
-	ECalendarItem *calitem;
-	GtkStyle *style;
-	GdkGC *base_gc, *bg_gc;
-	gint char_height, row, col, row_y, bar_height, col_x;
-	gint xthickness, ythickness;
-	PangoFontDescription *font_desc;
-	PangoContext *pango_context;
-	PangoFontMetrics *font_metrics;
-
-#if 0
-	g_print ("In e_calendar_item_draw %i,%i %ix%i\n",
-		 x, y, width, height);
-#endif
-	calitem = E_CALENDAR_ITEM (canvas_item);
-	style = GTK_WIDGET (canvas_item->canvas)->style;
-
-	/* Set up Pango prerequisites */
-	font_desc = calitem->font_desc;
-	if (!font_desc)
-		font_desc = style->font_desc;
-	pango_context = gtk_widget_get_pango_context (GTK_WIDGET (canvas_item->canvas));
-	font_metrics = pango_context_get_metrics (pango_context, font_desc,
-						  pango_context_get_language (pango_context));
-
-	char_height =
-		PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
-		PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics));
-	xthickness = style->xthickness;
-	ythickness = style->ythickness;
-	base_gc = style->base_gc[GTK_STATE_NORMAL];
-	bg_gc = style->bg_gc[GTK_STATE_NORMAL];
-
-	/* Clear the entire background. */
-	gdk_draw_rectangle (drawable, base_gc, TRUE,
-			    calitem->x1 - x, calitem->y1 - y,
-			    calitem->x2 - calitem->x1 + 1,
-			    calitem->y2 - calitem->y1 + 1);
-
-	/* Draw the shadow around the entire item. */
-	gtk_paint_shadow (style, drawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
-			  NULL, NULL, "entry",
-			  calitem->x1 - x, calitem->y1 - y,
-			  calitem->x2 - calitem->x1 + 1,
-			  calitem->y2 - calitem->y1 + 1);
-
-	row_y = canvas_item->y1 + ythickness;
-	bar_height = ythickness * 2
-		+ E_CALENDAR_ITEM_YPAD_ABOVE_MONTH_NAME + char_height
-		+ E_CALENDAR_ITEM_YPAD_BELOW_MONTH_NAME;
-
-	for (row = 0; row < calitem->rows; row++) {
-		/* Draw the background for the title bars and the shadow around
-		   it, and the vertical lines between columns. */
-
-		gdk_draw_rectangle (drawable, bg_gc, TRUE,
-				    calitem->x1 + xthickness - x, row_y - y,
-				    calitem->x2 - calitem->x1 + 1
-				    - xthickness * 2,
-				    bar_height);
-
-		gtk_paint_shadow (style, drawable,
-				  GTK_STATE_NORMAL, GTK_SHADOW_OUT,
-				  NULL, NULL, "calendar-header",
-				  calitem->x1 + xthickness - x, row_y - y,
-				  calitem->x2 - calitem->x1 + 1
-				  - xthickness * 2,
-				  bar_height);
-
-
-		for (col = 0; col < calitem->cols; col++) {
-			if (col != 0) {
-				col_x = calitem->x1 + calitem->x_offset
-					+ calitem->month_width * col;
-				gtk_paint_vline (style, drawable,
-						 GTK_STATE_NORMAL,
-						 NULL, NULL,
-						 "calendar-separator",
-						 row_y + ythickness + 1 - y,
-						 row_y + bar_height
-						 - ythickness - 2 - y,
-						 col_x - 1 - x);
-			}
-
-
-			e_calendar_item_draw_month (calitem, drawable, x, y,
-						    width, height, row, col);
-		}
-
-		row_y += calitem->month_height;
-	}
-
-	pango_font_metrics_unref (font_metrics);
-}
-
-
-static void
-layout_set_day_text (ECalendarItem *calitem, PangoLayout *layout, int day_index)
-{
-	const gchar *abbr_name;
-
-	/* day_index: 0 = Monday ... 6 = Sunday */
-	abbr_name = e_get_weekday_name (day_index + 1, TRUE);
-	pango_layout_set_text (layout, abbr_name, -1);
-}
-
-static void
-e_calendar_item_draw_month	(ECalendarItem   *calitem,
-				 GdkDrawable	 *drawable,
-				 int		  x,
-				 int		  y,
-				 int		  width,
-				 int		  height,
-				 int		  row,
-				 int		  col)
-{
-	GnomeCanvasItem *item;
-	GtkWidget *widget;
-	GtkStyle *style;
-	PangoFontDescription *font_desc;
-	GdkGC *fg_gc;
-	struct tm tmp_tm;
-	GdkRectangle clip_rect;
-	gint char_height, xthickness, ythickness, start_weekday;
-	gint year, month;
-	gint month_x, month_y, month_w, month_h;
-	gint min_x, max_x, text_x, text_y;
-	gint day, day_index, cells_x, cells_y, min_cell_width, text_width;
-	gint clip_width, clip_height;
-	gchar buffer[64];
-	PangoContext *pango_context;
-	PangoFontMetrics *font_metrics;
-	PangoLayout *layout;
-
-#if 0
-	g_print ("In e_calendar_item_draw_month: %i,%i %ix%i row:%i col:%i\n",
-		 x, y, width, height, row, col);
-#endif
-	item = GNOME_CANVAS_ITEM (calitem);
-	widget = GTK_WIDGET (item->canvas);
-	style = widget->style;
-
-	/* Set up Pango prerequisites */
-	font_desc = calitem->font_desc;
-	if (!font_desc)
-		font_desc = style->font_desc;
-	pango_context = gtk_widget_get_pango_context (widget);
-	font_metrics = pango_context_get_metrics (pango_context, font_desc,
-						  pango_context_get_language (pango_context));
-
-	char_height =
-		PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
-		PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics));
-	xthickness = style->xthickness;
-	ythickness = style->ythickness;
-	fg_gc = style->fg_gc[GTK_STATE_NORMAL];
-
-	pango_font_metrics_unref (font_metrics);
-
-	/* Calculate the top-left position of the entire month display. */
-	month_x = item->x1 + xthickness + calitem->x_offset
-		+ col * calitem->month_width - x;
-	month_w = item->x2 - item->x1 - xthickness * 2;
-	month_w = MIN (month_w, calitem->month_width);
-	month_y = item->y1 + ythickness + row * calitem->month_height - y;
-	month_h = item->y2 - item->y1 - ythickness * 2;
-	month_h = MIN (month_h, calitem->month_height);
-
-	/* Just return if the month is outside the given area. */
-	if (month_x >= width || month_x + calitem->month_width <= 0
-	    || month_y >= height || month_y + calitem->month_height <= 0)
-		return;
-
-	month = calitem->month + row * calitem->cols + col;
-	year = calitem->year + month / 12;
-	month %= 12;
-
-	/* Draw the month name & year, with clipping. Note that the top row
-	   needs extra space around it for the buttons. */
-
-	layout = gtk_widget_create_pango_layout (widget, NULL);
-
-	if (row == 0 && col == 0)
-		min_x = E_CALENDAR_ITEM_XPAD_BEFORE_MONTH_NAME_WITH_BUTTON;
-	else
-		min_x = E_CALENDAR_ITEM_XPAD_BEFORE_MONTH_NAME;
-
-	max_x = month_w;
-	if (row == 0 && col == calitem->cols - 1)
-		max_x -= E_CALENDAR_ITEM_XPAD_AFTER_MONTH_NAME_WITH_BUTTON;
-	else
-		max_x -= E_CALENDAR_ITEM_XPAD_AFTER_MONTH_NAME;
-
-	text_y = month_y + style->ythickness
-		+ E_CALENDAR_ITEM_YPAD_ABOVE_MONTH_NAME;
-	clip_rect.x = month_x + min_x;
-	clip_rect.x = MAX (0, clip_rect.x);
-	clip_rect.y = MAX (0, text_y);
-
-	memset (&tmp_tm, 0, sizeof (tmp_tm));
-	tmp_tm.tm_year = year - 1900;
-	tmp_tm.tm_mon = month;
-	tmp_tm.tm_mday = 1;
-	tmp_tm.tm_isdst = -1;
-	mktime (&tmp_tm);
-	start_weekday = (tmp_tm.tm_wday + 6) % 7;
-
-	if (month_x + max_x - clip_rect.x > 0) {
-		clip_rect.width = month_x + max_x - clip_rect.x;
-		clip_rect.height = text_y + char_height - clip_rect.y;
-		gdk_gc_set_clip_rectangle (fg_gc, &clip_rect);
-
-		/* This is a strftime() format. %B = Month name, %Y = Year. */
-		e_utf8_strftime (buffer, sizeof (buffer), _("%B %Y"), &tmp_tm);
-
-		pango_layout_set_font_description (layout, font_desc);
-		pango_layout_set_text (layout, buffer, -1);
-
-		/* Ideally we place the text centered in the month, but we
-		   won't go to the left of the minimum x position. */
-		pango_layout_get_pixel_size (layout, &text_width, NULL);
-		text_x = (calitem->month_width - text_width) / 2;
-		text_x = MAX (min_x, text_x);
-
-		gdk_draw_layout (drawable, fg_gc,
-				 month_x + text_x,
-				 text_y,
-				 layout);
-	}
-
-	/* Set the clip rectangle for the main month display. */
-	clip_rect.x = MAX (0, month_x);
-	clip_rect.y = MAX (0, month_y);
-	clip_width = month_x + month_w - clip_rect.x;
-	clip_height = month_y + month_h - clip_rect.y;
-
-	if (clip_width <= 0 || clip_height <= 0) {
-		g_object_unref (layout);
-		return;
-	}
-
-	clip_rect.width = clip_width;
-	clip_rect.height = clip_height;
-
-	gdk_gc_set_clip_rectangle (fg_gc, &clip_rect);
-
-
-	/* Draw the day initials across the top of the month. */
-	min_cell_width = calitem->max_digit_width * 2
-		+ E_CALENDAR_ITEM_MIN_CELL_XPAD;
-
-	cells_x = month_x + E_CALENDAR_ITEM_XPAD_BEFORE_WEEK_NUMBERS + calitem->month_lpad
-		+ E_CALENDAR_ITEM_XPAD_BEFORE_CELLS;
-	if (calitem->show_week_numbers)
-		cells_x += calitem->max_week_number_digit_width * 2
-			+ E_CALENDAR_ITEM_XPAD_AFTER_WEEK_NUMBERS + 1;
-	text_x = cells_x + calitem->cell_width
-		- (calitem->cell_width - min_cell_width) / 2;
-	text_x -= E_CALENDAR_ITEM_MIN_CELL_XPAD / 2;
-	text_y = month_y + ythickness * 2
-		+ E_CALENDAR_ITEM_YPAD_ABOVE_MONTH_NAME
-		+ char_height + E_CALENDAR_ITEM_YPAD_BELOW_MONTH_NAME
-		+ E_CALENDAR_ITEM_YPAD_ABOVE_DAY_LETTERS + calitem->month_tpad;
-
-	cells_y = text_y + char_height
-		+ E_CALENDAR_ITEM_YPAD_BELOW_DAY_LETTERS + 1
-		+ E_CALENDAR_ITEM_YPAD_ABOVE_CELLS;
-
-	day_index = calitem->week_start_day;
-	pango_layout_set_font_description (layout, font_desc);
-	for (day = 0; day < 7; day++) {
-		layout_set_day_text (calitem, layout, day_index);
-		gdk_draw_layout (drawable, fg_gc,
-				 text_x - calitem->day_widths [day_index],
-				 text_y,
-				 layout);
-
-		text_x += calitem->cell_width;
-		day_index++;
-		if (day_index == 7)
-			day_index = 0;
-	}
-
-
-	/* Draw the horizontal line beneath the day initials. */
-	gdk_draw_line (drawable, fg_gc,
-		       cells_x - E_CALENDAR_ITEM_XPAD_BEFORE_CELLS,
-		       cells_y - E_CALENDAR_ITEM_YPAD_ABOVE_CELLS - 1,
-		       cells_x + E_CALENDAR_COLS_PER_MONTH * calitem->cell_width - 1,
-		       cells_y - E_CALENDAR_ITEM_YPAD_ABOVE_CELLS - 1);
-
-	e_calendar_item_draw_day_numbers (calitem, drawable, width, height,
-					  row, col, year, month, start_weekday,
-					  cells_x, cells_y);
-
-	/* Draw the vertical line after the week number. */
-	if (calitem->show_week_numbers) {
-		gdk_draw_line (drawable, fg_gc,
-			       cells_x - E_CALENDAR_ITEM_XPAD_BEFORE_CELLS - 1,
-			       cells_y - E_CALENDAR_ITEM_YPAD_ABOVE_CELLS - 1,
-			       cells_x - E_CALENDAR_ITEM_XPAD_BEFORE_CELLS - 1,
-			       cells_y + E_CALENDAR_ROWS_PER_MONTH * calitem->cell_height - 1);
-	}
-
-	gdk_gc_set_clip_rectangle (fg_gc, NULL);
-	g_object_unref (layout);
-}
-
-
-static void
-e_calendar_item_draw_day_numbers (ECalendarItem	*calitem,
-				  GdkDrawable	*drawable,
-				  int		 width,
-				  int		 height,
-				  int		 row,
-				  int		 col,
-				  int		 year,
-				  int		 month,
-				  int		 start_weekday,
-				  gint		 cells_x,
-				  gint		 cells_y)
-{
-	GnomeCanvasItem *item;
-	GtkWidget *widget;
-	GtkStyle *style;
-	PangoFontDescription *font_desc, *wkfont_desc;
-	GdkGC *fg_gc;
-	GdkColor *bg_color, *fg_color, *box_color;
-	struct tm today_tm;
-	time_t t;
-	gint char_height, min_cell_width, min_cell_height;
-	gint day_num, drow, dcol, day_x, day_y;
-	gint text_x, text_y;
-	gint num_chars, digit;
-	gint week_num, mon, days_from_week_start;
-	gint years[3], months[3], days_in_month[3];
-	gboolean today, selected, has_focus, drop_target = FALSE;
-	gboolean bold, draw_day, finished = FALSE;
-	gint today_year, today_month, today_mday, month_offset;
-	gchar buffer[2];
-	gint day_style = 0;
-	PangoContext *pango_context;
-	PangoFontMetrics *font_metrics;
-	PangoLayout *layout;
-
-	item = GNOME_CANVAS_ITEM (calitem);
-	widget = GTK_WIDGET (item->canvas);
-	style = widget->style;
-
-	/* Set up Pango prerequisites */
-	font_desc = calitem->font_desc;
-	if (!font_desc)
-		font_desc = style->font_desc;
-	wkfont_desc = calitem->week_number_font_desc;
-	if (!wkfont_desc)
-		wkfont_desc = font_desc;
-	fg_gc = style->fg_gc[GTK_STATE_NORMAL];
-
-	pango_context = gtk_widget_get_pango_context (widget);
-	font_metrics = pango_context_get_metrics (pango_context, font_desc,
-						  pango_context_get_language (pango_context));
-
-	char_height =
-		PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
-		PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics));
-
-	min_cell_width = calitem->max_digit_width * 2
-		+ E_CALENDAR_ITEM_MIN_CELL_XPAD;
-	min_cell_height = char_height + E_CALENDAR_ITEM_MIN_CELL_YPAD;
-
-	layout = gtk_widget_create_pango_layout (widget, NULL);
-
-	/* Calculate the number of days in the previous, current, and next
-	   months. */
-	years[0] = years[1] = years[2] = year;
-	months[0] = month - 1;
-	months[1] = month;
-	months[2] = month + 1;
-	if (months[0] == -1) {
-		months[0] = 11;
-		years[0]--;
-	}
-	if (months[2] == 12) {
-		months[2] = 0;
-		years[2]++;
-	}
-
-	days_in_month[0] = DAYS_IN_MONTH (years[0], months[0]);
-	days_in_month[1] = DAYS_IN_MONTH (years[1], months[1]);
-	days_in_month[2] = DAYS_IN_MONTH (years[2], months[2]);
-
-	/* Mon 0 is the previous month, which we may show the end of. Mon 1 is
-	   the current month, and mon 2 is the next month. */
-	mon = 0;
-
-	month_offset = row * calitem->cols + col - 1;
-	day_num = days_in_month[0];
-	days_from_week_start = (start_weekday + 7 - calitem->week_start_day)
-		% 7;
-	/* For the top-left month we show the end of the previous month, and
-	   if the new month starts on the first day of the week we show a
-	   complete week from the previous month. */
-	if (days_from_week_start == 0) {
-		if (row == 0 && col == 0) {
-			day_num -= 6;
-		} else {
-			mon++;
-			month_offset++;
-			day_num = 1;
-		}
-	} else {
-		day_num -= days_from_week_start - 1;
-	}
-
-	/* Get today's date, so we can highlight it. */
-	if (calitem->time_callback) {
-		today_tm = (*calitem->time_callback) (calitem, calitem->time_callback_data);
-	} else {
-		t = time (NULL);
-		today_tm = *localtime (&t);
-	}
-	today_year = today_tm.tm_year + 1900;
-	today_month = today_tm.tm_mon;
-	today_mday = today_tm.tm_mday;
-
-	/* We usually skip the last days of the previous month (mon = 0),
-	   except for the top-left month displayed. */
-	draw_day = (mon == 1 || (row == 0 && col == 0));
-
-	for (drow = 0; drow < 6; drow++) {
-		/* Draw the week number. */
-		if (calitem->show_week_numbers) {
-			week_num = e_calendar_item_get_week_number (calitem,
-								    day_num,
-								    months[mon],
-								    years[mon]);
-
-			text_x = cells_x - E_CALENDAR_ITEM_XPAD_BEFORE_CELLS - 1
-				- E_CALENDAR_ITEM_XPAD_AFTER_WEEK_NUMBERS;
-			text_y = cells_y + drow * calitem->cell_height +
-				+ (calitem->cell_height - min_cell_height + 1) / 2;
-
-			num_chars = 0;
-			if (week_num >= 10) {
-				digit = week_num / 10;
-				text_x -= calitem->week_number_digit_widths[digit];
-				buffer[num_chars++] = digit + '0';
-			}
-
-			digit = week_num % 10;
-			text_x -= calitem->week_number_digit_widths[digit];
-			buffer[num_chars++] = digit + '0';
-
-			gdk_gc_set_foreground (fg_gc,
-					       &style->fg[GTK_STATE_NORMAL]);
-
-			pango_layout_set_font_description (layout, wkfont_desc);
-			pango_layout_set_text (layout, buffer, num_chars);
-			gdk_draw_layout (drawable, fg_gc,
-					 text_x,
-					 text_y,
-					 layout);
-		}
-
-		for (dcol = 0; dcol < 7; dcol++) {
-			if (draw_day) {
-				day_x = cells_x + dcol * calitem->cell_width;
-				day_y = cells_y + drow * calitem->cell_height;
-
-				today = years[mon] == today_year
-					&& months[mon] == today_month
-					&& day_num == today_mday;
-
-				selected = calitem->selection_set
-					&& (calitem->selection_start_month_offset < month_offset
-					    || (calitem->selection_start_month_offset == month_offset
-						&& calitem->selection_start_day <= day_num))
-					&& (calitem->selection_end_month_offset > month_offset
-					    || (calitem->selection_end_month_offset == month_offset
-						&& calitem->selection_end_day >= day_num));
-
-				if (calitem->styles)
-					day_style = calitem->styles[(month_offset + 1) * 32 + day_num];
-
-				/* Get the colors & style to use for the day.*/
-				if ((GTK_WIDGET_HAS_FOCUS(item->canvas)) &&
-				    item->canvas->focused_item == item)
-					has_focus = TRUE;
-				else
-					has_focus = FALSE;
-
-				if (calitem->style_callback)
-					(*calitem->style_callback)
-						(calitem,
-						 years[mon],
-						 months[mon],
-						 day_num,
-						 day_style,
-						 today,
-						 mon != 1,
-						 selected,
-						 has_focus,
-						 drop_target,
-						 &bg_color,
-						 &fg_color,
-						 &box_color,
-						 &bold,
-						 calitem->style_callback_data);
-				else
-					e_calendar_item_get_day_style
-						(calitem,
-						 years[mon],
-						 months[mon],
-						 day_num,
-						 day_style,
-						 today,
-						 mon != 1,
-						 selected,
-						 has_focus,
-						 drop_target,
-						 &bg_color,
-						 &fg_color,
-						 &box_color,
-						 &bold);
-
-				/* Draw the background, if set. */
-				if (bg_color) {
-					gdk_gc_set_foreground (fg_gc, bg_color);
-					gdk_draw_rectangle (drawable, fg_gc,
-							    TRUE,
-							    day_x, day_y,
-							    calitem->cell_width,
-							    calitem->cell_height);
-				}
-
-				/* Draw the box, if set. */
-				if (box_color) {
-					gdk_gc_set_foreground (fg_gc, box_color);
-					gdk_draw_rectangle (drawable, fg_gc,
-							    FALSE,
-							    day_x, day_y,
-							    calitem->cell_width - 1,
-							    calitem->cell_height - 1);
-				}
-
-				/* Draw the 1- or 2-digit day number. */
-				day_x += calitem->cell_width - (calitem->cell_width - min_cell_width) / 2;
-				day_x -= E_CALENDAR_ITEM_MIN_CELL_XPAD / 2;
-				day_y += (calitem->cell_height - min_cell_height + 1) / 2;
-				day_y += E_CALENDAR_ITEM_MIN_CELL_YPAD / 2;
-
-				num_chars = 0;
-				if (day_num >= 10) {
-					digit = day_num / 10;
-					day_x -= calitem->digit_widths[digit];
-					buffer[num_chars++] = digit + '0';
-				}
-
-				digit = day_num % 10;
-				day_x -= calitem->digit_widths[digit];
-				buffer[num_chars++] = digit + '0';
-
-				if (fg_color) {
-					gdk_gc_set_foreground (fg_gc,
-							       fg_color);
-				} else {
-					gdk_gc_set_foreground (fg_gc,
-							       &style->fg[GTK_STATE_NORMAL]);
-				}
-
-				pango_layout_set_font_description (layout, font_desc);
-				pango_layout_set_text (layout, buffer, num_chars);
-				gdk_draw_layout (drawable, fg_gc,
-						 day_x,
-						 day_y,
-						 layout);
-
-				/* We use a stupid technique for bold. Just
-				   draw it again 1 pixel to the left. */
-				if (bold)
-					gdk_draw_layout (drawable, fg_gc,
-							 day_x - 1,
-							 day_y,
-							 layout);
-			}
-
-			/* See if we've reached the end of a month. */
-			if (day_num == days_in_month[mon]) {
-				month_offset++;
-				mon++;
-				/* We only draw the start of the next month
-				   for the bottom-right month displayed. */
-				if (mon == 2 && (row != calitem->rows - 1
-						 || col != calitem->cols - 1)) {
-					/* Set a flag so we exit the loop. */
-					finished = TRUE;
-					break;
-				}
-				day_num = 1;
-				draw_day = TRUE;
-			} else {
-				day_num++;
-			}
-		}
-
-		/* Exit the loop if the flag is set. */
-		if (finished)
-			break;
-	}
-
-	/* Reset the foreground color. */
-	gdk_gc_set_foreground (fg_gc, &style->fg[GTK_STATE_NORMAL]);
-
-	g_object_unref (layout);
-	pango_font_metrics_unref (font_metrics);
-}
-#endif
-
-#ifdef ENABLE_CAIRO
 static void
 e_calendar_item_draw		(GnomeCanvasItem *canvas_item,
 				 GdkDrawable	 *drawable,
@@ -2139,7 +1512,6 @@
 	pango_font_metrics_unref (font_metrics);
 	cairo_destroy (cr);
 }
-#endif
 
 gint
 e_calendar_item_get_week_number	(ECalendarItem *calitem,

Modified: branches/mbarnes-composer/widgets/misc/e-search-bar.c
==============================================================================
--- branches/mbarnes-composer/widgets/misc/e-search-bar.c	(original)
+++ branches/mbarnes-composer/widgets/misc/e-search-bar.c	Wed Mar 26 19:54:10 2008
@@ -215,11 +215,11 @@
 		gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, &(style->text[GTK_STATE_SELECTED]));
 		gtk_widget_modify_base (esb->icon_entry, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
 		gtk_widget_modify_base (esb->viewoption, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
-
 	} else {
 		gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, NULL);
 		gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
 		gtk_widget_modify_base (esb->icon_entry, GTK_STATE_NORMAL, NULL);
+		gtk_widget_set_sensitive (esb->clear_button, FALSE);
 	}
 
 	g_free (text);
@@ -237,6 +237,7 @@
 	gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, NULL);
 	gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
 	gtk_widget_modify_base (esb->icon_entry, GTK_STATE_NORMAL, NULL);
+	gtk_widget_set_sensitive (esb->clear_button, FALSE);
 
 	clear_search (esb);
 	gtk_entry_set_text (GTK_ENTRY (esb->entry), "");
@@ -385,6 +386,7 @@
 		gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, NULL);
 		gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
 		gtk_widget_modify_base (esb->icon_entry, GTK_STATE_NORMAL, NULL);
+		gtk_widget_set_sensitive (esb->clear_button, FALSE);
 	}
 
 	emit_search_activated (esb);
@@ -400,13 +402,15 @@
 	entry_style = gtk_widget_get_style (esb->entry);
 	default_style = gtk_widget_get_default_style ();
 
-	if (text && *text)
+	if (text && *text) {
 		if (gdk_color_equal (&(entry_style->text[GTK_STATE_NORMAL]), &(default_style->text[GTK_STATE_INSENSITIVE])))
 			gtk_widget_set_sensitive (esb->clear_button, FALSE);
 		else
 			gtk_widget_set_sensitive (esb->clear_button, TRUE);
-	else
-		gtk_widget_set_sensitive (esb->clear_button, FALSE);
+	} else {
+		/* selected color means some search text is active */
+		gtk_widget_set_sensitive (esb->clear_button, gdk_color_equal (&(entry_style->base[GTK_STATE_NORMAL]), &(default_style->base[GTK_STATE_SELECTED])));
+	}
 }
 
 static void
@@ -507,6 +511,7 @@
 	gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, NULL);
 	gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
 	gtk_widget_modify_base (esb->icon_entry, GTK_STATE_NORMAL, NULL);
+	gtk_widget_set_sensitive (esb->clear_button, FALSE);
 
 	clear_search (esb);
 	gtk_entry_set_text (GTK_ENTRY (esb->entry), "");



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