18 //debug |
18 //debug |
19 #include "calendarui_debug.h" |
19 #include "calendarui_debug.h" |
20 #include "calencontext.h" |
20 #include "calencontext.h" |
21 #include "CalenStatusPaneUtilsImpl.h" |
21 #include "CalenStatusPaneUtilsImpl.h" |
22 #include "calentitlepane.h" |
22 #include "calentitlepane.h" |
|
23 #include "calencustomnavilabel.h" |
23 #include <Calendar.rsg> |
24 #include <Calendar.rsg> |
24 |
25 |
25 #include <aknnavi.h> |
26 #include <aknnavi.h> |
26 #include <AknUtils.h> |
27 #include <AknUtils.h> |
27 #include <akntitle.h> |
28 #include <akntitle.h> |
100 */ |
101 */ |
101 activeDay.FormatL(naviDes, *iLongDateFormat); |
102 activeDay.FormatL(naviDes, *iLongDateFormat); |
102 AknTextUtils::DisplayTextLanguageSpecificNumberConversion(naviDes); |
103 AknTextUtils::DisplayTextLanguageSpecificNumberConversion(naviDes); |
103 |
104 |
104 iNaviLabel = iNaviContainer->Top(); |
105 iNaviLabel = iNaviContainer->Top(); |
105 if(iNaviLabel != NULL) |
106 if(iNaviLabel != NULL && iNaviLabel->ControlType() != CAknNavigationDecorator::ENaviLabel) |
|
107 { |
|
108 HideNaviPane(); |
|
109 } |
|
110 // iNaviLabel should be of type CAknNavigationDecorator::ENaviLabel for |
|
111 // displaying date in navi pane. |
|
112 if(iNaviLabel != NULL && iNaviLabel->ControlType() == CAknNavigationDecorator::ENaviLabel) |
106 { |
113 { |
107 CCoeControl* coeRes = iNaviLabel->DecoratedControl(); |
114 CCoeControl* coeRes = iNaviLabel->DecoratedControl(); |
108 CAknNaviLabel *actualLabel = static_cast<CAknNaviLabel*>(coeRes); |
115 CAknNaviLabel *actualLabel = static_cast<CAknNaviLabel*>(coeRes); |
109 actualLabel->SetTextL(naviDes); |
116 actualLabel->SetTextL(naviDes); |
110 iNaviContainer->ReplaceL(*iNaviLabel, *iNaviLabel); |
117 iNaviContainer->ReplaceL(*iNaviLabel, *iNaviLabel); |
128 |
135 |
129 |
136 |
130 TRACE_EXIT_POINT; |
137 TRACE_EXIT_POINT; |
131 return iNaviLabel; |
138 return iNaviLabel; |
132 } |
139 } |
|
140 // ----------------------------------------------------------------------------- |
|
141 // ?classname::?member_function |
|
142 // ?implementation_description |
|
143 // (other items were commented in a header). |
|
144 // ----------------------------------------------------------------------------- |
|
145 // |
|
146 CAknNavigationDecorator* CCalenStatusPaneUtilsImpl::ShowNaviPaneL( const TDesC& aName, const TRgb aColor ) |
|
147 { |
|
148 TRACE_ENTRY_POINT; |
|
149 |
|
150 iNaviLabel = iNaviContainer->Top(); |
|
151 if(iNaviLabel != NULL && iNaviLabel->ControlType() != CAknNavigationDecorator::ENotSpecified) |
|
152 { |
|
153 HideNaviPane(); |
|
154 } |
|
155 // iNaviLabel should be of type CAknNavigationDecorator::ENotSpecified for |
|
156 // displaying calendar name and icon in navi pane. |
|
157 if(iNaviLabel != NULL && iNaviLabel->ControlType() == CAknNavigationDecorator::ENotSpecified) |
|
158 { |
|
159 CCoeControl* coeRes = iNaviLabel->DecoratedControl(); |
|
160 CCustomNaviControl *actualLabel = static_cast<CCustomNaviControl*>(coeRes); |
|
161 actualLabel->SetCalendarNameAndColor(aName, aColor); |
|
162 actualLabel->DrawDeferred(); |
|
163 iNaviContainer->ReplaceL(*iNaviLabel, *iNaviLabel); |
|
164 } |
|
165 else |
|
166 { |
|
167 CCustomNaviControl *customControl = CCustomNaviControl::NewL(aName, aColor); |
|
168 CleanupStack::PushL(customControl); |
|
169 customControl->SetContainerWindowL(*iNaviContainer); |
|
170 CleanupStack::Pop( customControl ); // customControl |
|
171 |
|
172 iNaviLabel = CAknNavigationDecorator::NewL(iNaviContainer, customControl, CAknNavigationDecorator::ENotSpecified); |
|
173 |
|
174 iNaviLabel->SetContainerWindowL( *iNaviContainer ); |
|
175 iNaviLabel->SetControlContext( iNaviContainer ); |
|
176 iNaviLabel->MakeScrollButtonVisible(EFalse); |
|
177 iNaviContainer->PushL(*iNaviLabel); |
|
178 } |
|
179 TRACE_EXIT_POINT; |
|
180 return iNaviLabel; |
|
181 } |
133 |
182 |
134 // ----------------------------------------------------------------------------- |
183 // ----------------------------------------------------------------------------- |
135 // ?classname::?member_function |
184 // ?classname::?member_function |
136 // ?implementation_description |
185 // ?implementation_description |
137 // (other items were commented in a header). |
186 // (other items were commented in a header). |