clock2/clockui/uilayer/clockalarmeditor/src/clockalarmeditorimpl.cpp
branchRCL_3
changeset 48 bf573002ff72
parent 30 d68a4b5d5885
child 59 aba12c885d83
--- a/clock2/clockui/uilayer/clockalarmeditor/src/clockalarmeditorimpl.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/clock2/clockui/uilayer/clockalarmeditor/src/clockalarmeditorimpl.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -43,6 +43,7 @@
 
 // Constants
 const TInt KZerothDay( 0 );
+const TInt KNextDayIndex( 1 );
 const TInt KDaysInWeek( 7 );
 const TInt KFirstLine( 1 );
 const TInt KRepeatOnceIndex( 0 );
@@ -410,8 +411,7 @@
     
     // We don't display the alarm day selection item for repeated alarms of type daily, next 24 hours and
     // workdays. So when this functions is called, we check for the type and update the form accordingly.
-    if( KDailyIndex == iOccuranceIndex ||
-        KWorkdaysIndex == iOccuranceIndex )
+    if( KWeeklyIndex != iOccuranceIndex )
         {
         DeleteAlmDayCtrlL();
         }
@@ -666,8 +666,7 @@
     
     // We don't display the alarm day selection item for repeated alarms of type daily, next 24 hours and
     // workdays. So when this functions is called, we check for the type and update the form accordingly.
-    if( KDailyIndex == iOccuranceIndex ||
-        KWorkdaysIndex == iOccuranceIndex )
+    if( KWeeklyIndex != iOccuranceIndex )
         {
         DeleteAlmDayCtrlL();
         }
@@ -952,8 +951,7 @@
     // Get the current day of the week.
     TInt currentDay( aHomeTime.DayNoInWeek() );
         
-    if( ( KRepeatOnceIndex == iOccuranceIndex ) ||
-        ( KWeeklyIndex == iOccuranceIndex ) )
+    if( KWeeklyIndex == iOccuranceIndex )
         {
         TInt dateOffset( KZerothDay );
 
@@ -980,6 +978,13 @@
             }
         aTimeFromForm += TTimeIntervalDays( dateOffset );
         }
+        else if( KRepeatOnceIndex == iOccuranceIndex )  
+            {            
+            if( aTimeFromForm < aHomeTime )
+                {                  
+                aTimeFromForm += TTimeIntervalDays( KNextDayIndex );
+                }            
+            }
     __PRINTS( "CClockAlarmEditorImpl::GetActualAlarmTime - Exit" );
     }