[f-spot: 2/8] Change the Date on Calendar selection



commit 68a809934761f4145351d55fd2681999c64d11e8
Author: Stephane Delcroix <stephane delcroix org>
Date:   Wed Apr 29 16:54:57 2009 +0200

    Change the Date on Calendar selection
---
 src/Widgets/DateEdit.cs |   33 +++++++++++++++++----------------
 1 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/src/Widgets/DateEdit.cs b/src/Widgets/DateEdit.cs
index b47123f..e9dc84c 100644
--- a/src/Widgets/DateEdit.cs
+++ b/src/Widgets/DateEdit.cs
@@ -201,7 +201,7 @@ namespace FSpot.Widgets
 
 		void HandleCalendarDaySelected (object sender, EventArgs e)
 		{
-			//Set the date
+			DateTimeOffset += (calendar.Date - DateTimeOffset.Date);
 		}
 
 		void HandleCalendarDaySelectedDoubleClick (object sender, EventArgs e)
@@ -209,6 +209,22 @@ namespace FSpot.Widgets
 			HidePopup ();
 		}
 
+		void HandlePopupButtonPressed (object sender, ButtonPressEventArgs e)
+		{
+			var child = Global.GetEventWidget (e.Event);
+			if (child != calendar_popup) {
+				while (child != null) {
+					if (child == calendar_popup) {
+						e.RetVal = false;
+						return;
+					}
+					child = child.Parent;
+				}
+			}
+			HidePopup ();
+			e.RetVal = true;
+		}
+
 		void HandlePopupDeleted (object sender, DeleteEventArgs e)
 		{
 			HidePopup ();
@@ -225,21 +241,6 @@ namespace FSpot.Widgets
 			e.RetVal = true;
 		}
 
-		void HandlePopupButtonPressed (object sender, ButtonPressEventArgs e)
-		{
-			var child = Global.GetEventWidget (e.Event);
-			if (child != calendar_popup) {
-				while (child != null) {
-					if (child == calendar_popup) {
-						e.RetVal = false;
-						return;
-					}
-					child = child.Parent;
-				}
-			}
-			HidePopup ();
-			e.RetVal = true;
-		}
 #endregion
 
 #region Test App



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