evolution r36867 - in branches/kill-bonobo: . addressbook addressbook/gui/component addressbook/gui/contact-editor addressbook/gui/widgets addressbook/printing addressbook/util calendar calendar/gui calendar/gui/alarm-notify calendar/gui/dialogs composer doc/reference/shell/tmpl e-util filter mail plugins/caldav plugins/calendar-weather plugins/exchange-operations plugins/itip-formatter plugins/mailing-list-actions plugins/sa-junk-plugin po shell widgets/misc widgets/table



Author: mbarnes
Date: Wed Dec 10 18:30:29 2008
New Revision: 36867
URL: http://svn.gnome.org/viewvc/evolution?rev=36867&view=rev

Log:
Merge revisions 36811:36865 from trunk.


Removed:
   branches/kill-bonobo/filter/filter-label.c
   branches/kill-bonobo/filter/filter-label.h
Modified:
   branches/kill-bonobo/   (props changed)
   branches/kill-bonobo/ChangeLog
   branches/kill-bonobo/NEWS
   branches/kill-bonobo/addressbook/ChangeLog
   branches/kill-bonobo/addressbook/gui/component/eab-composer-util.c   (props changed)
   branches/kill-bonobo/addressbook/gui/component/eab-composer-util.h   (props changed)
   branches/kill-bonobo/addressbook/gui/component/ldap-config.glade
   branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-im.c
   branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor.c
   branches/kill-bonobo/addressbook/gui/widgets/addresstypes.xml
   branches/kill-bonobo/addressbook/gui/widgets/eab-contact-display.c
   branches/kill-bonobo/addressbook/gui/widgets/eab-gui-util.c
   branches/kill-bonobo/addressbook/printing/e-contact-print.glade
   branches/kill-bonobo/addressbook/util/addressbook.c   (props changed)
   branches/kill-bonobo/addressbook/util/addressbook.h   (props changed)
   branches/kill-bonobo/calendar/ChangeLog
   branches/kill-bonobo/calendar/gui/alarm-notify/alarm-notify.glade
   branches/kill-bonobo/calendar/gui/caltypes.xml
   branches/kill-bonobo/calendar/gui/dialogs/alarm-dialog.c
   branches/kill-bonobo/calendar/gui/dialogs/alarm-dialog.glade
   branches/kill-bonobo/calendar/gui/dialogs/cal-prefs-dialog.glade
   branches/kill-bonobo/calendar/gui/dialogs/comp-editor.c
   branches/kill-bonobo/calendar/gui/dialogs/event-editor.c
   branches/kill-bonobo/calendar/gui/dialogs/event-page.c
   branches/kill-bonobo/calendar/gui/dialogs/event-page.glade
   branches/kill-bonobo/calendar/gui/dialogs/memo-editor.c
   branches/kill-bonobo/calendar/gui/dialogs/memo-page.c
   branches/kill-bonobo/calendar/gui/dialogs/recurrence-page.glade
   branches/kill-bonobo/calendar/gui/dialogs/task-details-page.glade
   branches/kill-bonobo/calendar/gui/dialogs/task-editor.c
   branches/kill-bonobo/calendar/gui/dialogs/task-page.c
   branches/kill-bonobo/calendar/gui/e-cal-model.c
   branches/kill-bonobo/calendar/gui/e-calendar-table.c
   branches/kill-bonobo/calendar/gui/e-calendar-view.c
   branches/kill-bonobo/calendar/gui/e-calendar-view.h
   branches/kill-bonobo/calendar/gui/e-day-view-top-item.c
   branches/kill-bonobo/calendar/gui/e-day-view.c
   branches/kill-bonobo/calendar/gui/e-week-view.c
   branches/kill-bonobo/calendar/gui/goto-dialog.glade
   branches/kill-bonobo/calendar/gui/itip-utils.c
   branches/kill-bonobo/calendar/gui/memotypes.xml
   branches/kill-bonobo/calendar/gui/tasktypes.xml
   branches/kill-bonobo/composer/ChangeLog
   branches/kill-bonobo/composer/e-msg-composer.c
   branches/kill-bonobo/configure.in
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-content.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-taskbar.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-window.sgml
   branches/kill-bonobo/doc/reference/shell/tmpl/eshell-unused.sgml
   branches/kill-bonobo/e-util/ChangeLog
   branches/kill-bonobo/e-util/e-config.c
   branches/kill-bonobo/e-util/e-util-labels.c
   branches/kill-bonobo/e-util/e-util-labels.h
   branches/kill-bonobo/e-util/e-util.c
   branches/kill-bonobo/e-util/e-util.h
   branches/kill-bonobo/e-util/gconf-bridge.c
   branches/kill-bonobo/filter/ChangeLog
   branches/kill-bonobo/filter/Makefile.am
   branches/kill-bonobo/filter/filter-element.c
   branches/kill-bonobo/filter/filter-option.c
   branches/kill-bonobo/filter/filter-option.h
   branches/kill-bonobo/filter/filter.glade
   branches/kill-bonobo/filter/rule-context.c
   branches/kill-bonobo/mail/ChangeLog
   branches/kill-bonobo/mail/em-filter-i18n.h
   branches/kill-bonobo/mail/em-folder-properties.c
   branches/kill-bonobo/mail/em-folder-tree-model.c
   branches/kill-bonobo/mail/em-folder-tree.c
   branches/kill-bonobo/mail/filtertypes.xml
   branches/kill-bonobo/mail/mail-component.c
   branches/kill-bonobo/mail/mail-config.c
   branches/kill-bonobo/mail/mail-config.glade
   branches/kill-bonobo/mail/message-list.c
   branches/kill-bonobo/mail/searchtypes.xml
   branches/kill-bonobo/mail/vfoldertypes.xml
   branches/kill-bonobo/plugins/caldav/ChangeLog
   branches/kill-bonobo/plugins/caldav/caldav-source.c
   branches/kill-bonobo/plugins/caldav/org-gnome-evolution-caldav.eplug.xml
   branches/kill-bonobo/plugins/calendar-weather/ChangeLog
   branches/kill-bonobo/plugins/calendar-weather/Makefile.am
   branches/kill-bonobo/plugins/calendar-weather/calendar-weather.c
   branches/kill-bonobo/plugins/exchange-operations/ChangeLog
   branches/kill-bonobo/plugins/exchange-operations/exchange-account-setup.c
   branches/kill-bonobo/plugins/exchange-operations/org-gnome-exchange-operations.error.xml
   branches/kill-bonobo/plugins/itip-formatter/ChangeLog
   branches/kill-bonobo/plugins/itip-formatter/itip-formatter.c
   branches/kill-bonobo/plugins/mailing-list-actions/ChangeLog
   branches/kill-bonobo/plugins/mailing-list-actions/org-gnome-mailing-list-actions.error.xml
   branches/kill-bonobo/plugins/sa-junk-plugin/ChangeLog
   branches/kill-bonobo/plugins/sa-junk-plugin/em-junk-filter.c
   branches/kill-bonobo/po/ChangeLog
   branches/kill-bonobo/po/es.po
   branches/kill-bonobo/po/fi.po
   branches/kill-bonobo/shell/ChangeLog
   branches/kill-bonobo/shell/main.c
   branches/kill-bonobo/widgets/misc/ChangeLog
   branches/kill-bonobo/widgets/misc/e-attachment-bar.c
   branches/kill-bonobo/widgets/misc/e-send-options.glade
   branches/kill-bonobo/widgets/table/ChangeLog
   branches/kill-bonobo/widgets/table/e-cell-text.c

Modified: branches/kill-bonobo/NEWS
==============================================================================
--- branches/kill-bonobo/NEWS	(original)
+++ branches/kill-bonobo/NEWS	Wed Dec 10 18:30:29 2008
@@ -1,3 +1,52 @@
+Evolution 2.25.2 2008-12-01
+---------------------------
+
+New in 2.25.2:
+       Added a "Dismiss" button to the alarm notification dialog to be able to dismiss only some of the alarms shown in the dialog (Milan Crha)
+       Show attendees' status in the tooltip if available (Milan Crha)
+       Support for evolution-mapi support (Suman Manjunath)
+
+Bug Fixes:
+       #332729: Disconnect handlers on the widget before freeing the structure it is using (Milan Crha)
+       #359745: Show CalDAV options under all the other standard options (Milan Crha)
+       #386036: Added new option "Sender or Recipients" which filters on From/To/Cc/Bcc headers (Milan Crha)
+       #434320: (Novell Bugzilla) When the popup is clicked close the status icon (Srinivasa Ragavan)
+       #437226: (Novell Bugzilla) Proper message to hint the mail is being sent by delegatee (Bharath Acharya)
+       #440007: (Novell Bugzilla) Print Preview of Calendar Event Shows Blank Page Before Data fixed (Bharath Acharya)
+       #440646: (Novell Bugzilla) Set the ESource color-spec for proxy accounts in the correct format (Suman Manjunath)
+       #443190: (Novell Bugzilla) Block signals from attachment-bar while still filling the widgets (Suman Manjunath)
+       #446286: (Novell Bugzilla) Remove the header check as we do a e_gw_connection_get_item for tracking the status (Bharath Acharya)
+       #490503: Show summary of unaccepted meetings as bold in calendar views (Suman Manjunath)
+       #503662: Set NULL properly to protect against using already freed memory (Milan Crha)
+       #524377: Declare, be able to change and listen to changes on new key, '/apps/evolution/mail/composer/outlook_filenames' to encode file names header in camel based on the RFC 2047, instead of the correct RFC 2231 (Milan Crha)
+       #541121: Itip-formatter: don't allow sending a response to meeting invitation replies (Patrick Ohly)
+       #552583: Strip the attributes out of both URLs and just do a simple string comparison. Try to match a URL to an account (Matthew Barnes)
+       #552850: Prefer the term "side bar" over "folder tree" (Matthew Barnes)
+       #554450: Get drag-and-drop to the attachment bar working again (Matthew Barnes)
+       #554464: Bump gtk+ minimum version to 2.14.0 which pulls in a recent enough Pango version (Felix Riemann)
+       #555276: Don't load vfolder as subfolder (Srinivasa Ragavan)
+       #556224: Run always 'update_todo_view' in a separate thread and guard its body with a mutex (Milan Crha)
+       #557246: Pop up the "Unsubscribe Folder" option only for the subscribed folders and not to the Other's folder hierarchy (Bharath Acharya)
+       #557581: Break up the version definitions such that we can calculate the latest stable version and pass a STABLE_VERSION definition (Matthew Barnes)
+       #557726: Destroy the widgets created by the google contacts group (Bharath Acharya)
+       #557818: ESourceSelector now handles most of the drag-and-drop signals. We just have to listen for the new "data-dropped" signal and deal with it (Matthew Barnes)
+       #558322: New "Rename" item in the source selector pop-up menu calls the recently added e_source_selector_edit_primary_selection (Matthew Barnes)
+       #558354: Changed "Close" button to "Dismiss all" and added a "Dismiss" button to the alarm notification dialog to be able to dismiss only some of the alarms shown in the dialog (Milan Crha)
+       #559371: Opening _either_ Preferences or a new composer window with no spell checking language chosen will pick a default language for you (Matthew Barnes)
+       #559518: Desensitizes the button when the username field is blank for the google source (Matthew Barnes)
+       #559604: Show attendees' status in the tooltip if available (Milan Crha)
+       #559701: Edit Preferences crashes when there are no spell checking dictionaries added.  Don't save when its NULL (Srinivasa Ragavan)
+       #559810: Do not localize empty label names, also localize them only first time (Milan Crha)
+       #560138: Let wrap description text in a tooltip (Milan Crha)
+       #560329: Fix the signature of the 'children-changed' signal emission (Li Yuan)
+       #560882: Left-align header labels instead of centering them, and adjust the header padding so they look purdy (Matthew Barnes)
+       #561467: some changes in the core code needed for evolution-mapi (Suman Manjunath)
+
+Updated Translations:
+       Jorge Gonzalez (es)
+       Petr Kovar (cs)
+       Nickolay V. Shmyrev (ru)
+
 Evolution 2.25.1 2008-11-03
 ---------------------------
 

Modified: branches/kill-bonobo/addressbook/gui/component/ldap-config.glade
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/ldap-config.glade	(original)
+++ branches/kill-bonobo/addressbook/gui/component/ldap-config.glade	Wed Dec 10 18:30:29 2008
@@ -1394,7 +1394,7 @@
 			  <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 1000 1 10 10</property>
+			  <property name="adjustment">0 0 1000 1 10 0</property>
 			</widget>
 			<packing>
 			  <property name="left_attach">1</property>
@@ -2942,7 +2942,7 @@
 			  <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 1000 1 10 10</property>
+			  <property name="adjustment">0 0 1000 1 10 0</property>
 			</widget>
 			<packing>
 			  <property name="left_attach">1</property>

Modified: branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-im.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-im.c	(original)
+++ branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-im.c	Wed Dec 10 18:30:29 2008
@@ -47,8 +47,8 @@
 	PROP_EDITABLE
 };
 
-#define FIRST_IM_TYPE E_CONTACT_IM_AIM
-#define LAST_IM_TYPE  E_CONTACT_IM_ICQ
+/*#define FIRST_IM_TYPE E_CONTACT_IM_AIM
+#define LAST_IM_TYPE  E_CONTACT_IM_ICQ*/
 
 static const char *im_labels[] = {
 	N_("AOL Instant Messenger"),
@@ -57,7 +57,8 @@
 	N_("Yahoo Messenger"),
 	N_("Gadu-Gadu Messenger"),
 	N_("MSN Messenger"),
-	N_("ICQ")
+	N_("ICQ"),
+	N_("Skype")
 };
 
 static const char *im_images[] = {
@@ -67,9 +68,47 @@
 	"im-yahoo",
 	"im-gadugadu",
 	"im-msn",
-	"im-icq"
+	"im-icq",
+	"stock_people"
 };
 
+/**
+ * Decodes from service (E_CONTACT_IM_ value to the index in the above
+ * fields and back, depending on the second parameter.
+ * @param val Value to decode
+ * @param val_is_service TRUE, if val is E_CONTACT_IM_ value, otherwise it's an index number.
+ **/
+static int
+decode_service (int val, gboolean val_is_service)
+{
+	static const int fields[] = {
+		E_CONTACT_IM_AIM,
+		E_CONTACT_IM_GROUPWISE,
+		E_CONTACT_IM_JABBER,
+		E_CONTACT_IM_YAHOO,
+		E_CONTACT_IM_GADUGADU,
+		E_CONTACT_IM_MSN,
+		E_CONTACT_IM_ICQ,
+		E_CONTACT_IM_SKYPE
+	};
+
+	int i, sz = G_N_ELEMENTS (fields);
+	if (val_is_service) {
+		for (i = 0; i < sz; i++) {
+			if (val == fields[i])
+				break;
+		}
+		if (i >= sz)
+			i = 0;
+	} else if (val >= 0 && val < sz) {
+		i = fields [val];
+	} else {
+		i = fields [0];
+	}
+
+	return i;
+}
+
 GType
 e_contact_editor_im_get_type (void)
 {
@@ -111,9 +150,9 @@
 					 g_param_spec_int ("service",
 							   _("Service"),
 							   /*_( */"XXX blurb" /*)*/,
-							   FIRST_IM_TYPE,
-							   LAST_IM_TYPE,
-							   FIRST_IM_TYPE,
+							   E_CONTACT_IM_AIM,
+							   E_CONTACT_IM_SKYPE,
+							   E_CONTACT_IM_AIM,
 							   G_PARAM_READWRITE));
 
 	g_object_class_install_property (object_class, PROP_LOCATION,
@@ -141,7 +180,7 @@
 static void
 service_changed_cb(GtkWidget *optmenu, EContactEditorIm *editor)
 {
-	editor->service = gtk_option_menu_get_history(GTK_OPTION_MENU(optmenu)) + FIRST_IM_TYPE;
+	editor->service = decode_service (gtk_option_menu_get_history(GTK_OPTION_MENU(optmenu)), FALSE);
 }
 
 static void
@@ -254,7 +293,7 @@
 
 	gtk_window_set_resizable(GTK_WINDOW(e_contact_editor_im), TRUE);
 
-	e_contact_editor_im->service = FIRST_IM_TYPE;
+	e_contact_editor_im->service = decode_service (0, FALSE);
 	e_contact_editor_im->location = g_strdup("HOME");
 	e_contact_editor_im->username = NULL;
 
@@ -440,7 +479,7 @@
 	optmenu = glade_xml_get_widget(editor->gui, "optmenu-service");
 
 	if (optmenu != NULL)
-		gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), editor->service - FIRST_IM_TYPE);
+		gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), decode_service (editor->service, TRUE));
 
 	optmenu = glade_xml_get_widget(editor->gui, "optmenu-location");
 

Modified: branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor.c	(original)
+++ branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor.c	Wed Dec 10 18:30:29 2008
@@ -36,6 +36,7 @@
 #include <misc/e-gui-utils.h>
 
 #include <libebook/e-address-western.h>
+#include <libedataserverui/e-category-completion.h>
 #include <libedataserverui/e-source-combo-box.h>
 
 #include <camel/camel.h>
@@ -176,7 +177,8 @@
 	{ E_CONTACT_IM_GADUGADU,  N_ ("Gadu-Gadu") },
 	{ E_CONTACT_IM_MSN,       N_ ("MSN")       },
 	{ E_CONTACT_IM_ICQ,       N_ ("ICQ")       },
-	{ E_CONTACT_IM_GROUPWISE, N_ ("GroupWise") }
+	{ E_CONTACT_IM_GROUPWISE, N_ ("GroupWise") },
+	{ E_CONTACT_IM_SKYPE,     N_ ("Skype") }
 };
 
 /* Defaults from the table above */
@@ -3102,6 +3104,7 @@
 	E_CONTACT_IM_GADUGADU,
 	E_CONTACT_IM_MSN,
 	E_CONTACT_IM_ICQ,
+	E_CONTACT_IM_SKYPE,
 	E_CONTACT_PHOTO,
 	E_CONTACT_LOGO,
 	E_CONTACT_X509_CERT,
