calendarui/views/src/calentodocontainer.cpp
branchRCL_3
changeset 19 1984aceb8774
parent 0 f979ecb2b13e
child 21 9711e452b5e9
--- a/calendarui/views/src/calentodocontainer.cpp	Mon Mar 15 12:40:18 2010 +0200
+++ b/calendarui/views/src/calentodocontainer.cpp	Wed Mar 31 21:29:10 2010 +0300
@@ -21,6 +21,8 @@
 #include <aknlists.h>
 #include <AknsUtils.h>
 #include <avkon.mbg>
+#include <aknbutton.h>
+#include <akntoolbar.h>
 #include <calalarm.h>
 #include <calentry.h>
 #include <calinstance.h>
@@ -944,6 +946,29 @@
     // set marked todo items info
     static_cast<CCalenTodoView*>( iView )->SetMarkedToDoItems(newArray);
     
+    MCalenToolbar* toolbarImpl = iServices.ToolbarOrNull();
+    if( MarkedCount() )
+        {
+        if(toolbarImpl) 
+          {
+            CAknToolbar& toolbar = toolbarImpl->Toolbar();
+
+            // dim clear and clear all toolbar buttons
+            toolbar.SetItemDimmed(ECalenNewMeeting,ETrue,ETrue);
+          }
+
+        }
+    else
+        {
+        if(toolbarImpl) 
+             {
+               CAknToolbar& toolbar = toolbarImpl->Toolbar();
+
+               // dim clear and clear all toolbar buttons
+               toolbar.SetItemDimmed(ECalenNewMeeting,EFalse,ETrue);
+             }
+        }
+    
     CleanupStack::Pop( newArray );
 
     TRACE_EXIT_POINT;
@@ -982,6 +1007,29 @@
         // when all the todo items are unmarked,clear all marked todo items info from View
         static_cast<CCalenTodoView*>( iView )->ClearMarkedToDoItems();
         }
+    
+    MCalenToolbar* toolbarImpl = iServices.ToolbarOrNull();
+    if( MarkedCount() )
+           {
+           if(toolbarImpl) 
+             {
+               CAknToolbar& toolbar = toolbarImpl->Toolbar();
+
+               // dim clear and clear all toolbar buttons
+               toolbar.SetItemDimmed(ECalenNewMeeting,ETrue,ETrue);
+             }
+
+           }
+       else
+           {
+           if(toolbarImpl) 
+                {
+                  CAknToolbar& toolbar = toolbarImpl->Toolbar();
+
+                  // dim clear and clear all toolbar buttons
+                  toolbar.SetItemDimmed(ECalenNewMeeting,EFalse,ETrue);
+                }
+           }
 
     TRACE_EXIT_POINT;
     }