Revision: 201007 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 12 Mar 2010 15:42:12 +0200
branchRCL_3
changeset 8 41042d2af523
parent 4 3c271c9e6618
child 9 91123d004e8f
Revision: 201007 Kit: 201008
basiclocationinfodisplay/blid/engine/src/CBlidLocation.cpp
basiclocationinfodisplay/blid/ui/data/Blid.rss
basiclocationinfodisplay/blid/ui/inc/CBlidCurrentPositionDlg.h
basiclocationinfodisplay/blid/ui/inc/CBlidMainControl.h
basiclocationinfodisplay/blid/ui/src/CBlidAppUi.cpp
basiclocationinfodisplay/blid/ui/src/CBlidCurrentPositionDlg.cpp
basiclocationinfodisplay/blid/ui/src/CBlidMainControl.cpp
eventsui/eventseditor/inc/evteditor.h
eventsui/eventseditor/src/evteditor.cpp
landmarksui/uicontrols/src/CLmkAppLmSelectorImpl.cpp
--- a/basiclocationinfodisplay/blid/engine/src/CBlidLocation.cpp	Fri Feb 19 22:45:00 2010 +0200
+++ b/basiclocationinfodisplay/blid/engine/src/CBlidLocation.cpp	Fri Mar 12 15:42:12 2010 +0200
@@ -358,6 +358,7 @@
             }
         case KPositionPartialUpdate: // Incomplete position information   
             {
+ 
             TTime now;
             now.UniversalTime();
             TTimeIntervalSeconds secondsSinceLastGoodFix;
--- a/basiclocationinfodisplay/blid/ui/data/Blid.rss	Fri Feb 19 22:45:00 2010 +0200
+++ b/basiclocationinfodisplay/blid/ui/data/Blid.rss	Fri Mar 12 15:42:12 2010 +0200
@@ -1968,6 +1968,29 @@
             }
         };
     }
+
+//----------------------------------------------------
+//   
+//    r_blid_infopopup_softkeys__exit
+//    Accessory Required
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_blid_infopopup_softkeys_exit
+    {
+    buttons =
+        {
+        CBA_BUTTON 
+            {
+
+            },
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyExit; 
+            txt = text_softkey_exit; 
+            }
+        };
+    }
     
         
 //----------------------------------------------------
--- a/basiclocationinfodisplay/blid/ui/inc/CBlidCurrentPositionDlg.h	Fri Feb 19 22:45:00 2010 +0200
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidCurrentPositionDlg.h	Fri Mar 12 15:42:12 2010 +0200
@@ -74,12 +74,10 @@
         /**
          * By default Symbian 2nd phase constructor is private.
          */
-        void ConstructL();
+		void ConstructL();
 
 		void ProcessCommandL(TInt aCommandId);
 		
-		void HandlePointerEventL(const TPointerEvent& aPointerEvent);
-
     private: // data members
         /// Own: default selection listbox
         CAknSingleHeadingPopupMenuStyleListBox* iListBox;
--- a/basiclocationinfodisplay/blid/ui/inc/CBlidMainControl.h	Fri Feb 19 22:45:00 2010 +0200
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidMainControl.h	Fri Mar 12 15:42:12 2010 +0200
@@ -227,6 +227,7 @@
         CAlfImageVisual* iAnimationVisual;
 	    TRect iAnimationRect;
 	    RPointerArray<CAlfTexture> iTextures;
+	    TBool isAccessoryRequired;
 	    
 	public:        
         CAknMessageQueryDialog*		iDialog;
--- a/basiclocationinfodisplay/blid/ui/src/CBlidAppUi.cpp	Fri Feb 19 22:45:00 2010 +0200
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidAppUi.cpp	Fri Mar 12 15:42:12 2010 +0200
@@ -316,14 +316,6 @@
                             EBlidNavigationView)));
             view->GetControl()->StopPlayerL();
             }
-        if (engine->LocationModel()->GetRegisteredViewId()
-                == EBlidNavigationView)
-            {
-            CBlidNavigationView* view =
-                    static_cast<CBlidNavigationView*> (View(TUid::Uid(
-                            EBlidNavigationView)));
-            view->GetControl()->StopPlayerL();
-            }
         }
 
     if (iSatelliteInfo)
