controlpanelui/src/silenceindicatorplugin/src/cpsilenceindicatorplugin.cpp
changeset 42 3487b2ea501a
parent 39 5aa7c7ec6b8e
--- a/controlpanelui/src/silenceindicatorplugin/src/cpsilenceindicatorplugin.cpp	Fri Sep 17 08:29:50 2010 +0300
+++ b/controlpanelui/src/silenceindicatorplugin/src/cpsilenceindicatorplugin.cpp	Mon Oct 04 00:18:12 2010 +0300
@@ -80,6 +80,9 @@
     const QString &indicatorType)
 {
     Q_UNUSED(indicatorType)
+	// Install localization
+	HbTranslator translator("control_panel");
+    translator.loadCommon();
     mEngine = CreateProfileEngineExtended2L();    
     return this;
 }
@@ -93,26 +96,20 @@
 }
 
 /*!
-    The handleInteraction is used launch WLAN list view.
+    The handleInteraction is used to emit dataChange signal.
 */
 bool CpSilenceIndicatorPlugin::handleInteraction(InteractionType type)
 {
-   bool handled = false;
-    switch (type) {
-    case InteractionActivated: 
-        // set silence mode or disable silence mode                
-        bool isSilence = false;
-        TRAP(mError,
-                isSilence = mEngine->SilenceModeL();
-                mEngine->SetSilenceModeL(!isSilence);
-        )
-        emit dataChanged();        
-        handled = true;
-        break;
-    default:
-        break;
-    }
-    return handled;
+    bool handled = false;
+        switch (type) {
+        case InteractionActivated: 
+            emit dataChanged();        
+            handled = true;
+            break;
+        default:
+            break;
+        }
+        return handled;
 }
 
 /*!
@@ -124,13 +121,7 @@
     bool handled(false);
     switch (type) {
     case RequestActivate:
-        TRAP(mError, mEngine->SetSilenceModeL(true);)
-        handled = true;
-        emit dataChanged();
-        break;
-        
     case RequestDeactivate:
-        TRAP(mError, mEngine->SetSilenceModeL(false);)
         handled = true;
         emit dataChanged();
         break;
@@ -151,9 +142,9 @@
         // this is the statusbar icon, which is shown only when silence mode is on
     case MonoDecorationNameRole:
         if (mEngine->SilenceModeL()) {
-            variant = HbIcon("qtg_status_profile_silent");
+            variant = QString("qtg_status_profile_silent");
         } else {
-            variant = HbIcon();
+            variant = QString();
         }        
         break;
     default: