Index: calendar/gui/GNOME_Evolution_Calendar.server.in.in
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/GNOME_Evolution_Calendar.server.in.in,v
retrieving revision 1.15
diff -u -r1.15 GNOME_Evolution_Calendar.server.in.in
--- calendar/gui/GNOME_Evolution_Calendar.server.in.in	26 Aug 2004 16:16:53 -0000	1.15
+++ calendar/gui/GNOME_Evolution_Calendar.server.in.in	27 Dec 2004 08:56:57 -0000
@@ -48,6 +50,11 @@
 	<oaf_attribute name="evolution:button_label" type="string" _value="Calendars"/>
         <oaf_attribute name="evolution:button_icon" type="string" value="stock_calendar"/>
 	<oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/>
+
+        <oaf_attribute name="evolution:uri_schemas" type="stringv">
+          <item value="date"/>
+        </oaf_attribute>
+
 </oaf_server>
 
 <oaf_server iid="OAFIID:GNOME_Evolution_Tasks_Component:@VERSION@"
@@ -67,6 +74,11 @@
 	<oaf_attribute name="evolution:button_label" type="string" _value="Tasks"/>
         <oaf_attribute name="evolution:button_icon" type="string" value="stock_todo"/>
 	<oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/>
+
+        <oaf_attribute name="evolution:uri_schemas" type="stringv">
+          <item value="task"/>
+        </oaf_attribute>
+
 </oaf_server>
 
 <oaf_server iid="OAFIID:GNOME_Evolution_Calendar_CompEditorFactory:@VERSION@"
Index: calendar/gui/calendar-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-component.c,v
retrieving revision 1.192
diff -u -r1.192 calendar-component.c
--- calendar/gui/calendar-component.c	22 Dec 2004 07:37:25 -0000	1.192
+++ calendar/gui/calendar-component.c	27 Dec 2004 08:56:58 -0000
@@ -1303,6 +1306,45 @@
 		bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed);
 }
 
+static void
+impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environment *ev)
+{
+	CalendarComponent *calendar_component = CALENDAR_COMPONENT (bonobo_object_from_servant (servant));
+	CalendarComponentView *component_view;
+	
+	GDate* uri_date;
+	struct icaltimetype tt = icaltime_null_time ();
+	time_t et;
+	GList *l;
+	
+	g_return_if_fail (calendar_component->priv);
+	g_return_if_fail (calendar_component->priv->views);
+	
+	for (l = calendar_component->priv->views; l->next != NULL; l = l->next);
+	
+	g_return_if_fail (l->data);
+	
+	component_view =  (CalendarComponentView *)(l->data);
+	
+	if (!strncmp (uri, "date:", strlen ("date:"))) {
+
+	        uri_date = g_date_new ();
+		g_date_set_parse (uri_date, uri + strlen ("date:"));
+		
+		if (g_date_valid (uri_date)) {
+
+			tt.year = g_date_year (uri_date);
+			tt.month = g_date_month (uri_date);
+			tt.day = g_date_day (uri_date);
+			et = icaltime_as_timet_with_zone (tt, gnome_calendar_get_timezone (component_view->calendar));
+	
+			gnome_calendar_goto (component_view->calendar, et);
+		}
+
+		g_date_free (uri_date);
+	} 
+}
+
 /* GObject methods.  */
 
 static void
@@ -1375,6 +1417,7 @@
 	epv->createControls          = impl_createControls;
 	epv->_get_userCreatableItems = impl__get_userCreatableItems;
 	epv->requestCreateItem       = impl_requestCreateItem;
+	epv->handleURI               = impl_handleURI;
 
 	object_class->dispose  = impl_dispose;
 	object_class->finalize = impl_finalize;
Index: calendar/gui/comp-util.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/comp-util.c,v
retrieving revision 1.26
diff -u -r1.26 comp-util.c
--- calendar/gui/comp-util.c	16 Jul 2004 14:30:49 -0000	1.26
+++ calendar/gui/comp-util.c	27 Dec 2004 08:56:58 -0000
@@ -368,12 +368,5 @@
 		return NULL;
 	}
 
-	comp = e_cal_component_new ();
-	if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
-		g_object_unref (comp);
-		icalcomponent_free (icalcomp);
-		return NULL;
-	}
-
 	return comp;
 }
Index: calendar/gui/tasks-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-component.c,v
retrieving revision 1.82
diff -u -r1.82 tasks-component.c
--- calendar/gui/tasks-component.c	22 Dec 2004 07:37:25 -0000	1.82
+++ calendar/gui/tasks-component.c	27 Dec 2004 08:56:58 -0000
@@ -1020,6 +1037,46 @@
 	*corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (component_view->statusbar_control), ev);
 }
 
+static void
+impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environment *ev)
+{
+	TasksComponent *task_component = TASKS_COMPONENT (bonobo_object_from_servant (servant));
+
+    	ECal *ecal;
+	icalcomponent *icalcomp;
+	ECalComponent *comp;
+	TaskEditor *editor;
+	
+
+	if (!strncmp (uri, "task:", strlen("task:"))) {
+
+		ecal = setup_create_ecal (task_component, NULL);
+		if (!ecal) return;
+
+		editor = task_editor_new (ecal);
+                
+		comp = e_cal_component_new ();
+		e_cal_get_object (ecal, uri + strlen("task:"), NULL, &icalcomp, NULL);
+		
+		if (icalcomp == NULL) {
+			g_object_unref (comp);
+			return;
+		}
+
+		if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
+			g_object_unref (comp);
+			icalcomponent_free (icalcomp);
+			return;
+		}
+
+		comp_editor_edit_comp (COMP_EDITOR (editor), comp);
+		comp_editor_focus (COMP_EDITOR (editor));
+		e_comp_editor_registry_add (comp_editor_registry, COMP_EDITOR (editor), TRUE);
+	} 
+
+	return;
+}
+
 static GNOME_Evolution_CreatableItemTypeList *
 impl__get_userCreatableItems (PortableServer_Servant servant,
 			      CORBA_Environment *ev)
@@ -1154,6 +1211,7 @@
 	epv->createControls          = impl_createControls;
 	epv->_get_userCreatableItems = impl__get_userCreatableItems;
 	epv->requestCreateItem       = impl_requestCreateItem;
+	epv->handleURI               = impl_handleURI;
 
 	object_class->dispose = impl_dispose;
 	object_class->finalize = impl_finalize;
Index: shell/main.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/main.c,v
retrieving revision 1.164
diff -u -r1.164 main.c
--- shell/main.c	8 Dec 2004 01:58:27 -0000	1.164
+++ shell/main.c	27 Dec 2004 08:56:58 -0000
@@ -388,15 +377,13 @@
 		open_uris (corba_shell, uri_list);
 	} else {
 		CORBA_Environment ev;
-
 		CORBA_exception_init (&ev);
+
+		if (default_component_id != NULL)
+			GNOME_Evolution_Shell_createNewWindow (corba_shell, default_component_id, &ev);
+
 		if (uri_list != NULL)
 			open_uris (corba_shell, uri_list);
-		else
-			if (default_component_id == NULL)
-				GNOME_Evolution_Shell_createNewWindow (corba_shell, "", &ev);
-			else
-				GNOME_Evolution_Shell_createNewWindow (corba_shell, default_component_id, &ev);
 
 		CORBA_exception_free (&ev);
 	}