@@ -3357,6 +3360,7 @@
 {
 	GladeXML *gui;
 	GtkWidget *widget, *label;
+	GtkEntryCompletion *completion;
 	char *gladefile;
 
 	e_contact_editor->name = e_contact_name_new();
@@ -3417,6 +3421,11 @@
 	if (widget)
 		gtk_widget_grab_focus (widget);
 
+	widget = glade_xml_get_widget (e_contact_editor->gui, "entry-categories");
+	completion = e_category_completion_new ();
+	gtk_entry_set_completion (GTK_ENTRY (widget), completion);
+	g_object_unref (completion);
+
 	/* Connect to the deletion of the dialog */
 
 	g_signal_connect (e_contact_editor->app, "delete_event",

Modified: branches/kill-bonobo/addressbook/gui/widgets/addresstypes.xml
==============================================================================
--- branches/kill-bonobo/addressbook/gui/widgets/addresstypes.xml	(original)
+++ branches/kill-bonobo/addressbook/gui/widgets/addresstypes.xml	Wed Dec 10 18:30:29 2008
@@ -74,72 +74,7 @@
     </option>
    </input>
    <input type="optionlist" name="category">
-    <option value="Anniversary">
-        <title>Anniversary</title>
-    </option>
-    <option value="Holiday">
-        <title>Holiday</title>
-    </option>
-    <option value="Ideas">
-        <title>Ideas</title>
-    </option>
-    <option value="Status">
-        <title>Status</title>
-    </option>
-    <option value="Holiday Cards">
-        <title>Holiday Cards</title>
-    </option>
-    <option value="Hot Contacts">
-        <title>Hot Contacts</title>
-    </option>
-    <option value="International">
-        <title>International</title>
-    </option>
-    <option value="Birthday">
-        <title>Birthday</title>
-    </option>
-    <option value="VIP">
-        <title>VIP</title>
-    </option>
-    <option value="Gifts">
-        <title>Gifts</title>
-    </option>
-    <option value="Waiting">
-        <title>Waiting</title>
-    </option>
-    <option value="Key Customer">
-        <title>Key Customer</title>
-    </option>
-    <option value="Time &amp; Expenses">
-        <title>Time &amp; Expenses </title>
-    </option>
-    <option value="Miscellaneous">
-        <title>Miscellaneous</title>
-    </option>
-    <option value="Business">
-        <title>Business</title>
-    </option>
-    <option value="Personal">
-        <title>Personal</title>
-    </option>
-    <option value="Suppliers">
-        <title>Suppliers</title>
-    </option>
-    <option value="Goals/Objectives">
-        <title>Goals/Objectives</title>
-    </option>
-    <option value="Strategies">
-        <title>Strategies</title>
-    </option>
-    <option value="Competition">
-        <title>Competition</title>
-    </option>
-    <option value="Favourites">
-        <title>Favourites</title>
-    </option>
-    <option value="Phone Calls">
-        <title>Phone Calls</title>
-    </option>
+      <dynamic func="e_util_get_category_filter_options"/>
    </input>
  </part>
  <part name="sexp">

Modified: branches/kill-bonobo/addressbook/gui/widgets/eab-contact-display.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/widgets/eab-contact-display.c	(original)
+++ branches/kill-bonobo/addressbook/gui/widgets/eab-contact-display.c	Wed Dec 10 18:30:29 2008
@@ -91,6 +91,7 @@
 #define MSN_ICON          "im-msn"
 #define YAHOO_ICON        "im-yahoo"
 #define GADUGADU_ICON	    "im-gadugadu"
+#define SKYPE_ICON	    "stock_people"
 #define VIDEOCONF_ICON    "stock_video-conferencing"
 
 #define MAX_COMPACT_IMAGE_DIMENSION 48
@@ -617,6 +618,7 @@
 	accum_multival_attribute (accum, contact, _("MSN"), E_CONTACT_IM_MSN, MSN_ICON, 0);
 	accum_multival_attribute (accum, contact, _("Yahoo"), E_CONTACT_IM_YAHOO, YAHOO_ICON, 0);
 	accum_multival_attribute (accum, contact, _("Gadu-Gadu"), E_CONTACT_IM_GADUGADU, GADUGADU_ICON, 0);
+	accum_multival_attribute (accum, contact, _("Skype"), E_CONTACT_IM_SKYPE, SKYPE_ICON, 0);
 
 	if (accum->len > 0)
 		gtk_html_stream_printf (html_stream, "%s", accum->str);

Modified: branches/kill-bonobo/addressbook/gui/widgets/eab-gui-util.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/widgets/eab-gui-util.c	(original)
+++ branches/kill-bonobo/addressbook/gui/widgets/eab-gui-util.c	Wed Dec 10 18:30:29 2008
@@ -101,46 +101,45 @@
 
 	if (status == E_BOOK_ERROR_OFFLINE_UNAVAILABLE) {
 		can_detail_error = FALSE;
-		label_string = _("We were unable to open this address book. This either means "
-                                 "this book is not marked for offline usage or not yet downloaded "
+		label_string = _("This address book cannot be opened. This either means this "
+                                 "book is not marked for offline usage or not yet downloaded "
                                  "for offline usage. Please load the address book once in online mode "
-                                 "to download its contents");
+                                 "to download its contents.");
 	}
 
 	else if (!strncmp (uri, "file:", 5)) {
 		char *path = g_filename_from_uri (uri, NULL, NULL);
 		label = g_strdup_printf (
-			_("We were unable to open this address book.  Please check that the "
-			  "path %s exists and that you have permission to access it."), path);
+			_("This address book cannot be opened.  Please check that the "
+			  "path %s exists and that permissions are set to access it."), path);
 		g_free (path);
 		label_string = label;
 	}
+
+#ifndef HAVE_LDAP
 	else if (!strncmp (uri, "ldap:", 5)) {
 		/* special case for ldap: contact folders so we can tell the user about openldap */
-#ifdef HAVE_LDAP
-		label_string =
-			_("We were unable to open this address book.  This either "
-			  "means you have entered an incorrect URI, or the LDAP server "
-			  "is unreachable.");
-#else
+
 		can_detail_error = FALSE;
 		label_string =
 			_("This version of Evolution does not have LDAP support "
-			  "compiled in to it.  If you want to use LDAP in Evolution, "
-			  "you must install an LDAP-enabled Evolution package.");
+			  "compiled in to it.  To use LDAP in Evolution "
+			  "an LDAP-enabled Evolution package must be installed.");
+
+	}
 #endif
-	} else {
-		/* other network folders */
+	 else {
+		/* other network folders (or if ldap is enabled and server is unreachable) */
 		label_string =
-			_("We were unable to open this address book.  This either "
-			  "means you have entered an incorrect URI, or the server "
+			_("This address book cannot be opened.  This either "
+			  "means that an incorrect URI was entered, or the server "
 			  "is unreachable.");
 	}
 
 	if (can_detail_error) {
 		/* do not show repository offline message, it's kind of generic error */
 		if (status != E_BOOK_ERROR_REPOSITORY_OFFLINE && status > 0 && status < G_N_ELEMENTS (status_to_string) && status_to_string [status]) {
-			label = g_strconcat (label_string, "\n\n", _("Detailed error:"), " ", _(status_to_string [status]), NULL);
+			label = g_strconcat (label_string, "\n\n", _("Detailed error message:"), " ", _(status_to_string [status]), NULL);
 			label_string = label;
 		}
 	}
@@ -170,7 +169,7 @@
 		break;
 	case E_BOOK_VIEW_STATUS_TIME_LIMIT_EXCEEDED:
 		str = _("The time to execute this query exceeded the server limit or the limit\n"
-			"you have configured for this address book.  Please make your search\n"
+			"configured for this address book.  Please make your search\n"
 			"more specific or raise the time limit in the directory server\n"
 			"preferences for this address book.");
 		break;

Modified: branches/kill-bonobo/addressbook/printing/e-contact-print.glade
==============================================================================
--- branches/kill-bonobo/addressbook/printing/e-contact-print.glade	(original)
+++ branches/kill-bonobo/addressbook/printing/e-contact-print.glade	Wed Dec 10 18:30:29 2008
@@ -406,7 +406,7 @@
                                             <property name="wrap">no</property>
                                             <property name="snap_to_ticks">no</property>
                                             <property name="visible">yes</property>
-                                            <property name="adjustment">2 0 100 1 10 10</property>
+                                            <property name="adjustment">2 0 100 1 10 0</property>
                                           </widget>
                                         </child>
                                       </widget>
@@ -441,7 +441,7 @@
                                             <property name="width-request">45</property>
                                             <property name="snap_to_ticks">no</property>
                                             <property name="visible">yes</property>
-                                            <property name="adjustment">1 0 100 1 10 10</property>
+                                            <property name="adjustment">1 0 100 1 10 0</property>
                                           </widget>
                                         </child>
                                       </widget>

Modified: branches/kill-bonobo/calendar/gui/alarm-notify/alarm-notify.glade
==============================================================================
--- branches/kill-bonobo/calendar/gui/alarm-notify/alarm-notify.glade	(original)
+++ branches/kill-bonobo/calendar/gui/alarm-notify/alarm-notify.glade	Wed Dec 10 18:30:29 2008
@@ -269,7 +269,7 @@
 				  <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 12 1 5 5</property>
+				  <property name="adjustment">0 0 12 1 5 0</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
@@ -313,7 +313,7 @@
 				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 				  <property name="snap_to_ticks">False</property>
 				  <property name="wrap">False</property>
-				  <property name="adjustment">5 0 59 1 10 10</property>
+				  <property name="adjustment">5 0 59 1 10 0</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>

Modified: branches/kill-bonobo/calendar/gui/caltypes.xml
==============================================================================
--- branches/kill-bonobo/calendar/gui/caltypes.xml	(original)
+++ branches/kill-bonobo/calendar/gui/caltypes.xml	Wed Dec 10 18:30:29 2008
@@ -129,75 +129,7 @@
 	     </option>
 	    </input>
 	   <input type="optionlist" name="category">
-	    <option value="Anniversary">
-	        <_title>Anniversary</_title>
-	    </option>
-	    <option value="Holiday">
-	        <_title>Holiday</_title>
-	    </option>
-	    <option value="Ideas">
-	        <_title>Ideas</_title>
-	    </option>
-	    <option value="Status">
-	        <_title>Status</_title>
-	    </option>
-	    <option value="Holiday Cards">
-	        <_title>Holiday Cards</_title>
-	    </option>
-	    <option value="Hot Contacts">
-	        <_title>Hot Contacts</_title>
-	    </option>
-	    <option value="International">
-	        <_title>International</_title>
-	    </option>
-	    <option value="Next 7 Days">
-	        <_title>Next 7 Days</_title>
-	    </option>
-	    <option value="Birthday">
-	        <_title>Birthday</_title>
-	    </option>
-	    <option value="VIP">
-	        <_title>VIP</_title>
-	    </option>
-	    <option value="Gifts">
-	        <_title>Gifts</_title>
-	    </option>
-	    <option value="Waiting">
-	        <_title>Waiting</_title>
-	    </option>
-	    <option value="Key Customer">
-	        <_title>Key Customer</_title>
-	    </option>
-	    <option value="Time &amp; Expenses">
-	        <_title>Time &amp; Expenses </_title>
-	    </option>
-	    <option value="Miscellaneous">
-	        <_title>Miscellaneous</_title>
-	    </option>
-	    <option value="Business">
-	        <_title>Business</_title>
-	    </option>
-	    <option value="Personal">
-	        <_title>Personal</_title>
-	    </option>
-	    <option value="Suppliers">
-        	<_title>Suppliers</_title>
-	    </option>
-	    <option value="Goals/Objectives">
-	        <_title>Goals/Objectives</_title>
-	    </option>
-	    <option value="Strategies">
-	        <_title>Strategies</_title>
-	    </option>
-	    <option value="Competition">
-	        <_title>Competition</_title>
-	    </option>
-	    <option value="Favourites">
-	        <_title>Favourites</_title>
-	    </option>
-	    <option value="Phone Calls">
-	        <_title>Phone Calls</_title>
-	    </option>
+		<dynamic func="e_util_get_category_filter_options"/>
 	   </input>
     </part>
 

Modified: branches/kill-bonobo/calendar/gui/dialogs/alarm-dialog.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/alarm-dialog.c	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/alarm-dialog.c	Wed Dec 10 18:30:29 2008
@@ -623,19 +623,18 @@
 		break;
 	}
 
-	if ( trigger->u.rel_duration.hours ) {
+	if ( trigger->u.rel_duration.days ) {
+		e_dialog_option_menu_set (dialog->value_units, DAYS, value_map);
+		e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.days);
+	} else if ( trigger->u.rel_duration.hours ) {
 		e_dialog_option_menu_set (dialog->value_units, HOURS, value_map);
 		e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.hours);
-	}
-
-	if ( trigger->u.rel_duration.minutes ){
+	} else if ( trigger->u.rel_duration.minutes ) {
 		e_dialog_option_menu_set (dialog->value_units, MINUTES, value_map);
 		e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.minutes);
-	}
-
-	if ( trigger->u.rel_duration.days ){
-		e_dialog_option_menu_set (dialog->value_units, DAYS, value_map);
-		e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.days);
+	} else {
+		e_dialog_option_menu_set (dialog->value_units, MINUTES, value_map);
+		e_dialog_spin_set (dialog->interval_value, 0);
 	}
 
 	/* Repeat options */

Modified: branches/kill-bonobo/calendar/gui/dialogs/alarm-dialog.glade
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/alarm-dialog.glade	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/alarm-dialog.glade	Wed Dec 10 18:30:29 2008
@@ -197,7 +197,7 @@
 		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 		      <property name="snap_to_ticks">False</property>
 		      <property name="wrap">False</property>
-		      <property name="adjustment">1 0 999 1 10 10</property>
+		      <property name="adjustment">1 0 999 1 10 0</property>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
@@ -431,7 +431,7 @@
 			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 			  <property name="snap_to_ticks">False</property>
 			  <property name="wrap">False</property>
-			  <property name="adjustment">1 1 999 1 10 10</property>
+			  <property name="adjustment">1 1 999 1 10 0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
@@ -475,7 +475,7 @@
 			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 			  <property name="snap_to_ticks">False</property>
 			  <property name="wrap">False</property>
-			  <property name="adjustment">5 0 999 1 10 10</property>
+			  <property name="adjustment">5 0 999 1 10 0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>

Modified: branches/kill-bonobo/calendar/gui/dialogs/cal-prefs-dialog.glade
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/cal-prefs-dialog.glade	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/cal-prefs-dialog.glade	Wed Dec 10 18:30:29 2008
@@ -808,7 +808,7 @@
 			  <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 9999 1 10 10</property>
+			  <property name="adjustment">0 0 9999 1 10 0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
@@ -1312,7 +1312,7 @@
 			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 			  <property name="snap_to_ticks">False</property>
 			  <property name="wrap">False</property>
-			  <property name="adjustment">1 0 9999 1 10 10</property>
+			  <property name="adjustment">1 0 9999 1 10 0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>

Modified: branches/kill-bonobo/calendar/gui/dialogs/comp-editor.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/comp-editor.c	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/comp-editor.c	Wed Dec 10 18:30:29 2008
@@ -137,6 +137,7 @@
 "  <menubar action='main-menu'>"
 "    <menu action='file-menu'>"
 "      <menuitem action='save'/>"
+"      <menuitem action='print'/>"
 "      <menuitem action='close'/>"
 "    </menu>"
 "    <menu action='edit-menu'>"
@@ -158,6 +159,7 @@
 "  </menubar>"
 "  <toolbar name='main-toolbar'>"
 "    <toolitem action='save'/>"
+"    <toolitem action='print'/>"
 "    <toolitem action='close'/>"
 "    <separator/>"
 "    <toolitem action='attach'/>"
@@ -1306,7 +1308,7 @@
 	{ "print",
 	  GTK_STOCK_PRINT,
 	  NULL,
-	  NULL,
+	  "<Control>p",
 	  NULL,
 	  G_CALLBACK (action_print_cb) },
 
@@ -3080,7 +3082,8 @@
 			set_attendees_for_delegation (send_comp, address, method);
 	}
 