--- a/basiclocationinfodisplay/blid/ui/src/CBlidCurrentPositionDlg.cpp	Fri Feb 19 22:45:00 2010 +0200
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidCurrentPositionDlg.cpp	Fri Mar 12 15:42:12 2010 +0200
@@ -146,30 +146,6 @@
     }
     
 // ---------------------------------------------------------
-// CBlidCurrentPositionDlg::HandlePointerEventL
-// ---------------------------------------------------------
-//    
-void CBlidCurrentPositionDlg::HandlePointerEventL(const TPointerEvent& aPointerEvent)
-    {
-    if ( AknLayoutUtils::PenEnabled() )
-        {
-        if( aPointerEvent.iPosition.iX > 0 && aPointerEvent.iPosition.iY > 0 )
-	        {
-	        if( iLoc->IsGPSDataAvailable() && !isLmSaved )
-		        {
-		        if( aPointerEvent.iType == TPointerEvent::EButton1Down )
-			        {
-			        isLmSaved = ETrue;
-			        iView.SaveCurrentPositionL();
-			        isLmSaved = EFalse;	
-			        }
-		        }
-	        }
-		CAknPopupList::HandlePointerEventL( aPointerEvent );	        
-        }
-    }
-    
-// ---------------------------------------------------------
 // CBlidCurrentPositionDlg::ChangeDlgSoftKey
 // ---------------------------------------------------------
 //    
--- a/basiclocationinfodisplay/blid/ui/src/CBlidMainControl.cpp	Fri Feb 19 22:45:00 2010 +0200
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidMainControl.cpp	Fri Mar 12 15:42:12 2010 +0200
@@ -84,7 +84,7 @@
 // ---------------------------------------------------------
 //
 CBlidMainControl::CBlidMainControl(CAlfEnv& aEnv, CBlidBaseView& aView) :
-    CAlfControl(), iEnv(aEnv), iView(aView)
+    CAlfControl(), iEnv(aEnv), iView(aView), isAccessoryRequired(EFalse)
     {
     iOnlineMode = EFalse;
     }
@@ -349,22 +349,20 @@
                     {
                     iView.ActivateSatelliteViewL();
                     }
-                break;
                 }
