[evolution-patches] a patch on making an empty new event



Dear Rodrigo,

I make a new patch on making an empty new event. Would you please help me review it?

   Thanks.

Best Regards
Alfred Peng
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2283
diff -u -r1.2283 ChangeLog
--- ChangeLog	29 Apr 2004 02:29:57 -0000	1.2283
+++ ChangeLog	29 Apr 2004 11:57:11 -0000
@@ -1,3 +1,11 @@
+2004-04-29  Alfred Peng  <alfred peng sun com>
+
+	* gui/comp-editor-factory.c (edit_new):
+	* gui/gnome-cal.c (gnome_calendar_new_appointment_for),
+	(gnome_calendar_new_task):
+	Mark the "changed" flag when making a new event. So the event
+	can be saved.
+
 2004-04-29  Not Zed  <NotZed Ximian com>
 
 	* gui/e-itip-control.c (e_itip_control_set_data): check we find
Index: gui/comp-editor-factory.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/comp-editor-factory.c,v
retrieving revision 1.35
diff -u -r1.35 comp-editor-factory.c
--- gui/comp-editor-factory.c	6 Feb 2004 03:03:41 -0000	1.35
+++ gui/comp-editor-factory.c	29 Apr 2004 11:57:11 -0000
@@ -312,6 +312,7 @@
 	case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT:
 	case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_MEETING:
 		editor = COMP_EDITOR (event_editor_new (oc->client));
+		comp_editor_set_changed (editor, TRUE);
 		comp = cal_comp_event_new_with_current_time (oc->client, FALSE);
 		break;
 	case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_ALLDAY_EVENT:
@@ -320,6 +321,7 @@
 		break;
 	case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_TODO:
 		editor = COMP_EDITOR (task_editor_new (oc->client));
+		comp_editor_set_changed (editor, TRUE);
 		comp = get_default_task (oc->client);
 		break;
 	default:
Index: gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.43
diff -u -r1.43 e-calendar-view.c
--- gui/e-calendar-view.c	29 Mar 2004 06:16:46 -0000	1.43
+++ gui/e-calendar-view.c	29 Apr 2004 11:57:12 -0000
@@ -1444,6 +1444,8 @@
 	ECalComponent *comp;
 	icalcomponent *icalcomp;
 	ECalComponentTransparency transparency;
+	CompEditor *editor;
+	const char *uid;
 
 	g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
 
@@ -1494,6 +1496,11 @@
 				     e_cal_model_get_default_client (priv->model),
 				     icalcomp, meeting);
 
+	e_cal_component_get_uid (comp, &uid);
+	editor = e_comp_editor_registry_find (comp_editor_registry, uid);
+	if (editor)
+		comp_editor_set_changed (editor, TRUE);
+
 	g_object_unref (comp);
 }
 
Index: gui/gnome-cal.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/gnome-cal.c,v
retrieving revision 1.313
diff -u -r1.313 gnome-cal.c
--- gui/gnome-cal.c	26 Mar 2004 20:38:03 -0000	1.313
+++ gui/gnome-cal.c	29 Apr 2004 11:57:13 -0000
@@ -2258,6 +2258,7 @@
 
 	ecal = e_cal_model_get_default_client (e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)));
 	tedit = task_editor_new (ecal);
+	comp_editor_set_changed (COMP_EDITOR (tedit), TRUE);
 
 	icalcomp = e_cal_model_create_component_with_defaults (e_calendar_view_get_model (E_CALENDAR_VIEW (priv->week_view)));
 	comp = e_cal_component_new ();


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