-	if (!e_cal_component_has_attachments (priv->comp)) {
+		if (!e_cal_component_has_attachments (priv->comp) 
+		 || e_cal_get_static_capability (priv->client, CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) {
 		if (itip_send_comp (method, send_comp, priv->client,
 					NULL, NULL, users)) {
 			g_object_unref (send_comp);

Modified: branches/kill-bonobo/calendar/gui/dialogs/event-editor.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/event-editor.c	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/event-editor.c	Wed Dec 10 18:30:29 2008
@@ -123,7 +123,6 @@
 
 	priv->sched_page = schedule_page_new (priv->model, editor);
 	page = COMP_EDITOR_PAGE (priv->sched_page);
-	g_object_ref_sink (priv->sched_page);
 	gtk_container_add (
 		GTK_CONTAINER (GTK_DIALOG (priv->sched_window)->vbox),
 		comp_editor_page_get_widget (page));
@@ -289,7 +288,6 @@
 	gtk_action_group_set_visible (action_group, is_meeting);
 
 	priv->event_page = event_page_new (priv->model, editor);
-	g_object_ref_sink (priv->event_page);
 	comp_editor_append_page (
 		editor, COMP_EDITOR_PAGE (priv->event_page),
 		_("Appoint_ment"), TRUE);
@@ -306,7 +304,6 @@
 
 	priv->recur_page = recurrence_page_new (editor);
 	page = COMP_EDITOR_PAGE (priv->recur_page);
-	g_object_ref_sink (priv->recur_page);
 	gtk_container_add (
 		GTK_CONTAINER ((GTK_DIALOG (priv->recur_window)->vbox)),
 		comp_editor_page_get_widget (page));

Modified: branches/kill-bonobo/calendar/gui/dialogs/event-page.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/event-page.c	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/event-page.c	Wed Dec 10 18:30:29 2008
@@ -34,6 +34,7 @@
 #include <glib/gi18n.h>
 #include <glade/glade.h>
 #include <gdk/gdkkeysyms.h>
+#include <libedataserverui/e-category-completion.h>
 #include <libedataserverui/e-source-combo-box.h>
 #include "common/authentication.h"
 #include "e-util/e-categories-config.h"
@@ -2152,6 +2153,7 @@
 get_widgets (EventPage *epage)
 {
 	CompEditorPage *page = COMP_EDITOR_PAGE (epage);
+	GtkEntryCompletion *completion;
 	EventPagePrivate *priv;
 	GSList *accel_groups;
 	GtkWidget *toplevel;
@@ -2245,6 +2247,10 @@
 
 #undef GW
 
+	completion = e_category_completion_new ();
+	gtk_entry_set_completion (GTK_ENTRY (priv->categories), completion);
+	g_object_unref (completion);
+
 	return (priv->summary
 		&& priv->location
 		&& priv->start_time

Modified: branches/kill-bonobo/calendar/gui/dialogs/event-page.glade
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/event-page.glade	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/event-page.glade	Wed Dec 10 18:30:29 2008
@@ -451,7 +451,7 @@
 				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 				  <property name="snap_to_ticks">False</property>
 				  <property name="wrap">False</property>
-				  <property name="adjustment">1 0 0 1 1 1</property>
+				  <property name="adjustment">1 0 0 1 1 0</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
@@ -495,7 +495,7 @@
 				  <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 59 5 10 10</property>
+				  <property name="adjustment">0 0 59 5 10 0</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>

Modified: branches/kill-bonobo/calendar/gui/dialogs/memo-editor.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/memo-editor.c	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/memo-editor.c	Wed Dec 10 18:30:29 2008
@@ -133,7 +133,6 @@
 	}
 
 	me->priv->memo_page = memo_page_new (editor);
-	g_object_ref_sink (me->priv->memo_page);
 	comp_editor_append_page (
 		COMP_EDITOR (me),
 		COMP_EDITOR_PAGE (me->priv->memo_page),

Modified: branches/kill-bonobo/calendar/gui/dialogs/memo-page.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/memo-page.c	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/memo-page.c	Wed Dec 10 18:30:29 2008
@@ -34,6 +34,7 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 #include <glade/glade.h>
+#include <libedataserverui/e-category-completion.h>
 #include <libedataserverui/e-source-combo-box.h>
 #include <libedataserverui/e-name-selector.h>
 #include <libedataserverui/e-name-selector-entry.h>
@@ -746,6 +747,7 @@
 get_widgets (MemoPage *mpage)
 {
 	CompEditorPage *page = COMP_EDITOR_PAGE (mpage);
+	GtkEntryCompletion *completion;
 	MemoPagePrivate *priv;
 	GSList *accel_groups;
 	GtkWidget *toplevel;
@@ -795,6 +797,10 @@
 
 #undef GW
 
+	completion = e_category_completion_new ();
+	gtk_entry_set_completion (GTK_ENTRY (priv->categories), completion);
+	g_object_unref (completion);
+
 	return (priv->memo_content
 		&& priv->categories_btn
 		&& priv->categories

Modified: branches/kill-bonobo/calendar/gui/dialogs/recurrence-page.glade
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/recurrence-page.glade	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/recurrence-page.glade	Wed Dec 10 18:30:29 2008
@@ -141,7 +141,7 @@
 			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 			  <property name="snap_to_ticks">False</property>
 			  <property name="wrap">False</property>
-			  <property name="adjustment">1 1 10000 1 10 10</property>
+			  <property name="adjustment">1 1 10000 1 10 0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>

Modified: branches/kill-bonobo/calendar/gui/dialogs/task-details-page.glade
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/task-details-page.glade	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/task-details-page.glade	Wed Dec 10 18:30:29 2008
@@ -297,7 +297,7 @@
 		  <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 100 1 10 10</property>
+		  <property name="adjustment">0 0 100 1 10 0</property>
 		</widget>
 		<packing>
 		  <property name="left_attach">1</property>

Modified: branches/kill-bonobo/calendar/gui/dialogs/task-editor.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/task-editor.c	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/task-editor.c	Wed Dec 10 18:30:29 2008
@@ -311,7 +311,6 @@
 	te->priv->updating = FALSE;
 
 	te->priv->task_page = task_page_new (te->priv->model, editor);
-	g_object_ref_sink (te->priv->task_page);
 	comp_editor_append_page (
 		editor, COMP_EDITOR_PAGE (te->priv->task_page),
 		_("_Task"), TRUE);
@@ -327,7 +326,6 @@
 		G_CALLBACK(gtk_widget_hide), NULL);
 
 	te->priv->task_details_page = task_details_page_new (editor);
-	g_object_ref_sink (te->priv->task_details_page);
 	gtk_container_add (
 		GTK_CONTAINER (GTK_DIALOG (te->priv->task_details_window)->vbox),
 		comp_editor_page_get_widget ((CompEditorPage *) te->priv->task_details_page));

Modified: branches/kill-bonobo/calendar/gui/dialogs/task-page.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/task-page.c	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/task-page.c	Wed Dec 10 18:30:29 2008
@@ -34,6 +34,7 @@
 #include <glib/gi18n.h>
 #include <glade/glade.h>
 #include <gdk/gdkkeysyms.h>
+#include <libedataserverui/e-category-completion.h>
 #include <libedataserverui/e-source-combo-box.h>
 #include <misc/e-dateedit.h>
 #include <e-util/e-dialog-utils.h>
@@ -1372,6 +1373,7 @@
 get_widgets (TaskPage *tpage)
 {
 	CompEditorPage *page = COMP_EDITOR_PAGE (tpage);
+	GtkEntryCompletion *completion;
 	TaskPagePrivate *priv;
 	GSList *accel_groups;
 	GtkWidget *toplevel;
@@ -1444,6 +1446,10 @@
 
 #undef GW
 
+	completion = e_category_completion_new ();
+	gtk_entry_set_completion (GTK_ENTRY (priv->categories), completion);
+	g_object_unref (completion);
+
 	return (priv->summary
 		&& priv->summary_label
 		&& priv->due_date

Modified: branches/kill-bonobo/calendar/gui/e-cal-model.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-cal-model.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-cal-model.c	Wed Dec 10 18:30:29 2008
@@ -2226,6 +2226,7 @@
 
 
 struct _ECalModelComponentPrivate {
+	char nouse;
 };
 
 static void e_cal_model_component_finalize (GObject *object);

Modified: branches/kill-bonobo/calendar/gui/e-calendar-table.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-calendar-table.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-calendar-table.c	Wed Dec 10 18:30:29 2008
@@ -469,6 +469,7 @@
 
 	if (tmp2->len) {
 		l = gtk_label_new (tmp2->str);
+		gtk_label_set_line_wrap (GTK_LABEL (l), TRUE);
 		gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5);
 		gtk_box_pack_start (GTK_BOX (box), l, FALSE, FALSE, 0);
 	}

Modified: branches/kill-bonobo/calendar/gui/e-calendar-view.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-calendar-view.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-calendar-view.c	Wed Dec 10 18:30:29 2008
@@ -74,7 +74,6 @@
 static void e_calendar_view_destroy (GtkObject *object);
 static void open_event_with_flags (ECalendarView *cal_view, ECal *client, icalcomponent *icalcomp, guint32 flags);
 
-static GdkAtom clipboard_atom = GDK_NONE;
 
 /* Property IDs */
 enum props {
@@ -99,6 +98,17 @@
 
 G_DEFINE_TYPE (ECalendarView, e_calendar_view, GTK_TYPE_TABLE)
 
+enum TargetType{
+	TARGET_TYPE_VCALENDAR
+};
+
+static GtkTargetEntry target_types[] = {
+	{ "text/x-calendar", 0, TARGET_TYPE_VCALENDAR },
+	{ "text/calendar",   0, TARGET_TYPE_VCALENDAR }
+};
+
+static guint n_target_types = G_N_ELEMENTS (target_types);
+
 static void
 e_calendar_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
 {
@@ -158,6 +168,7 @@
 	klass->get_visible_time_range = NULL;
 	klass->update_query = NULL;
 	klass->open_event = e_calendar_view_open_event;
+	klass->paste_text = NULL;
 
 	g_object_class_install_property (gobject_class, PROP_MODEL,
 					 g_param_spec_object ("model", NULL, NULL, E_TYPE_CAL_MODEL,
@@ -227,11 +238,6 @@
 			      g_cclosure_marshal_VOID__VOID,
 			      G_TYPE_NONE, 0);
 
-	/* clipboard atom */
-	if (!clipboard_atom)
-		clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
-
-
         /*
          * Key bindings
          */
@@ -663,6 +669,34 @@
 	g_list_free (selected);
 }
 
+static void
+clipboard_clear_calendar_cb (GtkClipboard *clipboard,
+			     gpointer data)
+{
+	g_free (data);
+}
+
+static void
+clipboard_get_calendar_cb (GtkClipboard *clipboard,
+			   GtkSelectionData *selection_data,
+			   guint info,
+			   gpointer data)
+{
+	gchar *comp_str = (gchar *) data;
+
+	switch (info) {
+	case TARGET_TYPE_VCALENDAR:
+		gtk_selection_data_set (selection_data,
+					selection_data->target,
+					8,
+					(const guchar *) comp_str,
+					(gint) strlen (comp_str));
+		break;
+	default:
+		break;
+	}
+}
+
 void
 e_calendar_view_copy_clipboard (ECalendarView *cal_view)
 {
@@ -671,6 +705,7 @@
 	icalcomponent *vcal_comp;
 	icalcomponent *new_icalcomp;
 	ECalendarViewEvent *event;
+	GtkClipboard *clipboard;
 
 	g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
 
@@ -704,19 +739,25 @@
 	}
 
 	/* copy the VCALENDAR to the clipboard */
+	clipboard = gtk_widget_get_clipboard (GTK_WIDGET (cal_view), GDK_SELECTION_CLIPBOARD);
 	comp_str = icalcomponent_as_ical_string (vcal_comp);
-	gtk_clipboard_set_text (gtk_widget_get_clipboard (GTK_WIDGET (cal_view), clipboard_atom),
-				(const gchar *) comp_str,
-				strlen (comp_str));
+
+	if (!gtk_clipboard_set_with_data (clipboard, target_types, n_target_types,
+					  clipboard_get_calendar_cb,
+					  clipboard_clear_calendar_cb,
+					  comp_str)) {
+		g_free (comp_str);
+	} else {
+		gtk_clipboard_set_can_store (clipboard, target_types + 1, n_target_types - 1);
+	}
 
 	/* free memory */
 	icalcomponent_free (vcal_comp);
-	g_free (comp_str);
 	g_list_free (selected);
 }
 
 static void
-clipboard_get_text_cb (GtkClipboard *clipboard, const gchar *text, ECalendarView *cal_view)
+clipboard_get_calendar_data (ECalendarView *cal_view, const gchar *text)
 {
 	icalcomponent *icalcomp;
 	icalcomponent_kind kind;
@@ -796,13 +837,48 @@
 #endif
 }
 
+static void
+e_calendar_view_paste_text (ECalendarView *cal_view)
+{
+	g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
+
+	if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->paste_text)
+		E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->paste_text (cal_view);
+}
+
+static void
+clipboard_paste_received_cb (GtkClipboard *clipboard,
+			     GtkSelectionData *selection_data,
+			     gpointer data)
+{
+	if (gtk_clipboard_wait_is_text_available (clipboard)) {
+		e_calendar_view_paste_text (E_CALENDAR_VIEW (data));
+	} else {
+		GdkAtom type = selection_data->type;
+		if (type == gdk_atom_intern (target_types[TARGET_TYPE_VCALENDAR].target, TRUE)) {
+			gchar *result = NULL;
+			result = g_strndup ((const gchar *) selection_data->data,
+					    selection_data->length);
+			clipboard_get_calendar_data (E_CALENDAR_VIEW (data), result);
+			g_free (result);
+		}
+	}
+	g_object_unref (data);
+}
+
 void
 e_calendar_view_paste_clipboard (ECalendarView *cal_view)
 {
+	GtkClipboard *clipboard;
+
 	g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
 
-	gtk_clipboard_request_text (gtk_widget_get_clipboard (GTK_WIDGET (cal_view), clipboard_atom),
-				    (GtkClipboardTextReceivedFunc) clipboard_get_text_cb, cal_view);
+	clipboard = gtk_widget_get_clipboard (GTK_WIDGET (cal_view), GDK_SELECTION_CLIPBOARD);
+	g_object_ref (cal_view);
+
+	gtk_clipboard_request_contents (clipboard,
+					gdk_atom_intern (target_types[TARGET_TYPE_VCALENDAR].target, FALSE),
+					clipboard_paste_received_cb, cal_view);
 }
 
 static void

Modified: branches/kill-bonobo/calendar/gui/e-calendar-view.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-calendar-view.h	(original)
+++ branches/kill-bonobo/calendar/gui/e-calendar-view.h	Wed Dec 10 18:30:29 2008
@@ -111,6 +111,7 @@
 	gboolean (* get_visible_time_range) (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
 	void (* update_query) (ECalendarView *cal_view);
 	void (* open_event) (ECalendarView *cal_view);
+	void (* paste_text) (ECalendarView *cal_view);
 };
 
 GType          e_calendar_view_get_type (void);

Modified: branches/kill-bonobo/calendar/gui/e-day-view-top-item.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-day-view-top-item.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-day-view-top-item.c	Wed Dec 10 18:30:29 2008
@@ -33,6 +33,7 @@
 #include "e-util/e-categories-config.h"
 #include <libecal/e-cal-time-util.h>
 #include <libedataserver/e-data-server-util.h>
+#include <libedataserver/e-categories.h>
 #include "e-calendar-view.h"
 #include "e-day-view-top-item.h"
 
@@ -687,29 +688,28 @@
 	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;
+		const char *file;
+		GdkPixbuf *pixbuf;
 
 		category = (char *) elem->data;
-		e_categories_config_get_icon_for (category, &pixmap, &mask);
-		if (pixmap == NULL)
+		file = e_categories_get_icon_file_for (category);
+		if (!file)
+			continue;
+
+		pixbuf = gdk_pixbuf_new_from_file (file, NULL);
+		if (pixbuf == 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,
+			gdk_draw_pixbuf (drawable, gc,
+					 pixbuf,
 					 0, 0, icon_x, icon_y,
 					 E_DAY_VIEW_ICON_WIDTH,
-					 E_DAY_VIEW_ICON_HEIGHT);
+					 E_DAY_VIEW_ICON_HEIGHT,
+					 GDK_RGB_DITHER_NORMAL, 0, 0);
 			icon_x -= icon_x_inc;
 		}
-
-		g_object_unref (pixmap);
-		if (mask != NULL)
-			g_object_unref (mask);
 	}
 
 	e_cal_component_free_categories_list (categories_list);

Modified: branches/kill-bonobo/calendar/gui/e-day-view.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-day-view.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-day-view.c	Wed Dec 10 18:30:29 2008
@@ -152,6 +152,7 @@
 static gboolean e_day_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
 static void e_day_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time);
 static gboolean e_day_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+static void e_day_view_paste_text (ECalendarView *day_view);
 static void e_day_view_update_query (EDayView *day_view);
 static void e_day_view_goto_start_of_work_day (EDayView *day_view);
 static void e_day_view_goto_end_of_work_day (EDayView *day_view);
@@ -466,6 +467,7 @@
 	view_class->get_selected_time_range = e_day_view_get_selected_time_range;
 	view_class->set_selected_time_range = e_day_view_set_selected_time_range;
 	view_class->get_visible_time_range = e_day_view_get_visible_time_range;
+	view_class->paste_text = e_day_view_paste_text;
 
 #if 0  /* KILL-BONOBO */
 	/* init the accessibility support for e_day_view */
@@ -4725,16 +4727,13 @@
 }
 
 static gboolean
-e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
+e_day_view_add_new_event_in_selected_range (EDayView *day_view, GdkEventKey *key_event)
 {
-	EDayView *day_view;
 	icalcomponent *icalcomp;
 	ECal *ecal;
 	ECalModel *model;
 	ECalComponent *comp;
 	gint day, event_num;
-	guint keyval;
-	gboolean stop_emission;
 	time_t dtstart, dtend;
 	ECalComponentDateTime start_dt, end_dt;
 	struct icaltimetype start_tt, end_tt;
@@ -4742,6 +4741,80 @@
 	AddEventData add_event_data;
 	gboolean read_only = TRUE;
 
+	/* Check if the client is read only */
+	model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view));
+	ecal = e_cal_model_get_default_client (model);
+	if (!e_cal_is_read_only (ecal, &read_only, NULL) || read_only)
+		return FALSE;
+
+	icalcomp = e_cal_model_create_component_with_defaults (model);
+	if (!icalcomp)
+		return FALSE;
+
+	uid = icalcomponent_get_uid (icalcomp);
+
+	comp = e_cal_component_new ();
+	e_cal_component_set_icalcomponent (comp, icalcomp);
+
+	e_day_view_get_selected_time_range ((ECalendarView *) day_view, &dtstart, &dtend);
+
+	start_tt = icaltime_from_timet_with_zone (dtstart, FALSE,
+						  e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
+
+	end_tt = icaltime_from_timet_with_zone (dtend, FALSE,
+						e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
+
+	if (day_view->selection_in_top_canvas) {
+		start_dt.tzid = NULL;
+		start_tt.is_date = 1;
+		end_tt.is_date = 1;
+
+		/* Editor default in day/work-week view - top canvas */
+		e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_TRANSPARENT);
+	} else {
+		start_dt.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
+
+		/* Editor default in day/work-week view - main canvas */
+		e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_OPAQUE);
+	}
+
+	start_dt.value = &start_tt;
+	end_dt.value = &end_tt;
+	end_dt.tzid = start_dt.tzid;
+	e_cal_component_set_dtstart (comp, &start_dt);
+	e_cal_component_set_dtend (comp, &end_dt);
+
+	e_cal_component_set_categories (
+		comp, e_calendar_view_get_default_category (E_CALENDAR_VIEW (day_view)));
+
+	/* We add the event locally and start editing it. We don't send it
+	   to the server until the user finishes editing it. */
+	add_event_data.day_view = day_view;
+	add_event_data.comp_data = NULL;
+	e_day_view_add_event (comp, dtstart, dtend, &add_event_data);
+	e_day_view_check_layout (day_view);
+	gtk_widget_queue_draw (day_view->top_canvas);
+	gtk_widget_queue_draw (day_view->main_canvas);
+
+	if (!e_day_view_find_event_from_uid (day_view, ecal, uid, NULL, &day, &event_num)) {
+		g_warning ("Couldn't find event to start editing.\n");
+		g_object_unref (comp);
+		return FALSE;
+	}
+
+	e_day_view_start_editing_event (day_view, day, event_num, key_event);
+
+	g_object_unref (comp);
+	return TRUE;
+}
+
+static gboolean
+e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
+{
+	EDayView *day_view;
+	guint keyval;
+	gboolean stop_emission;
+
 	g_return_val_if_fail (widget != NULL, FALSE);
 	g_return_val_if_fail (E_IS_DAY_VIEW (widget), FALSE);
 	g_return_val_if_fail (event != NULL, FALSE);
@@ -4865,12 +4938,6 @@
 		return FALSE;
 	}
 
-	/* Check if the client is read only */
-	model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view));
-	ecal = e_cal_model_get_default_client (model);
-	if (!e_cal_is_read_only (ecal, &read_only, NULL) || read_only)
-		return FALSE;
-
 	/* We only want to start an edit with a return key or a simple
 	   character. */
 	if ((keyval != GDK_Return) &&
@@ -4881,64 +4948,7 @@
 		return FALSE;
 	}
 
-	/* Add a new event covering the selected range */
-	icalcomp = e_cal_model_create_component_with_defaults (model);
-	if (!icalcomp)
-		return FALSE;
-	uid = icalcomponent_get_uid (icalcomp);
-
-	comp = e_cal_component_new ();
-	e_cal_component_set_icalcomponent (comp, icalcomp);
-
-	e_day_view_get_selected_time_range ((ECalendarView *) day_view, &dtstart, &dtend);
-
-	start_tt = icaltime_from_timet_with_zone (dtstart, FALSE,
-						  e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
-	end_tt = icaltime_from_timet_with_zone (dtend, FALSE,
-						e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
-	if (day_view->selection_in_top_canvas) {
-		start_dt.tzid = NULL;
-		start_tt.is_date = 1;
-		end_tt.is_date = 1;
-
-		/* Editor default in day/work-week view - top canvas */
-		e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_TRANSPARENT);
-	} else {
-		start_dt.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
-		/* Editor default in day/work-week view - main canvas */
-		e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_OPAQUE);
-	}
-
-	start_dt.value = &start_tt;
-	end_dt.value = &end_tt;
-	end_dt.tzid = start_dt.tzid;
-	e_cal_component_set_dtstart (comp, &start_dt);
-	e_cal_component_set_dtend (comp, &end_dt);
-
-	e_cal_component_set_categories (
-		comp, e_calendar_view_get_default_category (E_CALENDAR_VIEW (day_view)));
-
-	/* We add the event locally and start editing it. We don't send it
-	   to the server until the user finishes editing it. */
-	add_event_data.day_view = day_view;
-	add_event_data.comp_data = NULL;
-	e_day_view_add_event (comp, dtstart, dtend, &add_event_data);
-	e_day_view_check_layout (day_view);
-	gtk_widget_queue_draw (day_view->top_canvas);
-	gtk_widget_queue_draw (day_view->main_canvas);
-
-	if (e_day_view_find_event_from_uid (day_view, ecal, uid, NULL, &day, &event_num)) {
-		e_day_view_start_editing_event (day_view, day, event_num, event);
-	} else {
-		g_warning ("Couldn't find event to start editing.\n");
-	}
-
-	g_object_unref (comp);
-
-	return TRUE;
+	return e_day_view_add_new_event_in_selected_range (day_view, event);
 }
 
 static gboolean
@@ -5861,6 +5871,15 @@
 			ECalendarViewPosition pos;
 			gboolean main_canvas = TRUE;
 
+			if (day_view->editing_event_num != -1)
+				break;
+
+			if (day_view->resize_event_num != -1)
+				break;
+
+			if (day_view->drag_event_num != -1)
+				break;
+
 			/* 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*) event,
@@ -5889,15 +5908,11 @@
 			}
 
 			if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
-				return FALSE;
-
-			if (day_view->editing_event_num != -1)
-				break;
-
-			if (day_view->resize_event_num != -1)
 				break;
 
-			if (day_view->drag_event_num != -1)
+			/* even when returns position inside, or other, then the day and/or event_num
+			   can be unknown, thus check for this here, otherwise it will crash later */
+			if (day == -1 || event_num == -1)
 				break;
 
 			pevent = tooltip_get_view_event (day_view, day, event_num);
@@ -7848,3 +7863,34 @@
 
 	return (day_view->editing_event_day != -1) ? 1 : 0;
 }
+
+static void
+e_day_view_paste_text (ECalendarView *cal_view)
+{
+	EDayView *day_view;
+	EDayViewEvent *event;
+
+	g_return_if_fail (E_IS_DAY_VIEW (cal_view));
+
+	day_view = E_DAY_VIEW (cal_view);
+
+	if (day_view->editing_event_num == -1 &&
+	    !e_day_view_add_new_event_in_selected_range (day_view, NULL))
+		return;
+
+	if (day_view->editing_event_day == E_DAY_VIEW_LONG_EVENT) {
+		event = &g_array_index (day_view->long_events,
+				        EDayViewEvent,
+					day_view->editing_event_num);
+	} else {
+		event = &g_array_index (day_view->events[day_view->editing_event_day],
+					EDayViewEvent,
+					day_view->editing_event_num);
+	}
+
+	if (event->canvas_item &&
+	    E_IS_TEXT (event->canvas_item) &&
+	    E_TEXT (event->canvas_item)->editing) {
+		e_text_paste_clipboard (E_TEXT (event->canvas_item));
+	}
+}