-            case KErrNotFound:
+            break;
+            }
+        case KErrNotFound:
             // No module (PSY) selected or invalid PSY
                 {
                 iOnlineMode = EFalse;
-                // Notify not module selected
-                //            if (iPSYTimeoutCount == 0)
-                //                {
                 if (iView.IsForeGroundApp())
                     {
                     iLocation->StopRequesting();
                     TCallBack callback(MessageQueryCallBack, this);
                     result
-                            = DispMsgQueryWithLinkL(R_BLID_NOPSY_ENABLED,
-                                    R_BLID_ERROR_NO_PSY,
+                            = DispMsgQueryWithLinkL(R_BLID_NOGPS_FOUND,
+                                    R_BLID_NOGPS_FOUND_TEXT,
                                     R_BLID_SELECT_POSITIONING_METHOD, ETrue,
                                     callback);
                     if (result == EBlidSoftkeyRetry)
@@ -399,8 +397,8 @@
                         iLocation->StopRequesting();
                         iOnlineMode = EFalse;
                         TCallBack callback(MessageQueryCallBack, this);
-                        result = DispMsgQueryWithLinkL(R_BLID_NOGPS_FOUND,
-                                R_BLID_NOGPS_FOUND_TEXT,
+                        result = DispMsgQueryWithLinkL(R_BLID_NOPSY_ENABLED,
+                                R_BLID_ERROR_NO_PSY,
                                 R_BLID_SELECT_POSITIONING_METHOD, ETrue,
                                 callback);
                         if (result == EBlidSoftkeyRetry)
@@ -418,11 +416,15 @@
                         {
                         iLocation->StopRequesting();
                         TCallBack callback(MessageQueryCallBack, this);
-                        DispMsgQueryWithLinkL(R_BLID_NOGPS_FOUND,
+                        isAccessoryRequired = ETrue;
+                        result = DispMsgQueryWithLinkL(R_BLID_NOGPS_FOUND,
                                 R_BLID_NOGPS_AVAILABLE_TEXT,
                                 R_BLID_SELECT_POSITIONING_METHOD, EFalse,
                                 callback);
-                        iView.ExitMainApplicationL(EEikCmdExit);
+                        if (result == EAknSoftkeyOk)
+                            {
+                            iView.ExitMainApplicationL(EEikCmdExit);
+                            }
                         }
                     else
                         {
@@ -432,7 +434,6 @@
                     }
                 break;
 
-                }
             }
         }
     }
@@ -506,17 +507,24 @@
         {
         iLinkText = env->AllocReadResourceL(aLinkText);
         }
-
     if (!iMsgQText)
         {
-        iMsgQText = HBufC::NewL(iMsgQueryText->Length() + KNewLine().Length()
-                + KOpeningLinkTag().Length() + iLinkText->Length()
-                + KClosingLinkTag().Length());
+        if (aLinkShow != EFalse)
+            {
+            iMsgQText = HBufC::NewL(iMsgQueryText->Length()
+                    + KNewLine().Length() + KOpeningLinkTag().Length()
+                    + iLinkText->Length() + KClosingLinkTag().Length());
+            }
+        else
+            {
+            iMsgQText = HBufC::NewL(iMsgQueryText->Length()
+                    + KNewLine().Length() + KOpeningLinkTag().Length());
+            }
         }
 
     iMsgQText->Des().Copy(*iMsgQueryText);
     iMsgQText->Des().Append(KNewLine);
-    if (aLinkShow)
+    if (!isAccessoryRequired)
         {
         iMsgQText->Des().Append(KOpeningLinkTag);
         iMsgQText->Des().Append(*iLinkText);
@@ -544,8 +552,16 @@
 
     msgDlg->SetLink(aCallBack);
 
-    msgDlg->ButtonGroupContainer().SetCommandSetL(
-            R_BLID_INFOPOPUP_SOFTKEYS_RETRY__EXIT);
+    if (!isAccessoryRequired)
+        {
+        msgDlg->ButtonGroupContainer().SetCommandSetL(
+                R_BLID_INFOPOPUP_SOFTKEYS_RETRY__EXIT);
+        }
+    else
+        {
+        msgDlg->ButtonGroupContainer().SetCommandSetL(
+                R_BLID_INFOPOPUP_SOFTKEYS_EXIT);
+        }
     isDialogLaunched = ETrue;
     TInt retval = msgDlg->RunLD();
     if (isDialogLaunched)
--- a/eventsui/eventseditor/inc/evteditor.h	Fri Feb 19 22:45:00 2010 +0200
+++ b/eventsui/eventseditor/inc/evteditor.h	Fri Mar 12 15:42:12 2010 +0200
@@ -261,8 +261,9 @@
          
         // Inherited from MEvtMgmtUiSOMObserver
         void NotifySOMChangeL( );
-  
-        void HandleDialogPageEventL( TInt aEventID );
+               
+        void HandlePointerEventL(const TPointerEvent &aPointerEvent);
+       // void HandleDialogPageEventL( TInt aEventID );
         
         TKeyResponse OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType); 
         
@@ -340,6 +341,8 @@
        * It determines which attributes are modified
        */
       TEvtEventAttributeMask          iEventAttributeMask;
+      
+      TInt                           iIsDragging;
  };
 
 #endif /*EVTEDITOR_H_*/
