[evolution-patches] [Calendar] Fix for Bug # 216535



Hi
Worked on " Bug 216535: changing start time should keep appointment's
time length "

Please review

Thanks
Johnny
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2874
diff -u -p -r1.2874 ChangeLog
--- calendar/ChangeLog	15 Dec 2005 17:38:03 -0000	1.2874
+++ calendar/ChangeLog	17 Dec 2005 09:44:41 -0000
@@ -1,3 +1,10 @@
+2005-12-17  Johnny Jacob  <johnnyjacob gmail com>
+
+	* gui/dialogs/event-page.c (end_date_changed_cb ): Added. Signal
+	handler for end_time.
+	(start_date_changed_cb) : Added. Changes the end_time according to 
+	the duration.
+
 2005-12-15  Srinivasa Ragavan  <sragavan novell com>
 
 	* gui/e-week-view.c: (e_week_view_reshape_event_span),
Index: calendar/gui/dialogs/event-page.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/event-page.c,v
retrieving revision 1.95
diff -u -p -r1.95 event-page.c
--- calendar/gui/dialogs/event-page.c	15 Dec 2005 07:46:25 -0000	1.95
+++ calendar/gui/dialogs/event-page.c	17 Dec 2005 09:45:47 -0000
@@ -2424,19 +2424,33 @@ times_updated (EventPage *epage, gboolea
 	notify_dates_changed (epage, &start_tt, &end_tt);
 }
 
-/* Callback used when the start or end date widgets change.  We check that the
+/* Callback used when the start date widget change.  We check that the
  * start date < end date and we set the "all day event" button as appropriate.
  */
 static void
-date_changed_cb (GtkWidget *dedit, gpointer data)
+start_date_changed_cb (GtkWidget *dedit, gpointer data)
 {
 	EventPage *epage;
 	
 	epage = EVENT_PAGE (data);
 
-	times_updated (epage, dedit == epage->priv->start_time);
+	hour_minute_changed (epage);
+
+	times_updated (epage, TRUE);
 }
 
+/* Callback used when the end date widget change.  We check that the
+ * start date < end date and we set the "all day event" button as appropriate.
+ */
+static void
+end_date_changed_cb (GtkWidget *dedit, gpointer data)
+{
+	EventPage *epage;
+	
+	epage = EVENT_PAGE (data);
+
+	times_updated (epage, FALSE);
+}
 
 /* Callback used when the start timezone is changed. If sync_timezones is set,
  * we set the end timezone to the same value. It also updates the start time
@@ -2727,9 +2741,9 @@ init_widgets (EventPage *epage)
 
 	/* Start and end times */
 	g_signal_connect((priv->start_time), "changed",
-			    G_CALLBACK (date_changed_cb), epage);
+			    G_CALLBACK (start_date_changed_cb), epage);
 	g_signal_connect((priv->end_time), "changed",
-			    G_CALLBACK (date_changed_cb), epage);
+			    G_CALLBACK (end_date_changed_cb), epage);
 
 	/* Categories */
 	g_signal_connect((priv->categories_btn), "clicked",



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