Modified: branches/kill-bonobo/calendar/gui/e-week-view.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-week-view.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-week-view.c	Wed Dec 10 18:30:29 2008
@@ -113,6 +113,7 @@
 static gboolean e_week_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
 static void e_week_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time);
 static gboolean e_week_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+static void e_week_view_paste_text (ECalendarView *week_view);
 static void e_week_view_update_query (EWeekView *week_view);
 static void e_week_view_draw_shadow (EWeekView *week_view);
 
@@ -224,6 +225,7 @@
 	view_class->get_selected_time_range = e_week_view_get_selected_time_range;
 	view_class->set_selected_time_range = e_week_view_set_selected_time_range;
 	view_class->get_visible_time_range = e_week_view_get_visible_time_range;
+	view_class->paste_text = e_week_view_paste_text;
 
 #if 0  /* KILL-BONOBO */
 	/* init the accessibility support for e_week_view */
@@ -3929,7 +3931,7 @@
 }
 
 static gboolean
-e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
+e_week_view_add_new_event_in_selected_range (EWeekView *week_view, const gchar *initial_text)
 {
 #if 0  /* KILL-BONOBO */
 	EWeekView *week_view;
@@ -3938,15 +3940,96 @@
 	ECalComponent *comp;
 	icalcomponent *icalcomp;
 	gint event_num;
-	gchar *initial_text;
 	ECalComponentDateTime date;
 	struct icaltimetype itt;
 	time_t dtstart, dtend;
 	const char *uid;
 	AddEventData add_event_data;
-	guint keyval;
 	gboolean read_only = TRUE;
+	EWeekViewEvent *wvevent;
+	EWeekViewEventSpan *span;
+
+	/* Check if the client is read only */
+	model = e_calendar_view_get_model (E_CALENDAR_VIEW (week_view));
+	ecal = e_cal_model_get_default_client (model);
+	if (!e_cal_is_read_only (ecal, &read_only, NULL) || read_only)
+		return FALSE;
+
+	/* Add a new event covering the selected range. */
+	icalcomp = e_cal_model_create_component_with_defaults (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)));
+	if (!icalcomp)
+		return FALSE;
+	uid = icalcomponent_get_uid (icalcomp);
+
+	comp = e_cal_component_new ();
+	e_cal_component_set_icalcomponent (comp, icalcomp);
+
+	dtstart = week_view->day_starts[week_view->selection_start_day];
+	dtend = week_view->day_starts[week_view->selection_end_day + 1];
+
+	date.value = &itt;
+	date.tzid = NULL;
+
+	/* We use DATE values now, so we don't need the timezone. */
+	/*date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));*/
+
+	*date.value = icaltime_from_timet_with_zone (dtstart, TRUE,
+						     e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
+	e_cal_component_set_dtstart (comp, &date);
+
+	*date.value = icaltime_from_timet_with_zone (dtend, TRUE,
+						     e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
+	e_cal_component_set_dtend (comp, &date);
+
+	/* Editor default in week/month view */
+	e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_TRANSPARENT);
+
+	e_cal_component_set_categories (
+		comp, e_calendar_view_get_default_category (E_CALENDAR_VIEW (week_view)));
+
+	/* We add the event locally and start editing it. We don't send it
+	   to the server until the user finishes editing it. */
+	add_event_data.week_view = week_view;
+	add_event_data.comp_data = NULL;
+	e_week_view_add_event (comp, dtstart, dtend, TRUE, &add_event_data);
+	e_week_view_check_layout (week_view);
+	gtk_widget_queue_draw (week_view->main_canvas);
+
+	if (!e_week_view_find_event_from_uid (week_view, ecal, uid, NULL, &event_num)) {
+		g_warning ("Couldn't find event to start editing.\n");
+		g_object_unref (comp);
+		return FALSE;
+	}
+
+	wvevent = &g_array_index (week_view->events, EWeekViewEvent,
+				  event_num);
+	span = &g_array_index (week_view->spans, EWeekViewEventSpan,
+			       wvevent->spans_index + 0);
+
+	/* If the event can't be fit on the screen, don't try to edit it. */
+	if (!span->text_item) {
+		e_week_view_foreach_event_with_uid (week_view, uid,
+				e_week_view_remove_event_cb, NULL);
+		g_object_unref (comp);
+		return FALSE;
+	} else {
+		e_week_view_start_editing_event (week_view, event_num, 0,
+				(gchar *) initial_text);
+	}
+
+	g_object_unref (comp);
+
+	return TRUE;
+}
+
+static gboolean
+e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
+{
+	EWeekView *week_view;
+	gchar *initial_text;
+	guint keyval;
 	gboolean stop_emission;
+	gboolean ret_val;
 	GnomeCalendarViewType view_type;
 
 	g_return_val_if_fail (widget != NULL, FALSE);
@@ -4022,12 +4105,6 @@
 	if (week_view->selection_start_day == -1)
 		return FALSE;
 
-	/* Check if the client is read only */
-	model = e_calendar_view_get_model (E_CALENDAR_VIEW (week_view));
-	ecal = e_cal_model_get_default_client (model);
-	if (!e_cal_is_read_only (ecal, &read_only, NULL) || read_only)
-		return FALSE;
-
 	/* We only want to start an edit with a return key or a simple
 	   character. */
 	if (event->keyval == GDK_Return) {
@@ -4040,75 +4117,13 @@
 	} else
 		initial_text = e_utf8_from_gtk_event_key (widget, event->keyval, event->string);
 
-	/* Add a new event covering the selected range. */
-	icalcomp = e_cal_model_create_component_with_defaults (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)));
-	if (!icalcomp)
-		return FALSE;
-	uid = icalcomponent_get_uid (icalcomp);
-
-	comp = e_cal_component_new ();
-	e_cal_component_set_icalcomponent (comp, icalcomp);
-
-	dtstart = week_view->day_starts[week_view->selection_start_day];
-	dtend = week_view->day_starts[week_view->selection_end_day + 1];
-
-	date.value = &itt;
-	date.tzid = NULL;
-
-	/* We use DATE values now, so we don't need the timezone. */
-	/*date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));*/
-
-	*date.value = icaltime_from_timet_with_zone (dtstart, TRUE,
-						     e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
-	e_cal_component_set_dtstart (comp, &date);
-
-	*date.value = icaltime_from_timet_with_zone (dtend, TRUE,
-						     e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
-	e_cal_component_set_dtend (comp, &date);
-
-       /* Editor default in week/month view */
-       e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_TRANSPARENT);
-
-	e_cal_component_set_categories (
-		comp, e_calendar_view_get_default_category (E_CALENDAR_VIEW (week_view)));
-
-	/* We add the event locally and start editing it. We don't send it
-	   to the server until the user finishes editing it. */
-	add_event_data.week_view = week_view;
-	add_event_data.comp_data = NULL;
-	e_week_view_add_event (comp, dtstart, dtend, TRUE, &add_event_data);
-	e_week_view_check_layout (week_view);
-	gtk_widget_queue_draw (week_view->main_canvas);
-
-	if (e_week_view_find_event_from_uid (week_view, ecal, uid, NULL, &event_num)) {
-		EWeekViewEvent *wvevent;
-		EWeekViewEventSpan *span;
-
-		wvevent = &g_array_index (week_view->events, EWeekViewEvent,
-					  event_num);
-		span = &g_array_index (week_view->spans, EWeekViewEventSpan,
-				       wvevent->spans_index + 0);
-
-		/* If the event can't be fit on the screen, don't try to edit it. */
-		if (!span->text_item) {
-			e_week_view_foreach_event_with_uid (week_view, uid,
-							    e_week_view_remove_event_cb, NULL);
-		} else {
-			e_week_view_start_editing_event (week_view, event_num, 0,
-							 initial_text);
-		}
-
-	} else {
-		g_warning ("Couldn't find event to start editing.\n");
-	}
+	ret_val = e_week_view_add_new_event_in_selected_range (week_view, initial_text);
 
 	if (initial_text)
 		g_free (initial_text);
 
-	g_object_unref (comp);
+	return ret_val;
 #endif
-
-	return TRUE;
 }
 
 static gint
@@ -4368,3 +4383,30 @@
 		return week_view->jump_buttons[day]->object.flags & GNOME_CANVAS_ITEM_VISIBLE;
 	return FALSE;
 }
+
+static void
+e_week_view_paste_text (ECalendarView *cal_view)
+{
+	EWeekViewEvent *event;
+	EWeekViewEventSpan *span;
+	EWeekView *week_view;
+
+	g_return_if_fail (E_IS_WEEK_VIEW (cal_view));
+
+	week_view = E_WEEK_VIEW (cal_view);
+
+	if (week_view->editing_event_num == -1 &&
+	    !e_week_view_add_new_event_in_selected_range (week_view, NULL))
+		return;
+
+	event = &g_array_index (week_view->events, EWeekViewEvent,
+				week_view->editing_event_num);
+	span = &g_array_index (week_view->spans, EWeekViewEventSpan,
+			       event->spans_index + week_view->editing_span_num);
+
+	if (span->text_item &&
+	    E_IS_TEXT (span->text_item) &&
+	    E_TEXT (span->text_item)->editing) {
+		e_text_paste_clipboard (E_TEXT (span->text_item));
+	}
+}

Modified: branches/kill-bonobo/calendar/gui/goto-dialog.glade
==============================================================================
--- branches/kill-bonobo/calendar/gui/goto-dialog.glade	(original)
+++ branches/kill-bonobo/calendar/gui/goto-dialog.glade	Wed Dec 10 18:30:29 2008
@@ -192,7 +192,7 @@
 		  <property name="update_policy">GTK_UPDATE_IF_VALID</property>
 		  <property name="snap_to_ticks">False</property>
 		  <property name="wrap">False</property>
-		  <property name="adjustment">1969 1969 2038 1 5 10</property>
+		  <property name="adjustment">1969 1969 2038 1 5 0</property>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>

Modified: branches/kill-bonobo/calendar/gui/itip-utils.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/itip-utils.c	(original)
+++ branches/kill-bonobo/calendar/gui/itip-utils.c	Wed Dec 10 18:30:29 2008
@@ -1147,7 +1147,7 @@
 	gchar *subject = NULL;
 	gboolean retval = FALSE;
 
-	/* check whether backend could handle sending requests/updates */
+	/* check whether backend could handle auto-saving requests/updates */
 	if (method != E_CAL_COMPONENT_METHOD_PUBLISH && e_cal_get_save_schedules (client))
 		return TRUE;
 
@@ -1157,6 +1157,15 @@
 			goto cleanup;
 	}
 
+	/* check whether backend could handle sending requests/updates */
+	if (method != E_CAL_COMPONENT_METHOD_PUBLISH && e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) {
+		if (users) {
+			g_list_foreach (users, (GFunc) g_free, NULL);
+			g_list_free (users);
+		}
+		return TRUE;
+	}
+
 	/* Tidy up the comp */
 	comp = comp_compliant (method, send_comp, client, zones);
 

Modified: branches/kill-bonobo/calendar/gui/memotypes.xml
==============================================================================
--- branches/kill-bonobo/calendar/gui/memotypes.xml	(original)
+++ branches/kill-bonobo/calendar/gui/memotypes.xml	Wed Dec 10 18:30:29 2008
@@ -99,75 +99,7 @@
      </option>
     </input>
    <input type="optionlist" name="category">
-    <option value="Anniversary">
-        <_title>Anniversary</_title>
-    </option>
-    <option value="Holiday">
-        <_title>Holiday</_title>
-    </option>
-    <option value="Ideas">
-        <_title>Ideas</_title>
-    </option>
-    <option value="Status">
-        <_title>Status</_title>
-    </option>
-    <option value="Holiday Cards">
-        <_title>Holiday Cards</_title>
-    </option>
-    <option value="Hot Contacts">
-        <_title>Hot Contacts</_title>
-    </option>
-    <option value="International">
-        <_title>International</_title>
-    </option>
-    <option value="Next 7 days">
-        <_title>Next 7 Days</_title>
-    </option>
-    <option value="Birthday">
-        <_title>Birthday</_title>
-    </option>
-    <option value="VIP">
-        <_title>VIP</_title>
-    </option>
-    <option value="Gifts">
-        <_title>Gifts</_title>
-    </option>
-    <option value="Waiting">
-        <_title>Waiting</_title>
-    </option>
-    <option value="Key Customer">
-        <_title>Key Customer</_title>
-    </option>
-    <option value="Time &amp; Expenses">
-        <_title>Time &amp; Expenses</_title>
-    </option>
-    <option value="Miscellaneous">
-        <_title>Miscellaneous</_title>
-    </option>
-    <option value="Business">
-        <_title>Business</_title>
-    </option>
-    <option value="Personal">
-        <_title>Personal</_title>
-    </option>
-    <option value="Suppliers">
-        <_title>Suppliers</_title>
-    </option>
-    <option value="Goals/Objectives">
-        <_title>Goals/Objectives</_title>
-    </option>
-    <option value="Strategies">
-        <_title>Strategies</_title>
-    </option>
-    <option value="Competition">
-        <_title>Competition</_title>
-    </option>
-    <option value="Favourites">
-        <_title>Favourites</_title>
-    </option>
-    <option value="Phone Calls">
-        <_title>Phone Calls</_title>
-    </option>
+      <dynamic func="e_util_get_category_filter_options"/>
    </input>
  </part>
 

Modified: branches/kill-bonobo/calendar/gui/tasktypes.xml
==============================================================================
--- branches/kill-bonobo/calendar/gui/tasktypes.xml	(original)
+++ branches/kill-bonobo/calendar/gui/tasktypes.xml	Wed Dec 10 18:30:29 2008
@@ -165,76 +165,7 @@
                 </option>
             </input>
             <input type="optionlist" name="category">
-                <option value="Anniversary">
-                    <_title>Anniversary</_title>
-                </option>
-                <option value="Holiday">
-                    <_title>Holiday</_title>
-                </option>
-                <option value="Ideas">
-                    <_title>Ideas</_title>ke
-                </option>
-                <option value="Status">
-                    <_title>Status</_title>
-                </option>
-                <option value="Holiday Cards">
-                    <_title>Holiday Cards</_title>
-                </option>
-                <option value="Hot Contacts">
-                    <_title>Hot Contacts</_title>
-                </option>
-                <option value="International">
-                    <_title>International</_title>
-                </option>
-                <option value="Next 7 Days">
-                    <_title>Next 7 Days</_title>
-                </option>
-                <option value="Birthday">
-                    <_title>Birthday</_title>
-                </option>
-                <option value="VIP">
-                    <_title>VIP</_title>
-                </option>
-                <option value="Gifts">
-                    <_title>Gifts</_title>
-                </option>
-                <option value="Waiting">
-                    <_title>Waiting</_title>
-                </option>
-                <option value="Key Customer">
-                    <_title>Key Customer</_title>
-                </option>
-                <option value="Time &amp; Expenses">
-                    <_title>Time &amp; Expenses </_title>
-                </option>
-                <option value="Miscellaneous">
-                    <_title>Miscellaneous</_title>
-                </option>
-                <option value="Business">
-                    <_title>Business</_title>
-                </option>
-                <option value="Personal">
-                    ke
-                    <_title>Personal</_title>
-                </option>
-                <option value="Suppliers">
-                    <_title>Suppliers</_title>
-                </option>
-                <option value="Goals/Objectives">
-                    <_title>Goals/Objectives</_title>
-                </option>
-                <option value="Strategies">
-                    <_title>Strategies</_title>
-                </option>
-                <option value="Competition">
-                    <_title>Competition</_title>
-                </option>
-                <option value="Favourites">
-                    <_title>Favourites</_title>
-                </option>
-                <option value="Phone Calls">
-                    <_title>Phone Calls</_title>
-                </option>
+		<dynamic func="e_util_get_category_filter_options"/>
             </input>
         </part>
 

Modified: branches/kill-bonobo/composer/e-msg-composer.c
==============================================================================
--- branches/kill-bonobo/composer/e-msg-composer.c	(original)
+++ branches/kill-bonobo/composer/e-msg-composer.c	Wed Dec 10 18:30:29 2008
@@ -3888,16 +3888,19 @@
 			clen = strcspn (p, "&");
 
 			content = g_strndup (p, clen);
-			camel_url_decode (content);
 
 			if (!g_ascii_strcasecmp (header, "to")) {
+				camel_url_decode (content);
 				to = add_recipients (to, content);
 			} else if (!g_ascii_strcasecmp (header, "cc")) {
+				camel_url_decode (content);
 				cc = add_recipients (cc, content);
 			} else if (!g_ascii_strcasecmp (header, "bcc")) {
+				camel_url_decode (content);
 				bcc = add_recipients (bcc, content);
 			} else if (!g_ascii_strcasecmp (header, "subject")) {
 				g_free (subject);
+				camel_url_decode (content);
 				if (g_utf8_validate (content, -1, NULL)) {
 					subject = content;
 					content = NULL;
@@ -3911,6 +3914,7 @@
 				}
 			} else if (!g_ascii_strcasecmp (header, "body")) {
 				g_free (body);
+				camel_url_decode (content);
 				if (g_utf8_validate (content, -1, NULL)) {
 					body = content;
 					content = NULL;
@@ -3944,6 +3948,7 @@
 				/* ignore */
 			} else {
 				/* add an arbitrary header? */
+				camel_url_decode (content);
 				e_msg_composer_add_header (composer, header, content);
 			}
 
@@ -3952,7 +3957,7 @@
 			p += clen;
 			if (*p == '&') {
 				p++;
-				if (!strcmp (p, "amp;"))
+				if (!g_ascii_strncasecmp (p, "amp;", 4))
 					p += 4;
 			}
 		}

Modified: branches/kill-bonobo/configure.in
==============================================================================
--- branches/kill-bonobo/configure.in	(original)
+++ branches/kill-bonobo/configure.in	Wed Dec 10 18:30:29 2008
@@ -3,7 +3,7 @@
 
 m4_define([evo_major_version], [2])
 m4_define([evo_minor_version], [25])
