widgets/widgetapp/src/WidgetUiWindowView.cpp
changeset 65 5bfc169077b2
parent 38 6297cdf66332
child 68 92a765b5b3e7
equal deleted inserted replaced
42:d39add9822e2 65:5bfc169077b2
    35 #include <stringloader.h>
    35 #include <stringloader.h>
    36 #include <e32math.h>
    36 #include <e32math.h>
    37 #include <AknSgcc.h>
    37 #include <AknSgcc.h>
    38 #include <akntitle.h>
    38 #include <akntitle.h>
    39 #include <centralrepository.h>
    39 #include <centralrepository.h>
    40 #include <browseruisdkcrkeys.h>
    40 #include <BrowserUiSDKCRKeys.h>
    41 #ifdef RD_SCALABLE_UI_V2
    41 #ifdef RD_SCALABLE_UI_V2
    42 #include <LayoutMetaData.cdl.h> // For Layout_Meta_Data landscape/portrait status
    42 #include <LayoutMetaData.cdl.h> // For Layout_Meta_Data landscape/portrait status
    43 #include <akntoolbar.h>
    43 #include <akntoolbar.h>
    44 #endif
    44 #endif
    45 
    45 
   227 void CWidgetUiWindowView::DynInitMenuPaneL( TInt aResourceId,
   227 void CWidgetUiWindowView::DynInitMenuPaneL( TInt aResourceId,
   228                                          CEikMenuPane* aMenuPane )
   228                                          CEikMenuPane* aMenuPane )
   229     {
   229     {
   230     if (!iWindowManager.ActiveWindow())
   230     if (!iWindowManager.ActiveWindow())
   231         return;
   231         return;
   232     #ifdef RD_SCALABLE_UI_V2
       
   233     if (PenEnabled()&&(Layout_Meta_Data::IsLandscapeOrientation())&& IsEditMode())
       
   234     	{
       
   235     	TInt newResId = Cba()->IsVisible() ?
       
   236 			  R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT :
       
   237 			  R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT_NO_SOFTKEYS;
       
   238 		
       
   239 			StatusPane()->SwitchLayoutL(newResId);
       
   240 			StatusPane()->ApplyCurrentSettingsL();
       
   241 			StatusPane()->MakeVisible(ETrue);         
       
   242     	}
       
   243     #endif	
       
   244     CBrCtlInterface* engine = iWindowManager.ActiveWindow()->Engine();
   232     CBrCtlInterface* engine = iWindowManager.ActiveWindow()->Engine();
   245     if( engine && (aResourceId == R_WIDGETUI_MENU || aResourceId >= R_CASCADE_MENU_1) )
   233     if( engine && (aResourceId == R_WIDGETUI_MENU || aResourceId >= R_CASCADE_MENU_1) )
   246         {
   234         {
   247         iIsOptionsMenuActivated = ETrue;
   235         iIsOptionsMenuActivated = ETrue;
   248         engine->AddOptionMenuItemsL( *aMenuPane, aResourceId );
   236         engine->AddOptionMenuItemsL( *aMenuPane, aResourceId );
   316                   R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT :
   304                   R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT :
   317                   R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT_NO_SOFTKEYS;
   305                   R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT_NO_SOFTKEYS;
   318             if (resId != newResId)
   306             if (resId != newResId)
   319                 {
   307                 {
   320                 StatusPane()->SwitchLayoutL(newResId);
   308                 StatusPane()->SwitchLayoutL(newResId);
   321                 }            
   309                 }
   322             }
   310             }
   323         else //Portrait
   311         else //Portrait
   324             {
   312             {
   325             if (resId != R_AVKON_STATUS_PANE_LAYOUT_SMALL)
   313             if (resId != R_AVKON_STATUS_PANE_LAYOUT_SMALL)
   326                 {
   314                 {