31 #include <eikfrlbd.h> |
31 #include <eikfrlbd.h> |
32 #include <aknlists.h> |
32 #include <aknlists.h> |
33 #include <StringLoader.h> |
33 #include <StringLoader.h> |
34 #include <eikenv.h> |
34 #include <eikenv.h> |
35 #include <DocumentHandler.h> |
35 #include <DocumentHandler.h> |
36 |
36 #ifdef BRDO_SINGLE_CLICK_ENABLED_FF |
|
37 #include "CDownloadsStylusPopupMenu.h" |
|
38 #define pixelOffset 36 |
|
39 #endif |
37 #include "eikon.hrh" |
40 #include "eikon.hrh" |
38 |
41 |
39 // ============================ MEMBER FUNCTIONS =============================== |
42 // ============================ MEMBER FUNCTIONS =============================== |
40 |
43 |
41 // ----------------------------------------------------------------------------- |
44 // ----------------------------------------------------------------------------- |
105 iRefreshTimer = CPeriodic::NewL( KRefreshTimerPriority ); |
108 iRefreshTimer = CPeriodic::NewL( KRefreshTimerPriority ); |
106 CLOG_WRITE(" iRefreshTimer created"); |
109 CLOG_WRITE(" iRefreshTimer created"); |
107 |
110 |
108 iDownloadUtils = CDownloadUtils::NewL(); |
111 iDownloadUtils = CDownloadUtils::NewL(); |
109 |
112 |
|
113 #ifdef BRDO_SINGLE_CLICK_ENABLED_FF |
|
114 iStylusMenu = CDlStylusPopupMenu::NewL(); |
|
115 #endif |
110 CLOG_LEAVEFN("CDownloadsListDlg::ConstructL"); |
116 CLOG_LEAVEFN("CDownloadsListDlg::ConstructL"); |
111 } |
117 } |
112 |
118 |
113 // ----------------------------------------------------------------------------- |
119 // ----------------------------------------------------------------------------- |
114 // CDownloadsListDlg::NewL |
120 // CDownloadsListDlg::NewL |
153 iRefreshTimer = 0; |
159 iRefreshTimer = 0; |
154 delete iListBox; |
160 delete iListBox; |
155 iListBox = NULL; |
161 iListBox = NULL; |
156 delete iDownloadUtils; |
162 delete iDownloadUtils; |
157 iDownloadUtils = NULL; |
163 iDownloadUtils = NULL; |
158 |
164 #ifdef BRDO_SINGLE_CLICK_ENABLED_FF |
|
165 if (iStylusMenu) |
|
166 { |
|
167 delete iStylusMenu; |
|
168 iStylusMenu = NULL; |
|
169 } |
|
170 #endif |
159 CLOG_LEAVEFN("CDownloadsListDlg::~CDownloadsListDlg"); |
171 CLOG_LEAVEFN("CDownloadsListDlg::~CDownloadsListDlg"); |
160 } |
172 } |
161 |
173 |
162 // ----------------------------------------------------------------------------- |
174 // ----------------------------------------------------------------------------- |
163 // CDownloadsListDlg::SetModelL |
175 // CDownloadsListDlg::SetModelL |
193 // Disable Options softkey. |
205 // Disable Options softkey. |
194 ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeyOptions, EFalse ); |
206 ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeyOptions, EFalse ); |
195 CLOG_WRITE(" aModel.Count() == 0"); |
207 CLOG_WRITE(" aModel.Count() == 0"); |
196 } |
208 } |
197 |
209 |
|
210 #ifdef BRDO_SINGLE_CLICK_ENABLED_FF |
|
211 TInt Inprogress = iDownloadsListArray->DownloadsCount |
|
212 ( MASKED_DL_STATE(EHttpDlCreated) | |
|
213 MASKED_DL_STATE(EHttpDlPaused) | |
|
214 MASKED_DL_STATE(EHttpDlInprogress) | |
|
215 MASKED_DL_STATE(EHttpDlMultipleMOFailed)); |
|
216 |
|
217 if ( Inprogress > 1 ) |
|
218 { |
|
219 ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeyOptions, ETrue ); |
|
220 } |
|
221 else |
|
222 { |
|
223 ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeyOptions, EFalse ); |
|
224 } |
|
225 #endif |
|
226 |
198 CLOG_LEAVEFN("CDownloadsListDlg::SetModelL"); |
227 CLOG_LEAVEFN("CDownloadsListDlg::SetModelL"); |
199 } |
228 } |
200 |
229 |
201 // ----------------------------------------------------------------------------- |
230 // ----------------------------------------------------------------------------- |
202 // CDownloadsListDlg::HandleModelChangeL |
231 // CDownloadsListDlg::HandleModelChangeL |
612 { |
641 { |
613 HandleMiddleSoftKeyChangeL(); |
642 HandleMiddleSoftKeyChangeL(); |
614 break; |
643 break; |
615 } |
644 } |
616 case MEikListBoxObserver::EEventItemDoubleClicked: |
645 case MEikListBoxObserver::EEventItemDoubleClicked: |
|
646 #ifdef BRDO_SINGLE_CLICK_ENABLED_FF |
|
647 case MEikListBoxObserver::EEventItemSingleClicked: |
|
648 #endif |
617 { |
649 { |
618 // If EAknSoftkeyOpen is visible, then we can activate the selected download |
650 // If EAknSoftkeyOpen is visible, then we can activate the selected download |
619 if (ButtonGroupContainer()->IsCommandVisible(EAknSoftkeyOpen)) |
651 if (ButtonGroupContainer()->IsCommandVisible(EAknSoftkeyOpen)) |
620 { |
652 { |
621 ProcessCommandL(EAknSoftkeyOpen); |
653 ProcessCommandL(EAknSoftkeyOpen); |
678 // CDownloadsListDlg::HandlePointerEventL |
710 // CDownloadsListDlg::HandlePointerEventL |
679 // ----------------------------------------------------------------------------- |
711 // ----------------------------------------------------------------------------- |
680 // |
712 // |
681 void CDownloadsListDlg::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
713 void CDownloadsListDlg::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
682 { |
714 { |
|
715 #ifdef BRDO_SINGLE_CLICK_ENABLED_FF |
|
716 if ( aPointerEvent.iType == TPointerEvent::EButton1Down) |
|
717 { |
|
718 iPointerEvent = aPointerEvent; |
|
719 iStylusMenu->HandlePointerEventL(aPointerEvent, this); |
|
720 } |
|
721 else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) |
|
722 { |
|
723 iStylusMenu->cancelLongTapL(); |
|
724 if(iStylusMenu->islongtapRunning()) |
|
725 { |
|
726 iStylusMenu->reSetLongTapFlag(); |
|
727 return; |
|
728 } |
|
729 } |
|
730 else if ( aPointerEvent.iType == TPointerEvent::EDrag ) |
|
731 { |
|
732 if((Abs(iPointerEvent.iPosition.iX - aPointerEvent.iPosition.iX) > pixelOffset ) || |
|
733 (Abs(iPointerEvent.iPosition.iY - aPointerEvent.iPosition.iY) > pixelOffset )) |
|
734 { |
|
735 iStylusMenu->cancelLongTapL(); |
|
736 if(iStylusMenu->islongtapRunning()) |
|
737 { |
|
738 iStylusMenu->reSetLongTapFlag(); |
|
739 return; |
|
740 } |
|
741 } |
|
742 } |
|
743 #endif |
|
744 |
683 CAknPopupList::HandlePointerEventL(aPointerEvent); |
745 CAknPopupList::HandlePointerEventL(aPointerEvent); |
684 } |
746 } |
685 |
747 |
686 // ----------------------------------------------------------------------------- |
748 // ----------------------------------------------------------------------------- |
687 // CDownloadsListDlg::OfferKeyEventL |
749 // CDownloadsListDlg::OfferKeyEventL |
913 } |
975 } |
914 |
976 |
915 return KErrNone; |
977 return KErrNone; |
916 } |
978 } |
917 |
979 |
|
980 #ifdef BRDO_SINGLE_CLICK_ENABLED_FF |
|
981 void CDownloadsListDlg::AddAiwItemsL() |
|
982 { |
|
983 iMenuBar->MenuPane()->AddMenuItemsL(R_DMUL_AIW_POPUP); |
|
984 iDlgObserver.AIWPlugInMenusL(R_DMUL_AIW_POPUP,iMenuBar->MenuPane()); |
|
985 TInt pos(0); |
|
986 if (iMenuBar->MenuPane()->MenuItemExists(EAiwCmdContact,pos)) |
|
987 { |
|
988 iMenuBar->MenuPane()->DeleteMenuItem(EAiwCmdContact); |
|
989 } |
|
990 if (iMenuBar->MenuPane()->MenuItemExists(EAiwCmdRingtone,pos)) |
|
991 { |
|
992 iMenuBar->MenuPane()->DeleteMenuItem(EAiwCmdRingtone); |
|
993 } |
|
994 |
|
995 } |
|
996 #endif |
918 /* End of file. */ |
997 /* End of file. */ |