-m4_define([evo_micro_version], [2])
+m4_define([evo_micro_version], [3])
 m4_define([evo_version],
           [evo_major_version.evo_minor_version.evo_micro_version])
 m4_define([evo_stable_version],
@@ -22,8 +22,8 @@
 
 # Required Packages
 m4_define([glib_minimum_version], [2.18.0])
-m4_define([gtk_minimum_version], [2.12.0])
-m4_define([eds_minimum_version], [2.25.2])
+m4_define([gtk_minimum_version], [2.14.0])
+m4_define([eds_minimum_version], [2.25.3])
 m4_define([gnome_icon_theme_minimum_version], [2.19.91])
 m4_define([libbonobo_minimum_version], [2.20.3])
 m4_define([libbonoboui_minimum_version], [2.4.2])
@@ -43,6 +43,7 @@
 m4_define([hal_minimum_version], [0.5.4])
 m4_define([libnotify_minimum_version], [0.3.0])
 m4_define([gnome_pilot_minimum_version], [2.0.15])
+m4_define([gweather_minimum_version], [2.25.3])
 
 # GNOME Documentation
 GNOME_DOC_INIT
@@ -1207,6 +1208,25 @@
 AC_SUBST(MANUAL_NSS_LIBS)
 
 dnl **************************************************
+dnl Check if we should build the weather calendar plugin
+dnl **************************************************
+AC_MSG_CHECKING(if we should build the weather calendar plugin)
+AC_ARG_WITH([weather], 
+  [AS_HELP_STRING([--with-weather], [Build the weather calendar setup plugin (default=yes)])],
+  [use_gweather=$withval], 
+  [use_gweather=yes])
+AC_MSG_RESULT($use_gweather)
+
+if test $use_gweather = yes; then
+	PKG_CHECK_MODULES([LIBGWEATHER], 
+	   [gweather >= gweather_minimum_version],
+	   [CALENDAR_WEATHER="calendar-weather"], 
+	   [AC_MSG_ERROR([The weather calendar setup plugin requires GWeather >= gweather_minimum_version. Alternatively, you may specify --without-weather as a configure option to avoid building the plugin.])])
+else 
+	CALENDAR_WEATHER=""
+fi
+
+dnl **************************************************
 dnl Exchange support.
 dnl **************************************************
 AC_ARG_ENABLE([exchange],
@@ -1738,7 +1758,7 @@
 	      [enable_plugins="$enableval"],[enable_plugins=all])
 
 dnl Add any new plugins here
-plugins_base_always="calendar-file calendar-http calendar-weather itip-formatter plugin-manager default-source addressbook-file startup-wizard mark-all-read groupwise-features groupwise-account-setup mail-account-disable publish-calendar caldav imap-features google-account-setup webdav-account-setup"
+plugins_base_always="calendar-file calendar-http $CALENDAR_WEATHER itip-formatter plugin-manager default-source addressbook-file startup-wizard mark-all-read groupwise-features groupwise-account-setup mail-account-disable publish-calendar caldav imap-features google-account-setup webdav-account-setup"
 
 plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN $EXCHANGE_PLUGIN $MONO_PLUGIN " 
 all_plugins_base="$plugins_base_always sa-junk-plugin bogo-junk-plugin exchange-operations mono"

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-content.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-content.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-content.sgml	Wed Dec 10 18:30:29 2008
@@ -101,3 +101,270 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION e_shell_content_get_shell_view ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_context ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_context ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ context: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_filter_action ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_filter_action ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ filter_action: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_filter_value ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_filter_value ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ filter_value: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_filter_visible ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_filter_visible ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ filter_visible: 
+
+
+<!-- ##### FUNCTION e_shell_content_add_filter_separator_after ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ action_value: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_search_context ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_search_rule ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_search_rule ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ search_rule: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_search_text ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_search_text ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ search_text: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_search_value ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_search_value ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ search_value: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_search_visible ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_search_visible ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ search_visible: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_scope_action ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_scope_action ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ scope_action: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_scope_value ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_scope_value ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ scope_value: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_scope_visible ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_scope_visible ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ scope_visible: 
+
+
+<!-- ##### FUNCTION e_shell_content_get_view_id ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_content_set_view_id ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+ view_id: 
+
+
+<!-- ##### FUNCTION e_shell_content_run_advanced_search_dialog ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+
+
+<!-- ##### FUNCTION e_shell_content_run_edit_searches_dialog ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+
+
+<!-- ##### FUNCTION e_shell_content_run_save_search_dialog ##### -->
+<para>
+
+</para>
+
+ shell_content: 
+
+

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml	Wed Dec 10 18:30:29 2008
@@ -56,3 +56,48 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION e_shell_sidebar_get_shell_view ##### -->
+<para>
+
+</para>
+
+ shell_sidebar: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_sidebar_get_primary_text ##### -->
+<para>
+
+</para>
+
+ shell_sidebar: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_sidebar_set_primary_text ##### -->
+<para>
+
+</para>
+
+ shell_sidebar: 
+ primary_text: 
+
+
+<!-- ##### FUNCTION e_shell_sidebar_get_secondary_text ##### -->
+<para>
+
+</para>
+
+ shell_sidebar: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_sidebar_set_secondary_text ##### -->
+<para>
+
+</para>
+
+ shell_sidebar: 
+ secondary_text: 
+
+

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-taskbar.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-taskbar.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-taskbar.sgml	Wed Dec 10 18:30:29 2008
@@ -42,3 +42,38 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION e_shell_taskbar_get_shell_view ##### -->
+<para>
+
+</para>
+
+ shell_taskbar: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_taskbar_get_message ##### -->
+<para>
+
+</para>
+
+ shell_taskbar: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_taskbar_set_message ##### -->
+<para>
+
+</para>
+
+ shell_taskbar: 
+ message: 
+
+
+<!-- ##### FUNCTION e_shell_taskbar_unset_message ##### -->
+<para>
+
+</para>
+
+ shell_taskbar: 
+
+

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-window.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-window.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-window.sgml	Wed Dec 10 18:30:29 2008
@@ -57,3 +57,120 @@
 @Returns: 
 
 
+<!-- ##### FUNCTION e_shell_window_get_shell_view ##### -->
+<para>
+
+</para>
+
+ shell_window: 
+ view_name: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_window_get_shell_view_action ##### -->
+<para>
+
+</para>
+
+ shell_window: 
+ view_name: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_window_get_ui_manager ##### -->
+<para>
+
+</para>
+
+ shell_window: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_window_get_action ##### -->
+<para>
+
+</para>
+
+ shell_window: 
+ action_name: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_window_get_action_group ##### -->
+<para>
+
+</para>
+
+ shell_window: 
+ group_name: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_window_get_managed_widget ##### -->
+<para>
+
+</para>
+
+ shell_window: 
+ widget_path: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_window_get_active_view ##### -->
+<para>
+
+</para>
+
+ shell_window: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_window_set_active_view ##### -->
+<para>
+
+</para>
+
+ shell_window: 
+ view_name: 
+
+
+<!-- ##### FUNCTION e_shell_window_get_safe_mode ##### -->
+<para>
+
+</para>
+
+ shell_window: 
+ Returns: 
+
+
+<!-- ##### FUNCTION e_shell_window_set_safe_mode ##### -->
+<para>
+
+</para>
+
+ shell_window: 
+ safe_mode: 
+
+
+<!-- ##### FUNCTION e_shell_window_register_new_item_actions ##### -->
+<para>
+
+</para>
+
+ shell_window: 
+ module_name: 
+ entries: 
+ n_entries: 
+
+
+<!-- ##### FUNCTION e_shell_window_register_new_source_actions ##### -->
+<para>
+
+</para>
+
+ shell_window: 
+ module_name: 
+ entries: 
+ n_entries: 
+
+

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/eshell-unused.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/eshell-unused.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/eshell-unused.sgml	Wed Dec 10 18:30:29 2008
@@ -1721,243 +1721,6 @@
 @revision: 
 @Returns: 
 
-<!-- ##### FUNCTION e_shell_content_add_filter_separator_after ##### -->
-<para>
-
-</para>
-
- shell_content: 
- action_value: 
-
-<!-- ##### FUNCTION e_shell_content_get_context ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_filter_action ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_filter_value ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_filter_visible ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_scope_action ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_scope_value ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_scope_visible ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_search_context ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_search_rule ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_search_text ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_search_value ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_search_visible ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_shell_view ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_get_view_id ##### -->
-<para>
-
-</para>
-
- shell_content: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_content_run_advanced_search_dialog ##### -->
-<para>
-
-</para>
-
- shell_content: 
-
-<!-- ##### FUNCTION e_shell_content_run_edit_searches_dialog ##### -->
-<para>
-
-</para>
-
- shell_content: 
-
-<!-- ##### FUNCTION e_shell_content_run_save_search_dialog ##### -->
-<para>
-
-</para>
-
- shell_content: 
-
-<!-- ##### FUNCTION e_shell_content_set_context ##### -->
-<para>
-
-</para>
-
- shell_content: 
- context: 
-
-<!-- ##### FUNCTION e_shell_content_set_filter_action ##### -->
-<para>
-
-</para>
-
- shell_content: 
- filter_action: 
-
-<!-- ##### FUNCTION e_shell_content_set_filter_value ##### -->
-<para>
-
-</para>
-
- shell_content: 
- filter_value: 
-
-<!-- ##### FUNCTION e_shell_content_set_filter_visible ##### -->
-<para>
-
-</para>
-
- shell_content: 
- filter_visible: 
-
-<!-- ##### FUNCTION e_shell_content_set_scope_action ##### -->
-<para>
-
-</para>
-
- shell_content: 
- scope_action: 
-
-<!-- ##### FUNCTION e_shell_content_set_scope_value ##### -->
-<para>
-
-</para>
-
- shell_content: 
- scope_value: 
-
-<!-- ##### FUNCTION e_shell_content_set_scope_visible ##### -->
-<para>
-
-</para>
-
- shell_content: 
- scope_visible: 
-
-<!-- ##### FUNCTION e_shell_content_set_search_rule ##### -->
-<para>
-
-</para>
-
- shell_content: 
- search_rule: 
-
-<!-- ##### FUNCTION e_shell_content_set_search_text ##### -->
-<para>
-
-</para>
-
- shell_content: 
- search_text: 
-
-<!-- ##### FUNCTION e_shell_content_set_search_value ##### -->
-<para>
-
-</para>
-
- shell_content: 
- search_value: 
-
-<!-- ##### FUNCTION e_shell_content_set_search_visible ##### -->
-<para>
-
-</para>
-
- shell_content: 
- search_visible: 
-
-<!-- ##### FUNCTION e_shell_content_set_view_id ##### -->
-<para>
-
-</para>
-
- shell_content: 
- view_id: 
-
 <!-- ##### FUNCTION e_shell_marshal_BOOLEAN__STRING ##### -->
 <para>
 
@@ -2003,77 +1766,6 @@
 @online: 
 @Returns: 
 
-<!-- ##### FUNCTION e_shell_sidebar_get_primary_text ##### -->
-<para>
-
-</para>
-
- shell_sidebar: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_sidebar_get_secondary_text ##### -->
-<para>
-
-</para>
-
- shell_sidebar: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_sidebar_get_shell_view ##### -->
-<para>
-
-</para>
-
- shell_sidebar: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_sidebar_set_primary_text ##### -->
-<para>
-
-</para>
-
- shell_sidebar: 
- primary_text: 
-
-<!-- ##### FUNCTION e_shell_sidebar_set_secondary_text ##### -->
-<para>
-
-</para>
-
- shell_sidebar: 
- secondary_text: 
-
-<!-- ##### FUNCTION e_shell_taskbar_get_message ##### -->
-<para>
-
-</para>
-
- shell_taskbar: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_taskbar_get_shell_view ##### -->
-<para>
-
-</para>
-
- shell_taskbar: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_taskbar_set_message ##### -->
-<para>
-
-</para>
-
- shell_taskbar: 
- message: 
-
-<!-- ##### FUNCTION e_shell_taskbar_unset_message ##### -->
-<para>
-
-</para>
-
- shell_taskbar: 
-
 <!-- ##### FUNCTION e_shell_upgrade_attempt ##### -->
 <para>
 
@@ -2082,111 +1774,6 @@
 @shell: 
 @Returns: 
 
-<!-- ##### FUNCTION e_shell_window_get_action ##### -->
-<para>
-
-</para>
-
- shell_window: 
- action_name: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_window_get_action_group ##### -->
-<para>
-
-</para>
-
- shell_window: 
- group_name: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_window_get_active_view ##### -->
-<para>
-
-</para>
-
- shell_window: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_window_get_managed_widget ##### -->
-<para>
-
-</para>
-
- shell_window: 
- widget_path: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_window_get_safe_mode ##### -->
-<para>
-
-</para>
-
- shell_window: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_window_get_shell_view ##### -->
-<para>
-
-</para>
-
- shell_window: 
- view_name: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_window_get_shell_view_action ##### -->
-<para>
-
-</para>
-
- shell_window: 
- view_name: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_window_get_ui_manager ##### -->
-<para>
-
-</para>
-
- shell_window: 
- Returns: 
-
-<!-- ##### FUNCTION e_shell_window_register_new_item_actions ##### -->
-<para>
-
-</para>
-
- shell_window: 
- module_name: 
- entries: 
- n_entries: 
-
-<!-- ##### FUNCTION e_shell_window_register_new_source_actions ##### -->
-<para>
-
-</para>
-
- shell_window: 
- module_name: 
- entries: 
- n_entries: 
-
-<!-- ##### FUNCTION e_shell_window_set_active_view ##### -->
-<para>
-
-</para>
-
- shell_window: 
- view_name: 
-
-<!-- ##### FUNCTION e_shell_window_set_safe_mode ##### -->
-<para>
-
-</para>
-
- shell_window: 
- safe_mode: 
-
 <!-- ##### VARIABLE e_test_shell_view_type ##### -->
 <para>
 

Modified: branches/kill-bonobo/e-util/e-config.c
==============================================================================
--- branches/kill-bonobo/e-util/e-config.c	(original)
+++ branches/kill-bonobo/e-util/e-config.c	Wed Dec 10 18:30:29 2008
@@ -122,6 +122,10 @@
 	}
 
 	while ( (wn = (struct _widget_node *)e_dlist_remhead(&p->widgets)) ) {
+		/* disconnect the gtk_widget_destroyed function from the widget */
+		if (wn->widget)
+			g_signal_handlers_disconnect_matched (wn->widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, &wn->widget);
+
 		g_free(wn);
 	}
 

Modified: branches/kill-bonobo/e-util/e-util-labels.c
==============================================================================
--- branches/kill-bonobo/e-util/e-util-labels.c	(original)
+++ branches/kill-bonobo/e-util/e-util-labels.c	Wed Dec 10 18:30:29 2008
@@ -29,8 +29,10 @@
 
 #include <camel/camel-utf8.h>
 
+#include "e-util.h"
 #include "e-util-labels.h"
 #include "e-dialog-utils.h"
+#include "filter/filter-option.h"
 
 /* Note, the first element of each EUtilLabel must NOT be translated */
 EUtilLabel label_defaults[LABEL_DEFAULTS_NUM] = {
@@ -543,3 +545,38 @@
 
 	return label->colour;
 }
+
+/**
+ * e_util_labels_get_filter_options:
+ * Returns list of newly allocated struct _filter_option-s, to be used in filters.
+ **/
+GSList *
+e_util_labels_get_filter_options (void)
+{
+	GSList *known = e_util_labels_parse (NULL), *l;
+	GSList *res = NULL;
+
+	for (l = known; l; l = l->next) {
+		EUtilLabel *label = l->data;
+		const char *tag;
+		struct _filter_option *fo;
+
+		if (!label)
+			continue;
+
+		tag = label->tag;
+
+		if (tag && strncmp (tag, "$Label", 6) == 0)
+			tag += 6;
+
+		fo = g_new0 (struct _filter_option, 1);
+		fo->title = e_str_without_underscores (label->name);
+		fo->value = g_strdup (tag);
+
+		res = g_slist_prepend (res, fo);
+	}
+
+	e_util_labels_free (known);
+
+	return g_slist_reverse (res);
+}

Modified: branches/kill-bonobo/e-util/e-util-labels.h
==============================================================================
--- branches/kill-bonobo/e-util/e-util-labels.h	(original)
+++ branches/kill-bonobo/e-util/e-util-labels.h	Wed Dec 10 18:30:29 2008
@@ -52,4 +52,6 @@
 gboolean    e_util_labels_get_color     (GSList *labels, const char *tag, GdkColor *color);
 const char *e_util_labels_get_color_str (GSList *labels, const char *tag);
 
+GSList *    e_util_labels_get_filter_options (void);
+
 #endif /* _E_UTIL_LABELS_H */

Modified: branches/kill-bonobo/e-util/e-util.c
==============================================================================
--- branches/kill-bonobo/e-util/e-util.c	(original)
+++ branches/kill-bonobo/e-util/e-util.c	Wed Dec 10 18:30:29 2008
@@ -39,13 +39,15 @@
 #include <glib/gi18n.h>
 #include <glib/gstdio.h>
 #include <libgnome/gnome-help.h>
-#include <libgnome/gnome-util.h>
+#include <libgnome/gnome-init.h>
 
 #ifdef G_OS_WIN32
 #include <windows.h>
 #endif
 
 #include <libedataserver/e-data-server-util.h>
+#include <libedataserver/e-categories.h>
+#include "filter/filter-option.h"
 #include "e-util.h"
 #include "e-util-private.h"
 
@@ -70,6 +72,27 @@
 }
 
 /**
+ * e_get_accels_filename:
+ *
+ * Returns the name of the user data file containing custom keyboard
+ * accelerator specifications.
+ *
+ * Returns: filename for accelerator specifications
+ **/
+const gchar *
+e_get_accels_filename (void)
+{
+	static gchar *filename = NULL;
+
+	if (G_UNLIKELY (filename == NULL))
+		filename = g_build_filename (
+			gnome_user_dir_get (),
+			"accels", PACKAGE, NULL);
+
+	return filename;
+}
+
+/**
  * e_display_help:
  * @parent: a parent #GtkWindow or %NULL
  * @link_id: help section to present or %NULL
@@ -1282,3 +1305,23 @@
 	return res;
 }
 
+GSList *
+e_util_get_category_filter_options (void)
+{
+	GSList *res = NULL;
+	GList *clist, *l;
+
+	clist = e_categories_get_list ();
+	for (l = clist; l; l = l->next) {
+		const char *cname = l->data;
+		struct _filter_option *fo = g_new0 (struct _filter_option, 1);
+
+		fo->title = g_strdup (cname);
+		fo->value = g_strdup (cname);
+		res = g_slist_prepend (res, fo);
+	}
+
+	g_list_free (clist);
+
+	return g_slist_reverse (res);
+}

Modified: branches/kill-bonobo/e-util/e-util.h
==============================================================================
--- branches/kill-bonobo/e-util/e-util.h	(original)
+++ branches/kill-bonobo/e-util/e-util.h	Wed Dec 10 18:30:29 2008
@@ -41,6 +41,7 @@
 } EFocus;
 
 const gchar *	e_get_user_data_dir		(void);
+const gchar *	e_get_accels_filename		(void);
 void		e_display_help			(GtkWindow *parent,
 						 const gchar *link_id);
 guint		e_load_ui_definition		(GtkUIManager *ui_manager,
@@ -129,6 +130,8 @@
 						 gsize *read,
 						 GError **error);
 
+GSList *e_util_get_category_filter_options      (void);
+
 G_END_DECLS
 
 #endif /* _E_UTIL_H_ */

Modified: branches/kill-bonobo/e-util/gconf-bridge.c
==============================================================================
--- branches/kill-bonobo/e-util/gconf-bridge.c	(original)
+++ branches/kill-bonobo/e-util/gconf-bridge.c	Wed Dec 10 18:30:29 2008
@@ -70,6 +70,7 @@
 
         GtkWindow *window;
         gulong configure_event_id;
+	gulong window_state_event_id;
         gulong unmap_id;
         guint sync_timeout_id;
 } WindowBinding;
@@ -819,7 +820,7 @@
                                         (window_binding_configure_event_cb),
                                   binding);
 