--- a/eventsui/eventseditor/src/evteditor.cpp	Fri Feb 19 22:45:00 2010 +0200
+++ b/eventsui/eventseditor/src/evteditor.cpp	Fri Mar 12 15:42:12 2010 +0200
@@ -602,6 +602,7 @@
                 if( subject )
 	                {
 	                CleanupStack::PushL(subject);
+	                subject->Des().Trim();
 	                iEvent.SetSubjectL(*subject);
                 	MakeTitleL(*subject); 
 	                CleanupStack::PopAndDestroy(subject);
@@ -1513,7 +1514,7 @@
             {
             case EKeyLeftArrow:
             case EKeyRightArrow:
-           // case EKeyOK:
+            case EKeyOK:
             case EKeyEnter:
                 {
                 CheckStatusL();
@@ -1526,83 +1527,107 @@
     }
 
 // -----------------------------------------------------------------------------
-// CEvtEditor::HandleDialogPageEventL()
+// CEvtEditor::HandlePointerEventL()
 // Inherited from CAknForm
 // -----------------------------------------------------------------------------
 //
-void CEvtEditor::HandleDialogPageEventL( TInt aEventID )
-    {
-    EVTUIDEBUG("+ CEvtEditor::HandleDialogPageEventL()");
-    CAknForm::HandleDialogPageEventL( aEventID );  
-    if( aEventID == MEikDialogPageObserver::EDialogPageTapped )
-       {
-       EVTUIDEBUG("+ CEvtEditor::HandleDialogPageEventL() EDialogPageTapped");   
-       if( !IsEditable() )
-           {
-           iIsEditMode = ETrue;
-           SetEditableL(ETrue);
-           ChangeRSKCaptionL();
-           ChangeMSKCaptionL( IdOfFocusControl() );            
-                   return;
-           }     
-       
-       CEikEdwin* editor = NULL;
-       CAknPopupFieldText* popupFieldText = NULL;
-       switch(IdOfFocusControl())
-           {
-           case EEvtMgmtUiDlgCIdPlace: // Place Editor
-               editor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdPlace));
-                if ( editor )
-                    { 
-                    iCmdHandler->HandleEditorCmdL( EEvtEditorCmdSetPlace );
-                    }
-               break;
-           case EEvtMgmtUiDlgCIdDesc: // Description Editor
-               editor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdDesc));
-                if ( editor )
+void CEvtEditor::HandlePointerEventL(const TPointerEvent& aPointerEvent)
+    {    
+    EVTUIDEBUG("+ CEvtEditor::HandlePointerEventL()");
+
+    if( aPointerEvent.iType != TPointerEvent::EButton1Up  )
+        {
+        CAknForm::HandlePointerEventL( aPointerEvent );  
+        if( aPointerEvent.iType == TPointerEvent::EDrag  )
+            iIsDragging++;
+        return;
+        }
+    
+    EVTUIDEBUG1("iIsDragging =%d",iIsDragging );
+    
+    //ToDo: Hack for kinetic scrolling
+    // Must be removed once avkon fix is recieved.
+    if( iIsDragging >6 )
+        {        
+        CAknForm::HandlePointerEventL( aPointerEvent );
+        iIsDragging = 0;  
+        return;
+        }
+        
+    iIsDragging = 0;
+    // End of todo
+    
+    if( !IsEditable() )
+        {
+        iIsEditMode = ETrue;
+        SetEditableL(ETrue);
+        ChangeRSKCaptionL();
+        ChangeMSKCaptionL( IdOfFocusControl() ); 			
+		return;
+        }	  
+    
+    CEikEdwin* editor = NULL;
+    CAknPopupFieldText* popupFieldText = NULL;
+    switch(IdOfFocusControl())
+        {
+        case EEvtMgmtUiDlgCIdPlace: // Place Editor
+            editor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdPlace));
+             if ( editor )
+                 { 
+                 iCmdHandler->HandleEditorCmdL( EEvtEditorCmdSetPlace );
+                 }
+            break;
+        case EEvtMgmtUiDlgCIdDesc: // Description Editor
+            editor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdDesc));
+             if ( editor )
+                 {
+                 iCmdHandler->HandleEditorCmdL( EEvtEditorCmdEditDesc );
+                 }
+            break;
+        case EEvtMgmtUiDlgCIdAssignTone: // Tone Editor
+            editor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdAssignTone));
+             if ( editor )
+                 {
+                 iCmdHandler->HandleEditorCmdL( EEvtEditorCmdAssignTone );
+                 }
+            break;
+        case EEvtMgmtUiDlgCIdStatus: // Status Editor
+            popupFieldText = static_cast <CAknPopupFieldText*> ( ControlOrNull(EEvtMgmtUiDlgCIdStatus) );
+            if( popupFieldText )
+                {
+                TInt editorStatus = popupFieldText->CurrentValueIndex();
+                CheckStatusL();
+                if( ECompleted != editorStatus )
                     {
-                    iCmdHandler->HandleEditorCmdL( EEvtEditorCmdEditDesc );
+                    if( EActive == editorStatus )
+                        {
+                        popupFieldText->SetCurrentValueIndex ( EDraft );
+                        }
+                    else
+                        {
+                        popupFieldText->SetCurrentValueIndex ( EActive );
+                        }
+          					HandleControlStateChangeL( EEvtMgmtUiDlgCIdStatus );
+                    UpdatePageL(ETrue);
+                    return;
                     }
-               break;
-           case EEvtMgmtUiDlgCIdAssignTone: // Tone Editor
-               editor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdAssignTone));
-                if ( editor )
+                else
                     {
-                    iCmdHandler->HandleEditorCmdL( EEvtEditorCmdAssignTone );
+                    CAknForm::HandlePointerEventL( aPointerEvent );  
+                    return;
                     }
