mmsharing/mmshui/src/musuiappui.cpp
branchRCL_3
changeset 11 ff8a573c0e2e
parent 0 f0cf47e981f9
child 16 71306c87785a
--- a/mmsharing/mmshui/src/musuiappui.cpp	Fri Mar 12 15:42:21 2010 +0200
+++ b/mmsharing/mmshui/src/musuiappui.cpp	Mon Mar 15 12:40:08 2010 +0200
@@ -86,6 +86,8 @@
                             EMbmMusuiQgn_menu_mus_app_cxt,
                             EMbmMusuiQgn_menu_mus_app_cxt_mask );
 
+    iStatusPaneHandler->GetVolumePopup()->SetObserver(this);
+    
     AknsUtils::InitSkinSupportL();
     AknsUtils::SetAvkonSkinEnabledL( ETrue );
 
@@ -169,16 +171,7 @@
         MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::HandleWsEventL, view is NULL" );
         return;
         }
-    
-    if ( type == EEventPointer &&
-         iStatusPaneHandler->GetVolumePopup()->IsVisible() )
-        {
-        MUS_LOG( "mus: [MUSUI ]  EMusuiCmdViewVolumeChanged" );
-        CMusUiGeneralView* activatedView = 
-                                   static_cast<CMusUiGeneralView*>( iView );
-        activatedView->HandleCommandL( EMusuiCmdViewVolumeChanged );
-        }
-   
+
     if( type == EEventKeyUp )
         {
         static_cast<CMusUiGeneralView*>
@@ -744,4 +737,23 @@
     MUS_LOG( "mus: [MUSUI ]  <- CMusUiAppUi::FindWindowGroupIdentifiersL" );
     }
 
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusUiAppUi::HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType)
+    {
+    CAknVolumePopup* popup = iStatusPaneHandler->GetVolumePopup();
+    if ( popup && popup->IsVisible() && (popup == aControl) && 
+         (aEventType == MCoeControlObserver::EEventStateChanged) )
+        {
+        MUS_LOG1( "mus: [MUSUI ]  CMusUiAppUi::HandleControlEventL(): volume[%d]",
+                popup->Value() );
+        CMusUiGeneralView* activatedView = 
+                               static_cast<CMusUiGeneralView*>( iView );
+        activatedView->HandleCommandL( EMusuiCmdViewVolumeChanged );
+        }
+
+    }
 // end of file