-        binding->configure_event_id =
+        binding->window_state_event_id =
                 g_signal_connect (window,
                                   "window_state_event",
                                   G_CALLBACK
@@ -857,6 +858,8 @@
                 g_signal_handler_disconnect (binding->window,
                                              binding->configure_event_id);
                 g_signal_handler_disconnect (binding->window,
+					     binding->window_state_event_id);
+                g_signal_handler_disconnect (binding->window,
                                              binding->unmap_id);
 
                 g_object_weak_unref (G_OBJECT (binding->window),

Modified: branches/kill-bonobo/filter/Makefile.am
==============================================================================
--- branches/kill-bonobo/filter/Makefile.am	(original)
+++ branches/kill-bonobo/filter/Makefile.am	Wed Dec 10 18:30:29 2008
@@ -26,8 +26,6 @@
 	filter-input.h				\
 	filter-int.c				\
 	filter-int.h				\
-	filter-label.c				\
-	filter-label.h				\
 	filter-option.c				\
 	filter-option.h				\
 	filter-part.c				\

Modified: branches/kill-bonobo/filter/filter-element.c
==============================================================================
--- branches/kill-bonobo/filter/filter-element.c	(original)
+++ branches/kill-bonobo/filter/filter-element.c	Wed Dec 10 18:30:29 2008
@@ -279,7 +279,6 @@
 #include "filter-datespec.h"
 #include "filter-int.h"
 #include "filter-file.h"
-#include "filter-label.h"
 
 static void
 copy_value(FilterElement *de, FilterElement *se)

Modified: branches/kill-bonobo/filter/filter-option.c
==============================================================================
--- branches/kill-bonobo/filter/filter-option.c	(original)
+++ branches/kill-bonobo/filter/filter-option.c	Wed Dec 10 18:30:29 2008
@@ -29,6 +29,7 @@
 
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
+#include <dlfcn.h>
 
 #include "filter-option.h"
 #include "filter-part.h"
@@ -44,6 +45,7 @@
 static GtkWidget *get_widget (FilterElement *fe);
 static void build_code (FilterElement *fe, GString *out, struct _FilterPart *ff);
 static void format_sexp (FilterElement *, GString *);
+static GSList *get_dynamic_options (FilterOption *fo);
 
 static void filter_option_class_init (FilterOptionClass *klass);
 static void filter_option_init (FilterOption *fo);
@@ -102,6 +104,7 @@
 filter_option_init (FilterOption *fo)
 {
 	fo->type = "option";
+	fo->dynamic_func = NULL;
 }
 
 static void
@@ -120,6 +123,7 @@
 
 	g_list_foreach (fo->options, (GFunc)free_option, NULL);
 	g_list_free (fo->options);
+	g_free (fo->dynamic_func);
 
         G_OBJECT_CLASS (parent_class)->finalize (obj);
 }
@@ -164,7 +168,7 @@
 
 /* used by implementers to add additional options */
 struct _filter_option *
-filter_option_add(FilterOption *fo, const char *value, const char *title, const char *code)
+filter_option_add(FilterOption *fo, const char *value, const char *title, const char *code, gboolean is_dynamic)
 {
 	struct _filter_option *op;
 
@@ -175,6 +179,7 @@
 	op->title = g_strdup(title);
 	op->value = g_strdup(value);
 	op->code = g_strdup(code);
+	op->is_dynamic = is_dynamic;
 
 	fo->options = g_list_append(fo->options, op);
 	if (fo->current == NULL)
@@ -253,10 +258,47 @@
 				work = work->next;
 			}
 
-			filter_option_add (fo, value, title, code);
+			filter_option_add (fo, value, title, code, FALSE);
 			xmlFree (value);
 			g_free (title);
 			g_free (code);
+		} else if (g_str_equal ((char *)n->name, "dynamic")) {
+			if (fo->dynamic_func) {
+				g_warning ("Only one 'dynamic' node is acceptable in the optionlist '%s'", fe->name);
+			} else {
+				/* Expecting only one <dynamic func="cb" /> in the option list,
+				   The 'cb' should be of this prototype:
+				   GSList *cb (void);
+				   returning GSList of struct _filter_option, all newly allocated, because it'll
+				   be freed with g_free and g_slist_free. 'is_dynamic' member is ignored here.
+				*/
+				xmlChar *fn;
+
+				fn = xmlGetProp (n, (const unsigned char *)"func");
+				if (fn && *fn) {
+					GSList *items, *i;
+					struct _filter_option *op;
+
+					fo->dynamic_func = g_strdup ((const char *)fn);
+
+					/* get options now, to have them available when reading saved rules */
+					items = get_dynamic_options (fo);
+					for (i = items; i; i = i->next) {
+						op = i->data;
+
+						if (op) {
+							filter_option_add (fo, op->value, op->title, op->code, TRUE);
+							free_option (op, NULL);
+						}
+					}
+
+					g_slist_free (items);
+				} else {
+					g_warning ("Missing 'func' attribute within '%s' node in optionlist '%s'", n->name, fe->name);
+				}
+
+				xmlFree (fn);
+			}
 		} else if (n->type == XML_ELEMENT_NODE) {
 			g_warning ("Unknown xml node within optionlist: %s\n", n->name);
 		}
@@ -307,6 +349,30 @@
 	fo->current = g_object_get_data ((GObject *) widget, "option");
 }
 
+static GSList *
+get_dynamic_options (FilterOption *fo)
+{
+	void *module;
+	GSList *(*get_func)(void);
+	GSList *res = NULL;
+
+	if (!fo || !fo->dynamic_func)
+		return res;
+
+	module = dlopen (NULL, RTLD_LAZY);
+
+	get_func = dlsym (module, fo->dynamic_func);
+	if (get_func) {
+		res = get_func ();
+	} else {
+		g_warning ("optionlist dynamic fill function '%s' not found", fo->dynamic_func);
+	}
+
+	dlclose (module);
+
+	return res;
+}
+
 static GtkWidget *
 get_widget (FilterElement *fe)
 {
@@ -315,11 +381,64 @@
 	GtkWidget *omenu;
 	GtkWidget *item;
 	GtkWidget *first = NULL;
-	GList *l = fo->options;
+	GList *l;
 	struct _filter_option *op;
 	int index = 0, current = 0;
 
+	if (fo->dynamic_func) {
+		/* it is dynamically filled, thus remove all dynamics and put there the fresh ones */
+		GSList *items, *i;
+		GList *old_ops;
+		struct _filter_option *old_cur;
+
+		old_ops = fo->options;
+		old_cur = fo->current;
+		l = old_ops;
+
+		/* start with an empty list */
+		fo->current = NULL;
+		fo->options = NULL;
+
+		for (l = fo->options; l; l = l->next) {
+			op = l->data;
+
+			if (op->is_dynamic) {
+				break;
+			} else {
+				filter_option_add (fo, op->value, op->title, op->code, FALSE);
+			}
+		}
+
+		items = get_dynamic_options (fo);
+		for (i = items; i; i = i->next) {
+			op = i->data;
+
+			if (op) {
+				filter_option_add (fo, op->value, op->title, op->code, TRUE);
+				free_option (op, NULL);
+			}
+		}
+
+		g_slist_free (items);
+
+		/* maybe some static left after those dynamic, add them too */
+		for (; l; l = l->next) {
+			op = l->data;
+
+			if (!op->is_dynamic)
+				filter_option_add (fo, op->value, op->title, op->code, FALSE);
+		}
+
+		if (old_cur)
+			filter_option_set_current (fo, old_cur->value);
+
+		/* free old list */
+		g_list_foreach (old_ops, (GFunc)free_option, NULL);
+		g_list_free (old_ops);
+	}
+
 	menu = gtk_menu_new ();
+	l = fo->options;
 	while (l) {
 		op = l->data;
 		item = gtk_menu_item_new_with_label (_(op->title));
@@ -382,12 +501,14 @@
 	l = fo->options;
 	while (l) {
 		op = l->data;
-		newop = filter_option_add (new, op->value, op->title, op->code);
+		newop = filter_option_add (new, op->value, op->title, op->code, op->is_dynamic);
 		if (fo->current == op)
 			new->current = newop;
 		l = l->next;
 	}
 
+	new->dynamic_func = g_strdup (fo->dynamic_func);
+
 	d(printf ("cloning option code %p, current = %p\n", new, new->current));
 
 	return (FilterElement *) new;

Modified: branches/kill-bonobo/filter/filter-option.h
==============================================================================
--- branches/kill-bonobo/filter/filter-option.h	(original)
+++ branches/kill-bonobo/filter/filter-option.h	Wed Dec 10 18:30:29 2008
@@ -40,6 +40,8 @@
 	char *title;		/* button title */
 	char *value;		/* value, if it has one */
 	char *code;		/* used to string code segments together */
+
+	gboolean is_dynamic;	/* whether is the option dynamic, FALSE if static */
 };
 
 struct _FilterOption {
@@ -49,6 +51,7 @@
 
 	GList *options;
 	struct _filter_option *current;
+	char *dynamic_func;	/* name of the dynamic fill func, called in get_widget */
 };
 
 struct _FilterOptionClass {
@@ -66,7 +69,7 @@
 void filter_option_set_current (FilterOption *option, const char *name);
 const char *filter_option_get_current (FilterOption *option);
 
-struct _filter_option *filter_option_add (FilterOption *fo, const char *name, const char *title, const char *code);
+struct _filter_option *filter_option_add (FilterOption *fo, const char *name, const char *title, const char *code, gboolean is_dynamic);
 void filter_option_remove_all (FilterOption *fo);
 
 #endif /* ! _FILTER_OPTION_H */

Modified: branches/kill-bonobo/filter/filter.glade
==============================================================================
--- branches/kill-bonobo/filter/filter.glade	(original)
+++ branches/kill-bonobo/filter/filter.glade	Wed Dec 10 18:30:29 2008
@@ -615,7 +615,7 @@
 			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 			  <property name="snap_to_ticks">False</property>
 			  <property name="wrap">False</property>
-			  <property name="adjustment">1 0 1000 1 10 10</property>
+			  <property name="adjustment">1 0 1000 1 10 0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>

Modified: branches/kill-bonobo/filter/rule-context.c
==============================================================================
--- branches/kill-bonobo/filter/rule-context.c	(original)
+++ branches/kill-bonobo/filter/rule-context.c	Wed Dec 10 18:30:29 2008
@@ -48,7 +48,6 @@
 #include "filter-file.h"
 #include "filter-input.h"
 #include "filter-int.h"
-#include "filter-label.h"
 #include "filter-option.h"
 #include "filter-rule.h"
 #include "rule-context.h"
@@ -921,8 +920,6 @@
 		return (FilterElement *) filter_int_new ();
 	} else if (!strcmp (type, "regex")) {
 		return (FilterElement *) filter_input_new_type_name (type);
-	} else if (!strcmp (type, "label")) {
-		return (FilterElement *) filter_label_new ();
 	}else if (!strcmp(type, "completedpercent")) {
                  return (FilterElement *) filter_int_new_type("completedpercent", 0,100);
 

Modified: branches/kill-bonobo/mail/em-filter-i18n.h
==============================================================================
--- branches/kill-bonobo/mail/em-filter-i18n.h	(original)
+++ branches/kill-bonobo/mail/em-filter-i18n.h	Wed Dec 10 18:30:29 2008
@@ -1,19 +1,3 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>  
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- */
 /* Automatically generated. Do not edit. */
 char *s = N_("Adjust Score");
 char *s = N_("Assign Color");
@@ -75,6 +59,7 @@
 char *s = N_("Run Program");
 char *s = N_("Score");
 char *s = N_("Sender");
+char *s = N_("Sender or Recipients");
 char *s = N_("Set Label");
 char *s = N_("Set Status");
 char *s = N_("Size (kB)");

Modified: branches/kill-bonobo/mail/em-folder-properties.c
==============================================================================
--- branches/kill-bonobo/mail/em-folder-properties.c	(original)
+++ branches/kill-bonobo/mail/em-folder-properties.c	Wed Dec 10 18:30:29 2008
@@ -353,6 +353,7 @@
 
 	if (store == local_store
 	    && (!strcmp(prop_data->name, "Drafts")
+		|| !strcmp(prop_data->name, "Templates")
 		|| !strcmp(prop_data->name, "Inbox")
 		|| !strcmp(prop_data->name, "Outbox")
 		|| !strcmp(prop_data->name, "Sent"))) {

Modified: branches/kill-bonobo/mail/em-folder-tree-model.c
==============================================================================
--- branches/kill-bonobo/mail/em-folder-tree-model.c	(original)
+++ branches/kill-bonobo/mail/em-folder-tree-model.c	Wed Dec 10 18:30:29 2008
@@ -628,6 +628,8 @@
 	if (si->store == e_mail_shell_module_get_local_store (shell_module)) {
 		if (!strcmp(fi->full_name, "Drafts")) {
 			name = _("Drafts");
+		} else if (!strcmp(fi->full_name, "Templates")) {
+			name = _("Templates");
 		} else if (!strcmp(fi->full_name, "Inbox")) {
 			flags = (flags & ~CAMEL_FOLDER_TYPE_MASK) | CAMEL_FOLDER_TYPE_INBOX;
 			name = _("Inbox");

Modified: branches/kill-bonobo/mail/em-folder-tree.c
==============================================================================
--- branches/kill-bonobo/mail/em-folder-tree.c	(original)
+++ branches/kill-bonobo/mail/em-folder-tree.c	Wed Dec 10 18:30:29 2008
@@ -1950,7 +1950,8 @@
 		return;
 	}
 
-	gtk_tree_store_set((GtkTreeStore *)model, root, COL_BOOL_LOAD_SUBDIRS, FALSE, -1);
+	/* do not set LOAD_SUBDIRS to FALSE until we are really done with loading */
+	/* gtk_tree_store_set ((GtkTreeStore *)model, root, COL_BOOL_LOAD_SUBDIRS, FALSE, -1); */
 
 	m = mail_msg_new (&get_folder_info_info);
 	m->root = gtk_tree_row_reference_new (model, tree_path);

Modified: branches/kill-bonobo/mail/filtertypes.xml
==============================================================================
--- branches/kill-bonobo/mail/filtertypes.xml	(original)
+++ branches/kill-bonobo/mail/filtertypes.xml	Wed Dec 10 18:30:29 2008
@@ -635,7 +635,9 @@
     </code>
    </option>
   </input>
-  <input type="label" name="versus"/>
+  <input type="optionlist" name="versus">
+     <dynamic func="e_util_labels_get_filter_options"/>
+  </input>
  </part>
 
  <part name="score">
@@ -920,7 +922,9 @@
  <part name="label">
   <title>Set Label</title>
   <code>(set-label ${label})</code>
-  <input type="label" name="label"/>
+  <input type="optionlist" name="label">
+     <dynamic func="e_util_labels_get_filter_options"/>
+  </input>
  </part>
  <part name="colour">
   <title>Assign Color</title>

Modified: branches/kill-bonobo/mail/mail-component.c
==============================================================================
--- branches/kill-bonobo/mail/mail-component.c	(original)
+++ branches/kill-bonobo/mail/mail-component.c	Wed Dec 10 18:30:29 2008
@@ -579,7 +579,7 @@
 
 		if (emfv->folder->parent_store == mail_component_peek_local_store(NULL)
 		    && (!strcmp (name, "Drafts") || !strcmp (name, "Inbox")
-			|| !strcmp (name, "Outbox") || !strcmp (name, "Sent")))
+			|| !strcmp (name, "Outbox") || !strcmp (name, "Sent") || !strcmp (name, "Templates")))
 			use_name = _(name);
 		else if (!strcmp (name, "INBOX"))
  			use_name = _("Inbox");

Modified: branches/kill-bonobo/mail/mail-config.c
==============================================================================
--- branches/kill-bonobo/mail/mail-config.c	(original)
+++ branches/kill-bonobo/mail/mail-config.c	Wed Dec 10 18:30:29 2008
@@ -801,53 +801,66 @@
 	return (EAccount *) e_account_list_find (config->accounts, E_ACCOUNT_FIND_UID, uid);
 }
 
+static gboolean
+mail_config_account_url_equal (const CamelURL *u1,
+                               const CamelURL *u2)
+{
+	/* For the purpose of matching a URL to an EAccount, only compare
+	 * the protocol, user, host and port and disregard the rest. */
+
+	if (g_strcmp0 (u1->protocol, u2->protocol) != 0)
+		return FALSE;
+
+	if (g_strcmp0 (u1->user, u2->user) != 0)
+		return FALSE;
+
+	if (g_strcmp0 (u1->host, u2->host) != 0)
+		return FALSE;
+
+	return (u1->port == u2->port);
+}
+
 EAccount *
 mail_config_get_account_by_source_url (const char *source_url)
 {
 	EAccount *account = NULL;
 	EIterator *iter;
+	CamelURL *url;
 
 	g_return_val_if_fail (source_url != NULL, NULL);
 
+	url = camel_url_new (source_url, NULL);
+	g_return_val_if_fail (url != NULL, NULL);
+
 	iter = e_list_get_iterator ((EList *) config->accounts);
-	while (e_iterator_is_valid (iter)) {
-		CamelURL *url;
-		gchar *string;
+	while (account == NULL && e_iterator_is_valid (iter)) {
+		CamelURL *account_url;
 
 		account = (EAccount *) e_iterator_get (iter);
 
 		e_iterator_next (iter);
 
-		if (account->source == NULL)
-			continue;
-
-		else if (account->source->url == NULL)
-			continue;
-
-		else if (*account->source->url == '\0')
+		if ( !account || (account->source == NULL) || 
+			(account->source->url == NULL) || (*account->source->url == '\0')) {
+			account = NULL;
 			continue;
+		}
 
-		url = camel_url_new (account->source->url, NULL);
-		if (url == NULL)
+		account_url = camel_url_new (account->source->url, NULL);
+		if (account_url == NULL) {
+			account = NULL;
 			continue;
+		}
 
-		/* Simplify the account URL for comparison. */
-		string = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
-		if (string == NULL || strcmp (string, source_url) != 0)
+		if (!mail_config_account_url_equal (url, account_url))
 			account = NULL;  /* not a match */
 
-		camel_url_free (url);
-		g_free (string);
-
-		if (account != NULL) {
-			g_object_unref (iter);
-			return account;
-		}
+		camel_url_free (account_url);
 	}
 
 	g_object_unref (iter);
 
-	return NULL;
+	return account;
 }
 
 EAccount *
@@ -855,48 +868,42 @@
 {
 	EAccount *account = NULL;
 	EIterator *iter;
+	CamelURL *url;
 
 	g_return_val_if_fail (transport_url != NULL, NULL);
 
+	url = camel_url_new (transport_url, NULL);
+	g_return_val_if_fail (url != NULL, NULL);
+
 	iter = e_list_get_iterator ((EList *) config->accounts);
-	while (e_iterator_is_valid (iter)) {
-		CamelURL *url;
-		gchar *string;
+	while (account == NULL && e_iterator_is_valid (iter)) {
+		CamelURL *account_url;
 
 		account = (EAccount *) e_iterator_get (iter);
 
 		e_iterator_next (iter);
 
-		if (account->transport == NULL)
-			continue;
-
-		else if (account->transport->url == NULL)
-			continue;
-
-		else if (*account->transport->url == '\0')
-			continue;
+		if ( !account || (account->transport == NULL) || 
+			(account->transport->url == NULL) || (*account->transport->url == '\0')) {
+				account = NULL;
+				continue;
+		}
 
-		url = camel_url_new (account->transport->url, NULL);
-		if (url == NULL)
+		account_url = camel_url_new (account->transport->url, NULL);
+		if (account_url == NULL) {
+			account = NULL;
 			continue;
+		}
 
-		/* Simplify the account URL for comparison. */
-		string = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
-		if (string == NULL || strcmp (string, transport_url) != 0)
+		if (!mail_config_account_url_equal (url, account_url))
 			account = NULL;  /* not a match */
 
 		camel_url_free (url);
-		g_free (string);
-
-		if (account != NULL) {
-			g_object_unref (iter);
-			return account;
-		}
 	}
 
 	g_object_unref (iter);
 
-	return NULL;
+	return account;
 }
 
 int

Modified: branches/kill-bonobo/mail/mail-config.glade
==============================================================================
--- branches/kill-bonobo/mail/mail-config.glade	(original)
+++ branches/kill-bonobo/mail/mail-config.glade	Wed Dec 10 18:30:29 2008
@@ -4911,7 +4911,7 @@
 				  <property name="update_policy">GTK_UPDATE_IF_VALID</property>
 				  <property name="snap_to_ticks">False</property>
 				  <property name="wrap">False</property>
-				  <property name="adjustment">1.5 0 10 1 1 1</property>
+				  <property name="adjustment">1.5 0 10 1 1 0</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
@@ -4987,7 +4987,7 @@
 				  <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 30000 1 10 10</property>
+				  <property name="adjustment">0 0 30000 1 10 0</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
@@ -5063,7 +5063,7 @@
 				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 				  <property name="snap_to_ticks">False</property>
 				  <property name="wrap">False</property>
-				  <property name="adjustment">5 1 100 1 10 10</property>
+				  <property name="adjustment">5 1 100 1 10 0</property>
 				</widget>
 				<packing>
 				  <property name="padding">2</property>
@@ -9544,7 +9544,7 @@
 				  <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>
+				  <property name="adjustment">0 0 65535 1 10 0</property>
 				</widget>
 				<packing>
 				  <property name="left_attach">3</property>
@@ -9565,7 +9565,7 @@
 				  <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>
+				  <property name="adjustment">0 0 65535 1 10 0</property>
 				</widget>
 				<packing>
 				  <property name="left_attach">3</property>
@@ -9586,7 +9586,7 @@
 				  <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>
+				  <property name="adjustment">0 0 65535 1 10 0</property>
 				</widget>
 				<packing>
 				  <property name="left_attach">3</property>

Modified: branches/kill-bonobo/mail/message-list.c
==============================================================================
--- branches/kill-bonobo/mail/message-list.c	(original)
+++ branches/kill-bonobo/mail/message-list.c	Wed Dec 10 18:30:29 2008
@@ -65,8 +65,6 @@
 #include "table/e-cell-vbox.h"
 #include "table/e-cell-hbox.h"
 
-#include "filter/filter-label.h"
-
 #include "em-popup.h"
 #include "em-utils.h"
 #include "mail-config.h"

Modified: branches/kill-bonobo/mail/searchtypes.xml
==============================================================================
--- branches/kill-bonobo/mail/searchtypes.xml	(original)
+++ branches/kill-bonobo/mail/searchtypes.xml	Wed Dec 10 18:30:29 2008
@@ -270,7 +270,9 @@
     </code>
    </option>
   </input>
-  <input type="label" name="versus"/>
+  <input type="optionlist" name="versus">
+     <dynamic func="e_util_labels_get_filter_options"/>
+  </input>
  </part>
 
  <part name="score">

Modified: branches/kill-bonobo/mail/vfoldertypes.xml
==============================================================================
--- branches/kill-bonobo/mail/vfoldertypes.xml	(original)
+++ branches/kill-bonobo/mail/vfoldertypes.xml	Wed Dec 10 18:30:29 2008
@@ -353,7 +353,9 @@
     </code>
    </option>
   </input>
-  <input type="label" name="versus"/>
+  <input type="optionlist" name="versus">
+     <dynamic func="e_util_labels_get_filter_options"/>
+  </input>
  </part>
 
  <part name="score">

Modified: branches/kill-bonobo/plugins/caldav/caldav-source.c
==============================================================================
--- branches/kill-bonobo/plugins/caldav/caldav-source.c	(original)
+++ branches/kill-bonobo/plugins/caldav/caldav-source.c	Wed Dec 10 18:30:29 2008
@@ -52,21 +52,31 @@
 /* plugin intialization */
 
 static void
-ensure_caldav_source_group (void)
+ensure_caldav_source_group (ECalSourceType source_type)
 {
 	ESourceList  *slist;
-	ESourceGroup *group;
-
+	GSList *groups, *g;
+	ESourceGroup *group = NULL;
 
-	if (!e_cal_get_sources (&slist, E_CAL_SOURCE_TYPE_EVENT, NULL)) {
+	if (!e_cal_get_sources (&slist, source_type, NULL)) {
 		g_warning ("Could not get calendar source list from GConf!");
 		return;
 	}
 
-	group = e_source_list_peek_group_by_name (slist, _("CalDAV"));
+	groups = e_source_list_peek_groups (slist);
+	for (g = groups; g; g = g->next) {
+		group = E_SOURCE_GROUP (g->data);
+
+		if (group && e_source_group_peek_base_uri (group) && strncmp ("caldav://", e_source_group_peek_base_uri (group), 9) == 0)
+			break;
+
+		group = NULL;
+	}
 
 	if (group == NULL) {
+		/* no such group has been found, create it */
 		gboolean res;
+
 		group = e_source_group_new (_("CalDAV"), "caldav://");
 		res = e_source_list_add_group (slist, group, -1);
 
@@ -77,8 +87,12 @@
 		}
 
 		g_object_unref (group);
-		g_object_unref (slist);
+	} else {
+		/* we found the group, change the name based on the actual language */
+		e_source_group_set_name (group, _("CalDAV"));
 	}
+
+	g_object_unref (slist);
 }
 
 int
@@ -87,7 +101,9 @@
 
 	if (enable) {
 		d(g_print ("CalDAV Eplugin starting up ...\n"));
-		ensure_caldav_source_group ();
+		ensure_caldav_source_group (E_CAL_SOURCE_TYPE_EVENT);
+		ensure_caldav_source_group (E_CAL_SOURCE_TYPE_TODO);
+		ensure_caldav_source_group (E_CAL_SOURCE_TYPE_JOURNAL);
 	}
 
 	return 0;
@@ -174,21 +190,100 @@
 
 	euri = e_uri_new (uri);
 	g_free (euri->user);
+	euri->user = NULL;
 
-	if (user != NULL) {
-		euri->user = g_strdup (user);
+	if (user != NULL && *user) {
 		e_source_set_property (source, "auth", "1");
 	} else {
 		e_source_set_property (source, "auth", NULL);
 	}
 
-	e_source_set_property (source, "username", euri->user);
+	e_source_set_property (source, "username", user);
 	ruri = print_uri_noproto (euri);
 	e_source_set_relative_uri (source, ruri);
 	g_free (ruri);
 	e_uri_free (euri);
 }
 
+static void
+set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option)
+{
+	int time;
+	int item_num = 0;
+	const char *refresh_str = e_source_get_property (source, "refresh");
+	time = refresh_str ? atoi (refresh_str) : 30;
+
+	if (time  && !(time % 10080)) {
+		/* weeks */
+		item_num = 3;
+		time /= 10080;
+	} else if (time && !(time % 1440)) {
+		/* days */
+		item_num = 2;
+		time /= 1440;
+	} else if (time && !(time % 60)) {
+		/* hours */
+		item_num = 1;
+		time /= 60;
+	}
+	gtk_option_menu_set_history (GTK_OPTION_MENU (option), item_num);
+	gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), time);
+}
+
+static char *
+get_refresh_minutes (GtkWidget *spin, GtkWidget *option)
+{
+	int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin));
+	switch (gtk_option_menu_get_history (GTK_OPTION_MENU (option))) {
+	case 0:
+		/* minutes */
+		break;
+	case 1:
+		/* hours */
+		setting *= 60;
+		break;
+	case 2:
+		/* days */
+		setting *= 1440;
+		break;
+	case 3:
+		/* weeks - is this *really* necessary? */
+		setting *= 10080;
+		break;
+	default:
+		g_warning ("Time unit out of range");
+		break;
+	}
+
+	return g_strdup_printf ("%d", setting);
+}
+
+static void
+spin_changed (GtkSpinButton *spin, ESource *source)
+{
+	char *refresh_str;
+	GtkWidget *option;
+
+	option = g_object_get_data (G_OBJECT (spin), "option");
+
+	refresh_str = get_refresh_minutes ((GtkWidget *) spin, option);
+	e_source_set_property (source, "refresh", refresh_str);
+	g_free (refresh_str);
+}
+
+static void
+option_changed (GtkOptionMenu *option, ESource *source)
+{
+	char *refresh_str;
+	GtkWidget *spin;
+
+	spin = g_object_get_data (G_OBJECT (option), "spin");
+
+	refresh_str = get_refresh_minutes (spin, (GtkWidget *) option);
+	e_source_set_property (source, "refresh", refresh_str);
+	g_free (refresh_str);
+}
+
 GtkWidget *
 oge_caldav  (EPlugin                    *epl,
 	     EConfigHookItemFactoryData *data)