-               break;
-           case EEvtMgmtUiDlgCIdStatus: // Status Editor
-               popupFieldText = static_cast <CAknPopupFieldText*> ( ControlOrNull(EEvtMgmtUiDlgCIdStatus) );
-               if( popupFieldText )
-                   {
-                   TInt editorStatus = popupFieldText->CurrentValueIndex();
-                   CheckStatusL();
-                   if( ECompleted != editorStatus )
-                       {
-                       if( EActive == editorStatus )
-                           {
-                           popupFieldText->SetCurrentValueIndex ( EDraft );
-                           }
-                       else
-                           {
-                           popupFieldText->SetCurrentValueIndex ( EActive );
-                           }
-                               HandleControlStateChangeL( EEvtMgmtUiDlgCIdStatus );
-                       UpdatePageL(ETrue);
-                      return;
-                       }                  
-                   }
-               break;
-           case EEvtMgmtUiDlgCIdRepeat: // Repeat editor
-           case EEvtMgmtUiDlgCIdAudioLoop: // audio loop editor
-                           TogglePopupFieldControlL( IdOfFocusControl() );
-               break;
-           default:              
-               break;
-           }
-         }
-        EVTUIDEBUG("- CEvtEditor::HandleDialogPageEventL()");
-       }
+                }
+            break;
+        case EEvtMgmtUiDlgCIdRepeat: // Repeat editor
+        case EEvtMgmtUiDlgCIdAudioLoop: // audio loop editor
+        				TogglePopupFieldControlL( IdOfFocusControl() );
+            break;
+        default:
+            CAknForm::HandlePointerEventL( aPointerEvent );  
+            break;
+        }
+		EVTUIDEBUG("- CEvtEditor::HandlePointerEventL()");
+    }
 // ---------------------------------------------------------------------------
 // CEvtEditor::MakeTitleL()
 // Set the Title Text
--- a/landmarksui/uicontrols/src/CLmkAppLmSelectorImpl.cpp	Fri Feb 19 22:45:00 2010 +0200
+++ b/landmarksui/uicontrols/src/CLmkAppLmSelectorImpl.cpp	Fri Mar 12 15:42:12 2010 +0200
@@ -569,14 +569,17 @@
        {
        iDeletionHelper.StoreListInformation( *iListBox, EFalse );
        }
-
    iDeletionHelper.UpdateListIfDeleteHappenedL();
    if( currentItemIndex >= 0 && currentItemIndex < iListBox->Model()->NumberOfItems() )
        {
        iListBox->SetCurrentItemIndex(currentItemIndex);
-       }
-
+       }   
 #endif // RD_SCALABLE_UI_V2
+   TRAPD(err,CPosLandmark* landmark = iDb.ReadLandmarkLC(iNewLmkItemId);CleanupStack::PopAndDestroy( landmark ));
+   if (err == KErrNotFound)
+       {
+       LmItemListProvider().RemoveItem( iNewLmkItemId );
+       }      
     }
 
 // -----------------------------------------------------------------------------