@@ -204,11 +299,13 @@
 	GtkWidget    *widget;
 	GtkWidget    *luser;
 	GtkWidget    *user;
+	GtkWidget    *label, *hbox, *spin, *option, *menu;
+	GtkWidget    *times[4];
 	char         *uri;
 	char         *username;
 	const char   *ssl_prop;
 	gboolean      ssl_enabled;
-	int           row;
+	int           row, i;
 
 	source = t->source;
 	group = e_source_peek_group (source);
@@ -230,10 +327,12 @@
 		return NULL;
 	}
 
-	username = euri->user;
+	g_free (euri->user);
 	euri->user = NULL;
 	uri = e_uri_to_string (euri, FALSE);
 
+	username = e_source_get_duped_property (source, "username");
+
 	ssl_prop = e_source_get_property (source, "ssl");
 	if (ssl_prop && ssl_prop[0] == '1') {
 		ssl_enabled = TRUE;
@@ -268,12 +367,14 @@
 			  G_CALLBACK (location_changed),
 			  source);
 
+	row++;
+
 	cssl = gtk_check_button_new_with_mnemonic (_("Use _SSL"));
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cssl), ssl_enabled);
 	gtk_widget_show (cssl);
 	gtk_table_attach (GTK_TABLE (parent),
 			  cssl, 1, 2,
-			  row + 1, row + 2,
+			  row , row + 1,
 			  GTK_FILL, 0, 0, 0);
 
 	g_signal_connect (G_OBJECT (cssl),
@@ -281,19 +382,21 @@
 			  G_CALLBACK (ssl_changed),
 			  source);
 
+	row++;
+
 	luser = gtk_label_new_with_mnemonic (_("User_name:"));
 	gtk_widget_show (luser);
 	gtk_misc_set_alignment (GTK_MISC (luser), 0.0, 0.5);
 	gtk_table_attach (GTK_TABLE (parent),
 			  luser, 0, 1,
-			  row + 2, row + 3,
+			  row, row + 1,
 			  GTK_FILL, 0, 0, 0);
 
 	user = gtk_entry_new ();
 	gtk_widget_show (user);
 	gtk_entry_set_text (GTK_ENTRY (user), username ? username : "");
 	gtk_table_attach (GTK_TABLE (parent), user,
-			  1, 2, row + 2, row + 3,
+			  1, 2, row, row + 1,
 			  GTK_EXPAND | GTK_FILL, 0, 0, 0);
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (luser), user);
@@ -303,10 +406,48 @@
 			  G_CALLBACK (user_changed),
 			  source);
 
+	row++;
 
         g_free (uri);
 	g_free (username);
 
+	/* add refresh option */
+	label = gtk_label_new_with_mnemonic (_("Re_fresh:"));
+	gtk_widget_show (label);
+	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+	gtk_table_attach (GTK_TABLE (parent), label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0);
+
+	hbox = gtk_hbox_new (FALSE, 6);
+	gtk_widget_show (hbox);
+
+	spin = gtk_spin_button_new_with_range (0, 100, 1);
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin);
+	gtk_widget_show (spin);
+	gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, TRUE, 0);
+
+	option = gtk_option_menu_new ();
+	gtk_widget_show (option);
+	times[0] = gtk_menu_item_new_with_label (_("minutes"));
+	times[1] = gtk_menu_item_new_with_label (_("hours"));
+	times[2] = gtk_menu_item_new_with_label (_("days"));
+	times[3] = gtk_menu_item_new_with_label (_("weeks"));
+	menu = gtk_menu_new ();
+	gtk_widget_show (menu);
+	for (i = 0; i < 4; i++) {
+		gtk_widget_show (times[i]);
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu), times[i]);
+	}
+	gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu);
+	set_refresh_time (source, spin, option);
+	gtk_box_pack_start (GTK_BOX (hbox), option, FALSE, TRUE, 0);
+
+	g_object_set_data (G_OBJECT (option), "spin", spin);
+	g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (option_changed), source);
+	g_object_set_data (G_OBJECT (spin), "option", option);
+	g_signal_connect (G_OBJECT (spin), "value-changed", G_CALLBACK (spin_changed), source);
+
+	gtk_table_attach (GTK_TABLE (parent), hbox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
+
 	return widget;
 }
 

Modified: branches/kill-bonobo/plugins/caldav/org-gnome-evolution-caldav.eplug.xml
==============================================================================
--- branches/kill-bonobo/plugins/caldav/org-gnome-evolution-caldav.eplug.xml	(original)
+++ branches/kill-bonobo/plugins/caldav/org-gnome-evolution-caldav.eplug.xml	Wed Dec 10 18:30:29 2008
@@ -17,7 +17,7 @@
 	     	   id="org.gnome.evolution.calendar.calendarProperties">
 		
 	     	 	<item type="item_table"
-		 		path="00.general/00.source/15.caldav"
+		 		path="00.general/00.source/99.caldav"
 		 		factory="oge_caldav"/>
             
             </group>

Modified: branches/kill-bonobo/plugins/calendar-weather/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/calendar-weather/Makefile.am	(original)
+++ branches/kill-bonobo/plugins/calendar-weather/Makefile.am	Wed Dec 10 18:30:29 2008
@@ -7,7 +7,8 @@
 	$(EVOLUTION_CALENDAR_CFLAGS)						\
 	$(SOURCE_SEL_CFLAGS)							\
 	-DWEATHER_DATADIR=\""$(weatherdatadir)"\"				\
-	-DWEATHER_EDS_DATADIR=\""$(eds_datadir)/weather"\"
+	-DWEATHER_EDS_DATADIR=\""$(eds_datadir)/weather"\"			\
+	$(LIBGWEATHER_CFLAGS)
 
 @EVO_PLUGIN_RULE@
 
@@ -24,12 +25,12 @@
 plugin_LTLIBRARIES = liborg-gnome-calendar-weather.la
 
 liborg_gnome_calendar_weather_la_SOURCES = calendar-weather.c
-liborg_gnome_calendar_weather_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
-liborg_gnome_calendar_weather_la_LIBADD =		\
+liborg_gnome_calendar_weather_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED) $(LIBGWEATHER_LIBS)
+liborg_gnome_calendar_weather_la_LIBADD =			\
 	$(top_builddir)/calendar/gui/libevolution-calendar.la	\
 	$(EVOLUTION_CALENDAR_LIBS)
 
-EXTRA_DIST =	\
+EXTRA_DIST =					\
 	org-gnome-calendar-weather.eplug.xml	\
 	$(weatherdata_DATA)
 

Modified: branches/kill-bonobo/plugins/calendar-weather/calendar-weather.c
==============================================================================
--- branches/kill-bonobo/plugins/calendar-weather/calendar-weather.c	(original)
+++ branches/kill-bonobo/plugins/calendar-weather/calendar-weather.c	Wed Dec 10 18:30:29 2008
@@ -21,6 +21,7 @@
 
 #include <gtk/gtk.h>
 #include <e-util/e-config.h>
+#include "e-util/e-icon-factory.h"
 #include <calendar/gui/e-cal-config.h>
 #include <calendar/gui/e-cal-event.h>
 #include <calendar/gui/calendar-component.h>
@@ -32,6 +33,11 @@
 #include <libxml/tree.h>
 #include <string.h>
 
+#define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
+#include <libgweather/weather.h>
+#include <libgweather/gweather-xml.h>
+#undef GWEATHER_I_KNOW_THIS_IS_UNSTABLE
+
 GtkWidget *e_calendar_weather_location (EPlugin *epl, EConfigHookItemFactoryData *data);
 GtkWidget *e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData *data);
 GtkWidget *e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data);
@@ -39,8 +45,6 @@
 void       e_calendar_weather_migrate (EPlugin *epl, ECalEventTargetComponent *data);
 int        e_plugin_lib_enable (EPluginLib *epl, int enable);
 
-static GtkTreeStore *store = NULL;
-
 #define WEATHER_BASE_URI "weather://"
 
 int
@@ -48,22 +52,44 @@
 {
 	GList *l;
 	gboolean found = FALSE;
+	const char *tmp;
+
+	static struct {
+		const char *description;
+		const char *icon_name;
+	} categories[] = {
+		{ N_("Weather: Fog"), 		"weather-fog" },
+		{ N_("Weather: Cloudy"), 	"weather-few-clouds" },
+		{ N_("Weather: Cloudy Night"),	"weather-few-clouds-night" },
+		{ N_("Weather: Overcast"),	"weather-overcast" },
+		{ N_("Weather: Showers"), 	"weather-showers" },
+		{ N_("Weather: Snow"), 		"weather-snow" },
+		{ N_("Weather: Sunny"), 	"weather-clear" },
+		{ N_("Weather: Clear Night"), 	"weather-clear-night" },
+		{ N_("Weather: Thunderstorms"), "weather-storm" },
+		{ NULL,				NULL }
+	};
+
+	tmp = _(categories [0].description);
 
 	/* Add the categories icons if we don't have them. */
 	for (l = e_categories_get_list (); l; l = g_list_next (l)) {
-		if (!strcmp ((const char *)l->data, _("Weather: Cloudy"))) {
+		if (!strcmp ((const char *)l->data, tmp)) {
 			found = TRUE;
 			break;
 		}
 	}
+
 	if (!found) {
-		e_categories_add (_("Weather: Cloudy"), NULL, WEATHER_DATADIR "/category_weather_cloudy_16.png", FALSE);
-		e_categories_add (_("Weather: Fog"), NULL, WEATHER_DATADIR "/category_weather_fog_16.png", FALSE);
-		e_categories_add (_("Weather: Partly Cloudy"), NULL, WEATHER_DATADIR "/category_weather_partly_cloudy_16.png", FALSE);
-		e_categories_add (_("Weather: Rain"), NULL, WEATHER_DATADIR "/category_weather_rain_16.png", FALSE);
-		e_categories_add (_("Weather: Snow"), NULL, WEATHER_DATADIR "/category_weather_snow_16.png", FALSE);
-		e_categories_add (_("Weather: Sunny"), NULL, WEATHER_DATADIR "/category_weather_sun_16.png", FALSE);
-		e_categories_add (_("Weather: Thunderstorms"), NULL, WEATHER_DATADIR "/category_weather_tstorm_16.png", FALSE);
+		int i;
+
+		for (i = 0; categories[i].description; i++) {
+			char *filename;
+
+			filename = e_icon_factory_get_icon_filename (categories[i].icon_name, E_ICON_SIZE_MENU);
+			e_categories_add (_(categories[i].description), NULL, filename, FALSE);
+			g_free (filename);
+		}
 	}
 
 	return 0;
@@ -110,87 +136,15 @@
 }
 
 static void
-parse_subtree (GtkTreeIter *parent, xmlNode *node)
-{
-	GtkTreeIter iter;
-	xmlNode *child;
-
-	if (node->type == XML_ELEMENT_NODE) {
-		gtk_tree_store_append (store, &iter, parent);
-		if (strcmp ((const char *)node->name, "location") == 0) {
-			xmlAttr *attr;
-
-			child = node->children;
-			g_assert (child->type == XML_TEXT_NODE);
-			gtk_tree_store_set (store, &iter, 0, child->content, -1);
-
-			for (attr = node->properties; attr; attr = attr->next) {
-				if (strcmp ((const char *)attr->name, "code") == 0)
-					gtk_tree_store_set (store, &iter, 1, attr->children->content, -1);
-				else if (strcmp ((const char *)attr->name, "url") == 0)
-					gtk_tree_store_set (store, &iter, 2, attr->children->content, -1);
-				else if (strcmp ((const char *)attr->name, "type") == 0)
-					gtk_tree_store_set (store, &iter, 3, attr->children->content, -1);
-			}
-		} else {
-			xmlAttr *attr;
-
-			for (child = node->children; child; child = child->next)
-				parse_subtree (&iter, child);
-
-			for (attr = node->properties; attr; attr = attr->next)
-				if (strcmp ((const char *)attr->name, "name") == 0)
-					gtk_tree_store_set (store, &iter, 0, attr->children->content, -1);
-		}
-	}
-}
-
-static void
-load_locations (void)
-{
-	xmlDoc *doc;
-	xmlNode *root, *child;
-
-	LIBXML_TEST_VERSION
-
-	doc = xmlParseFile (WEATHER_EDS_DATADIR "/Locations.xml");
-	if (doc == NULL) {
-		g_warning ("failed to read locations file");
-		return;
-	}
-
-	if (store == NULL)
-		store = gtk_tree_store_new (4,
-			G_TYPE_STRING,	/* name */
-			G_TYPE_STRING,	/* code */
-			G_TYPE_STRING,	/* URL  */
-			G_TYPE_STRING);	/* type */
-
-	root = xmlDocGetRootElement (doc);
-	for (child = root->children; child; child = child->next)
-		parse_subtree (NULL, child);
-	xmlFreeDoc (doc);
-}
-
-static void
 selection_changed (GtkTreeSelection *selection, GtkDialog *dialog)
 {
 	GtkTreeModel *model;
 	GtkTreeIter iter;
 
 	if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
-		gchar *code = NULL;
-		gtk_tree_model_get (model, &iter, 1, &code, -1);
-		if (code != NULL) {
-			gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, TRUE);
-		} else {
-			GtkTreeView *view = gtk_tree_selection_get_tree_view (selection);
-			GtkTreePath *path;
-			path = gtk_tree_model_get_path (model, &iter);
-			gtk_tree_view_expand_row (view, path, FALSE);
-			gtk_tree_path_free (path);
-			gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE);
-		}
+		WeatherLocation *loc = NULL;
+		gtk_tree_model_get (model, &iter, GWEATHER_XML_COL_POINTER, &loc, -1);
+		gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, loc != NULL);
 	} else {
 		gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE);
 	}
@@ -198,6 +152,7 @@
 
 static struct
 {
+	gboolean is_old;
 	gchar **ids;
 	GtkTreeIter *result;
 } find_data;
@@ -205,13 +160,13 @@
 static gboolean
 find_location_func (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *node, gpointer data)
 {
-	gchar *type, *code, *name;
-	gtk_tree_model_get (model, node, 0, &name, 1, &code, 3, &type, -1);
-	if (name == NULL || code == NULL || type == NULL)
+	WeatherLocation *wl = NULL;
+
+	gtk_tree_model_get (model, node, GWEATHER_XML_COL_POINTER, &wl, -1);
+	if (!wl || !wl->name || !wl->code)
 		return FALSE;
-	if ((!strcmp (type, find_data.ids[0])) &&
-	    (!strcmp (code, find_data.ids[1])) &&
-	    (!strcmp (name, find_data.ids[2]))) {
+	if (((!strcmp (wl->code, find_data.ids[0])) || (find_data.is_old && !strcmp (wl->code + 1, find_data.ids[0]))) &&
+	     (!strcmp (wl->name, find_data.ids[1]))) {
 		find_data.result = gtk_tree_iter_copy (node);
 		return TRUE;
 	}
@@ -219,12 +174,18 @@
 }
 
 static GtkTreeIter *
-find_location (gchar *relative_url)
+find_location (GtkTreeModel *model, gchar *relative_url)
 {
-	/* type/code/name */
+	/* old URL uses type/code/name, but new uses only code/name */
+	if (strncmp (relative_url, "ccf/", 4) == 0) {
+		relative_url = relative_url + 4;
+		find_data.is_old = TRUE;
+	} else
+		find_data.is_old = FALSE;
+
 	find_data.ids = g_strsplit (relative_url, "/", -1);
 	find_data.result = NULL;
-	gtk_tree_model_foreach (GTK_TREE_MODEL (store), (GtkTreeModelForeachFunc) find_location_func, NULL);
+	gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc) find_location_func, NULL);
 
 	g_strfreev (find_data.ids);
 	return find_data.result;
@@ -239,9 +200,9 @@
 		GtkTreeIter iter;
 
 		if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
-			gchar *code = NULL;
-			gtk_tree_model_get (model, &iter, 1, &code, -1);
-			if (code != NULL) {
+			WeatherLocation *wl = NULL;
+			gtk_tree_model_get (model, &iter, GWEATHER_XML_COL_POINTER, &wl, -1);
+			if (wl != NULL && wl->code != NULL && wl->name != NULL) {
 				gtk_dialog_response (dialog, GTK_RESPONSE_OK);
 				return TRUE;
 			}
@@ -250,6 +211,8 @@
 	return FALSE;
 }
 
+static GtkTreeModel *store = NULL;
+
 static GtkDialog *
 create_source_selector (ESource *source)
 {
@@ -274,7 +237,7 @@
 	scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
 	gtk_widget_show (scrolledwindow);
-	treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
+	treeview = gtk_tree_view_new_with_model (store);
 	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), FALSE);
 	gtk_widget_show (treeview);
 	gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwindow), treeview);
@@ -286,7 +249,7 @@
 	uri_text = e_source_get_uri (source);
 	uri = e_uri_new (uri_text);
 	if (uri->path && strlen (uri->path)) {
-		GtkTreeIter *iter = find_location (uri_text + 10);
+		GtkTreeIter *iter = find_location (store, uri_text + 10);
 		GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), iter);
 		gtk_tree_view_expand_to_path (GTK_TREE_VIEW (treeview), path);
 		gtk_tree_selection_select_path (selection, path);
@@ -317,11 +280,11 @@
 	GtkTreeIter parent;
 	gchar *path, *temp1, *temp2;
 
-	gtk_tree_model_get (GTK_TREE_MODEL (store), iter, 0, &temp1, -1);
+	gtk_tree_model_get (GTK_TREE_MODEL (store), iter, GWEATHER_XML_COL_LOC, &temp1, -1);
 	path = g_strdup (temp1);
 
 	while (gtk_tree_model_iter_parent (GTK_TREE_MODEL (store), &parent, iter)) {
-		gtk_tree_model_get (GTK_TREE_MODEL (store), &parent, 0, &temp1, -1);
+		gtk_tree_model_get (GTK_TREE_MODEL (store), &parent, GWEATHER_XML_COL_LOC, &temp1, -1);
 		temp2 = g_strdup_printf ("%s : %s", temp1, path);
 		g_free (path);
 		path = temp2;
@@ -347,17 +310,17 @@
 		GtkTreeModel *model;
 		GtkTreeIter iter;
 		GtkWidget *label;
-		gchar *type, *code, *name;
+		WeatherLocation *wl = NULL;
 		gchar *path, *uri;
 
 		gtk_tree_selection_get_selected (selection, &model, &iter);
-		gtk_tree_model_get (model, &iter, 0, &name, 1, &code, 3, &type, -1);
+		gtk_tree_model_get (model, &iter, GWEATHER_XML_COL_POINTER, &wl, -1);
 		path = build_location_path (&iter);
 
 		label = gtk_bin_get_child (GTK_BIN (button));
 		gtk_label_set_text (GTK_LABEL (label), path);
 
-		uri = g_strdup_printf ("%s/%s/%s", type, code, name);
+		uri = g_strdup_printf ("%s/%s", wl->code, wl->name);
 		/* FIXME - url_encode (&uri); */
 		e_source_set_relative_uri (source, uri);
 		g_free (uri);
@@ -387,7 +350,7 @@
 	static GtkWidget *hidden;
 
 	if (store == NULL)
-		load_locations ();
+		store = gweather_xml_load_locations ();
 
 	if (!hidden)
 		hidden = gtk_label_new ("");
@@ -416,7 +379,7 @@
 	gtk_widget_show (button);
 
 	if (uri->path && strlen (uri->path)) {
-		GtkTreeIter *iter = find_location (uri_text + 10);
+		GtkTreeIter *iter = find_location (store, uri_text + 10);
 		gchar *location = build_location_path (iter);
 		text = gtk_label_new (location);
 		g_free (location);

Modified: branches/kill-bonobo/plugins/exchange-operations/exchange-account-setup.c
==============================================================================
--- branches/kill-bonobo/plugins/exchange-operations/exchange-account-setup.c	(original)
+++ branches/kill-bonobo/plugins/exchange-operations/exchange-account-setup.c	Wed Dec 10 18:30:29 2008
@@ -181,6 +181,7 @@
 	const char *source_url;
 	char *message = NULL, *txt = NULL, *oof_message;
 	gboolean oof_state = FALSE;
+	gint offline_status;
 
 	GtkVBox *vbox_settings;
 
@@ -234,6 +235,14 @@
 
 	account = exchange_operations_get_exchange_account ();
 
+	exchange_config_listener_get_offline_status (exchange_global_config_listener,
+								    &offline_status);
+	if (offline_status == OFFLINE_MODE) {
+		e_error_run (NULL, ERROR_DOMAIN ":exchange-settings-offline", NULL);
+	
+		return NULL;
+	}	
+
 	oof_data = g_new0 (OOFData, 1);
 
 	oof_data->state = FALSE;
@@ -613,6 +622,30 @@
 	update_mailbox_param_in_url (target->account, E_ACCOUNT_TRANSPORT_URL, mailbox);
 }
 
+static void
+want_mailbox_toggled (GtkWidget *toggle, EConfig *config)
+{
+	GtkWidget *entry;
+
+	g_return_if_fail (toggle != NULL);
+	g_return_if_fail (config != NULL);
+
+	entry = g_object_get_data (G_OBJECT (toggle), "mailbox-entry");
+	if (entry) {
+		gboolean is_active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle));
+		EMConfigTargetAccount *target;
+		const char *mailbox;
+
+		gtk_widget_set_sensitive (entry, is_active);
+		
+		target = (EMConfigTargetAccount *)config->target;
+		mailbox = gtk_entry_get_text (GTK_ENTRY (entry));
+
+		update_mailbox_param_in_url (target->account, E_ACCOUNT_SOURCE_URL, is_active ? mailbox : NULL);
+		update_mailbox_param_in_url (target->account, E_ACCOUNT_TRANSPORT_URL, is_active ? mailbox : NULL);
+	}
+}
+
 static char *
 construct_owa_url (CamelURL *url)
 {
@@ -645,8 +678,8 @@
 {
 	EMConfigTargetAccount *target_account;
 	const char *source_url;
-	char *owa_url = NULL, *mailbox_name;
-	GtkWidget *owa_entry, *mailbox_entry;
+	char *owa_url = NULL, *mailbox_name, *username;
+	GtkWidget *owa_entry, *mailbox_entry, *want_mailbox_check;
 	CamelURL *url;
 	int row;
 	GtkWidget *hbox, *label, *button;
@@ -679,6 +712,7 @@
 
 	owa_url = g_strdup (camel_url_get_param(url, "owa_url"));
 	mailbox_name = g_strdup (camel_url_get_param (url, "mailbox"));
+	username = g_strdup (url->user);
 
 	/* if the host is null, then user+other info is dropped silently, force it to be kept */
 	if (url->host == NULL) {
@@ -740,6 +774,19 @@
 	owa_editor_entry_changed (owa_entry, data->config);
 
 	row++;
+	want_mailbox_check = gtk_check_button_new_with_mnemonic (_("S_pecify the mailbox name"));
+	gtk_widget_show (want_mailbox_check);
+	gtk_table_attach (GTK_TABLE (data->parent), want_mailbox_check, 1, 2, row, row+1, GTK_FILL, GTK_FILL, 0, 0);
+	if (!username || !*username || !mailbox_name || !*mailbox_name ||
+	    g_ascii_strcasecmp (username, mailbox_name) == 0 ||
+	    (strchr (username, '/') && g_ascii_strcasecmp (strchr (username, '/') + 1, mailbox_name) == 0)) {
+		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (want_mailbox_check), FALSE);
+	} else {
+		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (want_mailbox_check), TRUE);
+	}
+	g_signal_connect (want_mailbox_check, "toggled", G_CALLBACK (want_mailbox_toggled), data->config);
+
+	row++;
 	label = gtk_label_new_with_mnemonic (_("_Mailbox:"));
 	gtk_widget_show (label);
 
@@ -750,14 +797,18 @@
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (label), mailbox_entry);
 
+	gtk_widget_set_sensitive (mailbox_entry, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (want_mailbox_check)));
+
 	g_signal_connect (mailbox_entry, "changed", G_CALLBACK (mailbox_editor_entry_changed), data->config);
 	g_object_set_data (G_OBJECT (button), "mailbox-entry", mailbox_entry);
+	g_object_set_data (G_OBJECT (want_mailbox_check), "mailbox-entry", mailbox_entry);
 
 	gtk_table_attach (GTK_TABLE (data->parent), label, 0, 1, row, row+1, 0, 0, 0, 0);
 	gtk_table_attach (GTK_TABLE (data->parent), mailbox_entry, 1, 2, row, row+1, GTK_FILL|GTK_EXPAND, GTK_FILL, 0, 0);
 
 	g_free (owa_url);
 	g_free (mailbox_name);
+	g_free (username);
 
 	return hbox;
 }
@@ -815,7 +866,8 @@
 {
 	if (oof_data->message)
 		g_free (oof_data->message);
-	g_free (oof_data);
+	if (oof_data)
+		g_free (oof_data);
 }
 
 void
@@ -824,6 +876,7 @@
 	EMConfigTargetAccount *target_account;
 	const char *source_url;
 	CamelURL *url;
+	gint offline_status;
 
 	target_account = (EMConfigTargetAccount *)data->config->target;
 	source_url = e_account_get_string (target_account->account,  E_ACCOUNT_SOURCE_URL);
@@ -844,6 +897,14 @@
 	}
 
 	camel_url_free (url);
+	
+	exchange_config_listener_get_offline_status (exchange_global_config_listener,
+								    &offline_status);
+	
+	if (offline_status == OFFLINE_MODE) {
+                return;
+	}
+	
 	/* Set oof data in exchange account */
 	set_oof_info ();
 	destroy_oof_data ();

Modified: branches/kill-bonobo/plugins/exchange-operations/org-gnome-exchange-operations.error.xml
==============================================================================
--- branches/kill-bonobo/plugins/exchange-operations/org-gnome-exchange-operations.error.xml	(original)
+++ branches/kill-bonobo/plugins/exchange-operations/org-gnome-exchange-operations.error.xml	Wed Dec 10 18:30:29 2008
@@ -48,6 +48,11 @@
   <_secondary>Cannot display folders.</_secondary>
  </error>
 
+ <error id="exchange-settings-offline" type="info">
+  <_primary>Exchange Account is offline.</_primary>
+  <_secondary>Cannot access the "Exchange settings" tab in offline mode.</_secondary>
+ </error>
+
  <error id="account-offline-generic" type="info">
   <_primary>Exchange Account is offline.</_primary>
   <_secondary>Cannot perform the operation.</_secondary>

Modified: branches/kill-bonobo/plugins/itip-formatter/itip-formatter.c
==============================================================================
--- branches/kill-bonobo/plugins/itip-formatter/itip-formatter.c	(original)
+++ branches/kill-bonobo/plugins/itip-formatter/itip-formatter.c	Wed Dec 10 18:30:29 2008
@@ -1186,6 +1186,26 @@
 
 }
 
+static void 
+update_x (ECalComponent *pitip_comp, ECalComponent *comp) 
+{
+	icalcomponent *itip_icalcomp = e_cal_component_get_icalcomponent (pitip_comp);
+	icalcomponent *icalcomp = e_cal_component_get_icalcomponent (comp);
+
+	icalproperty *prop = icalcomponent_get_first_property (itip_icalcomp, ICAL_X_PROPERTY);
+	while (prop) {
+		const char *name = icalproperty_get_x_name (prop);
+		if (!g_ascii_strcasecmp (name, "X-EVOLUTION-IS-REPLY")) {
+			icalproperty *new_prop = icalproperty_new_x (icalproperty_get_x (prop));
+			icalproperty_set_x_name (new_prop, "X-EVOLUTION-IS-REPLY");
+			icalcomponent_add_property (icalcomp, new_prop);
+		}
+		prop = icalcomponent_get_next_property (itip_icalcomp, ICAL_X_PROPERTY);
+	}
+
+	e_cal_component_set_icalcomponent (comp, icalcomp);
+}
+
 static void
 update_attendee_status (struct _itip_puri *pitip)
 {
@@ -1286,6 +1306,8 @@
 			}
 		}
 
+		update_x (pitip->comp, comp);
+
 		if (itip_view_get_update (ITIP_VIEW (pitip->view))) {
 			e_cal_component_commit_sequence (comp);
 			itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, pitip->current_ecal, NULL, NULL, NULL);

Modified: branches/kill-bonobo/plugins/mailing-list-actions/org-gnome-mailing-list-actions.error.xml
==============================================================================
--- branches/kill-bonobo/plugins/mailing-list-actions/org-gnome-mailing-list-actions.error.xml	(original)
+++ branches/kill-bonobo/plugins/mailing-list-actions/org-gnome-mailing-list-actions.error.xml	Wed Dec 10 18:30:29 2008
@@ -30,7 +30,7 @@
 
  <error id="no-action" type="error">
   <_primary>No e-mail action</_primary>
-  <_secondary xml:space="preserve">The action could not be performed. This means the header for this action did not contain any action we could process.
+  <_secondary xml:space="preserve">The action could not be performed. The header for this action did not contain any action that could be processed.
 
 Header: {0}</_secondary>
  </error>

Modified: branches/kill-bonobo/plugins/sa-junk-plugin/em-junk-filter.c
==============================================================================
--- branches/kill-bonobo/plugins/sa-junk-plugin/em-junk-filter.c	(original)
+++ branches/kill-bonobo/plugins/sa-junk-plugin/em-junk-filter.c	Wed Dec 10 18:30:29 2008
@@ -250,7 +250,7 @@
 		else
 			res = rv_err;
 
-		if (res != 0)
+		if (res >= 64)
 			g_set_error (error, EM_JUNK_ERROR, res, _("Pipe to SpamAssassin failed, error code: %d"), res);
 
 		return res;

Modified: branches/kill-bonobo/shell/main.c
==============================================================================
--- branches/kill-bonobo/shell/main.c	(original)
+++ branches/kill-bonobo/shell/main.c	Wed Dec 10 18:30:29 2008
@@ -643,6 +643,7 @@
 		exit (0);
 
 	gnome_sound_init ("localhost");
+	gtk_accel_map_load (e_get_accels_filename ());
 
 	if (!disable_eplugin) {
 		e_plugin_register_type (e_plugin_lib_get_type ());
@@ -677,6 +678,8 @@
 
 	gtk_main ();
 
+	gtk_accel_map_save (e_get_accels_filename ());
+
 	e_icon_factory_shutdown ();
 	g_object_unref (program);
 	gnome_sound_shutdown ();

Modified: branches/kill-bonobo/widgets/misc/e-attachment-bar.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-attachment-bar.c	(original)
+++ branches/kill-bonobo/widgets/misc/e-attachment-bar.c	Wed Dec 10 18:30:29 2008
@@ -1001,7 +1001,8 @@
 
 	if (E_IS_ATTACHMENT_BAR (bar) && event->type == GDK_2BUTTON_PRESS) {
 		p = e_attachment_bar_get_selected (bar);
-		if (p && p->next == NULL) {
+		/* check if has body already, remote files can take longer to fetch */
+		if (p && p->next == NULL && ((EAttachment *)p->data)->body) {
 			attachment = p->data;
 
 			/* Check if the file is stored already */

Modified: branches/kill-bonobo/widgets/misc/e-send-options.glade
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-send-options.glade	(original)
+++ branches/kill-bonobo/widgets/misc/e-send-options.glade	Wed Dec 10 18:30:29 2008
@@ -220,7 +220,7 @@
 				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 				  <property name="snap_to_ticks">False</property>
 				  <property name="wrap">False</property>
-				  <property name="adjustment">5 0 100 1 10 10</property>
+				  <property name="adjustment">5 0 100 1 10 0</property>
 				</widget>
 				<packing>
 				  <property name="left_attach">1</property>
@@ -450,7 +450,7 @@
 				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 				  <property name="snap_to_ticks">False</property>
 				  <property name="wrap">False</property>
-				  <property name="adjustment">2 0 100 1 10 10</property>
+				  <property name="adjustment">2 0 100 1 10 0</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>

Modified: branches/kill-bonobo/widgets/table/e-cell-text.c
==============================================================================
--- branches/kill-bonobo/widgets/table/e-cell-text.c	(original)
+++ branches/kill-bonobo/widgets/table/e-cell-text.c	Wed Dec 10 18:30:29 2008
@@ -612,21 +612,8 @@
 	pango_layout_set_width (layout, width * PANGO_SCALE);
 	pango_layout_set_wrap (layout, PANGO_WRAP_CHAR);
 
-	if (pango_layout_get_line_count (layout) > 1) {
-		PangoLayoutLine *line = pango_layout_get_line (layout, 0);
-		gchar *line_text = g_strdup (pango_layout_get_text (layout));
-		gchar *last_char = g_utf8_find_prev_char (line_text, line_text + line->length - 1);
-		while (last_char && pango_layout_get_line_count (layout) > 1) {
-			gchar *new_text;
-			last_char = g_utf8_find_prev_char (line_text, last_char);
-			if (last_char)
-				*last_char = '\0';
-			new_text = g_strconcat (line_text, "...", NULL);
-			pango_layout_set_text (layout, new_text, -1);
-			g_free (new_text);
-		}
-		g_free (line_text);
-	}
+	pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
+	pango_layout_set_height (layout, 0);
 
 	switch (ect->justify) {
 	case GTK_JUSTIFY_RIGHT:



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