From 04ff65cb646d1f93b4ba32ff6ecefc467e800a5e Mon Sep 17 00:00:00 2001 From: Vinay Sachdeva Date: Thu, 27 Jun 2013 05:03:03 +0530 Subject: [PATCH] Fixed Nabi Issues Change-Id: I0ee5fb6edf93a56dcb8fd03a5fd0fe96d5feb89e Signed-off-by: Vinay Sachdeva --- inc/IntArticleReaderForm.h | 2 +- inc/IntRadioCustomItem.h | 15 --- res/screen-density-xhigh/00_button_radio.png | Bin 4817 -> 0 bytes .../00_button_radio_selected.png | Bin 3835 -> 0 bytes .../{IDL_FORM_HW_KEY.xml => IDL_FORM.xml} | 52 ++++---- src/IntAddBookmarkForm.cpp | 19 +-- src/IntAddressbar.cpp | 1 + src/IntBookmarkListForm.cpp | 6 +- src/IntBookmarkPresentationModel.cpp | 24 ++-- src/IntBrightnessForm.cpp | 21 +++- src/IntEditBookmarkListForm.cpp | 4 +- src/IntEditHistoryListForm.cpp | 4 +- src/IntHistoryListForm.cpp | 6 +- src/IntHistoryPresentationModel.cpp | 1 + src/IntInternetApp.cpp | 26 ++-- src/IntMainForm.cpp | 132 ++++++--------------- src/IntPresentationModelBase.cpp | 24 +--- src/IntRadioCustomItem.cpp | 42 +------ src/IntSettingForm.cpp | 6 +- 19 files changed, 140 insertions(+), 245 deletions(-) delete mode 100644 res/screen-density-xhigh/00_button_radio.png delete mode 100644 res/screen-density-xhigh/00_button_radio_selected.png rename res/screen-size-normal/{IDL_FORM_HW_KEY.xml => IDL_FORM.xml} (66%) diff --git a/inc/IntArticleReaderForm.h b/inc/IntArticleReaderForm.h index a7f0238..25018c1 100644 --- a/inc/IntArticleReaderForm.h +++ b/inc/IntArticleReaderForm.h @@ -101,7 +101,7 @@ class ArticleReaderForm //IWebUiEventListener virtual void OnWebPageBlockSelected(Tizen::Web::Controls::Web& source, Tizen::Graphics::Point& startPoint, Tizen::Graphics::Point& endPoint); virtual void OnWebPageShowRequested(Tizen::Web::Controls::Web& source){} - virtual Tizen::Web::Controls::Web* OnWebWindowCreateRequested(void){} + virtual Tizen::Web::Controls::Web* OnWebWindowCreateRequested(void){return null;} virtual void OnWebWindowCloseRequested(Tizen::Web::Controls::Web& source) {} result InitSelectTextContextMenu(Tizen::Graphics::Point p); diff --git a/inc/IntRadioCustomItem.h b/inc/IntRadioCustomItem.h index 821575d..3ca1053 100644 --- a/inc/IntRadioCustomItem.h +++ b/inc/IntRadioCustomItem.h @@ -66,13 +66,6 @@ public: Tizen::Base::String GetText(void); /** - * @brief The method used to get selection state of the Radio Button - * @return True if selected or false if unselected - */ - bool GetSelected(void); - - - /** * @brief Add all the required elements and create the Custom Item. * * @return An error code @@ -94,18 +87,10 @@ public: */ void SetText(Tizen::Base::String& text); - /** - * @brief The method used to set the selection state of the Radio Button - * @return void - */ - void SetSelected(bool selectedValue); - protected: static const int IDA_FORMAT_STRING; - static const int IDA_FORMAT_RADIO_BUTTON; private: - bool __isSelected; int __height; ///Height of the SettingToggleCustomItem Instance Tizen::Base::String __text; ///The Text for the Toggle Button int __width; ///Width of the SettingToggleCustomItem Instance diff --git a/res/screen-density-xhigh/00_button_radio.png b/res/screen-density-xhigh/00_button_radio.png deleted file mode 100644 index 83a1a54e9394db67f4d101cfef2bf33773219901..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4817 zcmaJ_c{o(<-#?a+B_m79(il%=pBZb$41=+yK|>l_490E@218*agpwshD1}1Su|z~t zDk4iETZzYRB>Vd6`8_?q_mB5^&vl)1FW2Yu`F_6l{k^a2oD*wiV!*?Bf)fA$9wS2x z?x02gx;fYmo<;7yqX*4#iXNU~?&CrUBKQ#jZD$`xBG|~A;7Y_13C_X3?}$hMV1c+> z;3;_Qd4!XXw*ui8MuF;0K41d?Qj1C^IC&B&U`L{>I|&70Ja2-4-JMa8ODb3xmaI#3 zb2kj}BbtYpSU81vI;lHDv^2p;D&j!En@Aymsoq{Be*_f;`AZjZ(El|Jg@FHpP&`qP z|CqvK&A_@oenhZ}0!-csrV0nEDl5R1Vd~22a$rRm90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*f!O4;Q)zhJ8DA|n{%^8IR}%Bkf07`NdsXCb;hK&ReZz$&YzfkxOpZ5J1= z)o8uP{1ONTtJp9Ce6FMbciLX=&q-We-z=+L-;Y$WBmLLL7>$8GmeZp*xYts*oFb2* z#C?HnL06Xo&E=^-udfjeWwK2gPaZMIsg2HiuV(HUuT}85Y7j}dyE;?e`4z)m1V;jV!1pDkhMF&b3Y1l{7b`=c|Z{a#kX=J+6e>a;ixIj8|p zy2~x(avr>q)V=lg(**N;WJ$1(=F%QqefBHl^$}0&6x!0)f+D)7?xKl8--DZ-Gn4`} zC6uMDgu6@$YN(H2+R%TMG~G@eHOPwbygEr}Wyk`Qkr$}lt+#InM4W{SBW>S44ln*( z6i@9Jy;D`78~dq)o$b`gsX%TYE-E%eQ)!KAj8p4P5MOpD3-h z(j3wP>PHEb`3;+|nf>n@&ZTU6&90YNN}7tQJT{U-ISs5u%glv3Razce-@9P-My9=t z--PK%a;1`H_!2jdnfcQsYnxDw6Y)*;ueQFe$>QE*2R*`|!t$9=W;Bs}4>w1U^6^ z9fUDcnigth^6(nvikzGLl$xp*W1zoJ;1!&RWO;C<8?9q+KUN!ZEqChq_n#wNIokRi z4^;2*Y%!8n9XT1~EqpXGzc|SMok&Hqm%_bGMt24O*kH`jt(Pq2KQc3Nb_ym|!$ggG z-8W{X=z5Wk=Grw6r9N%q3U@A7Tkmx(aBH8m0#xn$%k1l#D~4e!n^1gb(cnEy|D2kH z*x-+p$Kljw?41RsrDwLLd%nwu0aJk5P^NVl2Jk)EIb49NBL4cxWTa<;Db;bf_CHJr BwPXMQ diff --git a/res/screen-density-xhigh/00_button_radio_selected.png b/res/screen-density-xhigh/00_button_radio_selected.png deleted file mode 100644 index 7b00666b8db74829b4409d78428d8f67e86e4fa0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3835 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1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O@& z2tV&~7;t}xNzcCN$78`;Y9m|X^_`)~uiJ|ZCBhYu9nKPM!3P2ah9VXu1c4TTt}zZx z(z~z-05RO4zvD_xMEE?*acaI(c#^Z<=XeKaf<*DI2{ViCia(s_t{E?Y{HxxVX2PwBiOtL$W69h3*Lv#t;7toTaDF8KyPErJiEQN5$ zT}4A>Bb$!4#Rvu6l~BN4L2OUV;#oe=_fUA*aSri0=iC>b2cdR3-KFq23XjMf)oPZG z<(`lzl$1+SWji@RPLp2?}ITe3wUq{g5z@p4<}D|7-~DU zu97bjXkrgj!0g7anDy*szd=6hjpj-^qZpAKnHH1p{v$xkeAW052qDGO3x)>+?bgT)C<9KSjtnse+` zDrMh5XM2YgV3hBBJ+9v}cVLsX(?t#n`mm-qtF$EE?>UyZK1zWfHu_(V@R`I>G<|002ovPDHLkV1gzM89)F4 diff --git a/res/screen-size-normal/IDL_FORM_HW_KEY.xml b/res/screen-size-normal/IDL_FORM.xml similarity index 66% rename from res/screen-size-normal/IDL_FORM_HW_KEY.xml rename to res/screen-size-normal/IDL_FORM.xml index 9c23632..30dbc60 100644 --- a/res/screen-size-normal/IDL_FORM_HW_KEY.xml +++ b/res/screen-size-normal/IDL_FORM.xml @@ -4,19 +4,19 @@ --> - + 720 -
+ - - + + - + - + - + @@ -24,61 +24,61 @@ - - + + - + - +
diff --git a/src/IntAddBookmarkForm.cpp b/src/IntAddBookmarkForm.cpp index c4de482..af46744 100644 --- a/src/IntAddBookmarkForm.cpp +++ b/src/IntAddBookmarkForm.cpp @@ -303,7 +303,7 @@ AddBookmarkForm::OnActionPerformed(const Control& source, int actionId) if ( exist == true) { - String msg = CommonUtil::GetString(L"IDS_BR_POP_BOOKMARK_ALREADY_EXISTS"); + String msg = CommonUtil::GetString(L"IDS_BR_POP_ALREADY_EXISTS"); CreateMessage(msg); AppLogDebug("Bookmark already exists"); @@ -361,7 +361,7 @@ AddBookmarkForm::OnActionPerformed(const Control& source, int actionId) AppLog("AddBookmarkForm::OnActionPerformed does url exist 2"); if ( exist == true) { - String msg = CommonUtil::GetString(L"IDS_BR_POP_BOOKMARK_ALREADY_EXISTS"); + String msg = CommonUtil::GetString(L"IDS_BR_POP_ALREADY_EXISTS"); CreateMessage(msg); AppLogDebug("Bookmark already exists"); @@ -725,16 +725,21 @@ AddBookmarkForm::CreateItem(int index, int itemWidth) if (__selectedIndex == index) { - radioItem->SetSelected(true); +// radioItem->SetSelected(true); + __pList->SetItemChecked(index,true); } else { - radioItem->SetSelected(false); +// radioItem->SetSelected(false); + __pList->SetItemChecked(index,false); } if(__selectedIndex == 0 && index == 1) - radioItem->SetSelected(true); - if (radioItem->GetSelected() == true) + { +// radioItem->SetSelected(true); + __pList->SetItemChecked(index,true); + } + if (__pList->IsItemChecked(index) == true) { __folderName = radioItem->GetText(); } @@ -1148,7 +1153,7 @@ AddBookmarkForm::CreateMessage(String& str) pMsgBox = new(std::nothrow) MessageBox; if (pMsgBox != null) { - pMsgBox->Construct(str, L"", MSGBOX_STYLE_OK, 3000); + pMsgBox->Construct(L"", str, MSGBOX_STYLE_OK, 3000); pMsgBox->ShowAndWait(__modalMsgBoxResult); delete pMsgBox; pMsgBox = null; diff --git a/src/IntAddressbar.cpp b/src/IntAddressbar.cpp index e8efe0e..0dff6d6 100644 --- a/src/IntAddressbar.cpp +++ b/src/IntAddressbar.cpp @@ -89,6 +89,7 @@ result Addressbar::OnTerminating(void) { DeviceManager::RemoveDeviceEventListener(DEVICE_TYPE_USB_CLIENT, *this); + return E_SUCCESS; } result diff --git a/src/IntBookmarkListForm.cpp b/src/IntBookmarkListForm.cpp index 826918d..16be6d5 100644 --- a/src/IntBookmarkListForm.cpp +++ b/src/IntBookmarkListForm.cpp @@ -162,10 +162,10 @@ BookmarkListForm::OnInitializing(void) __pItemContextFolder->Construct(); __pItemContextFolder->AddElement(IDA_CONTEXT_ITEM_FOLDER_EDIT, CommonUtil::GetString(L"IDS_BR_SK_EDIT")); - __pItemContextFolder->SetElementBackgroundColor(IDA_CONTEXT_ITEM_DELETE,LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL , CONTEXT_ITEM_DELETE_COLOR); - __pItemContextFolder->SetElementBackgroundColor(IDA_CONTEXT_ITEM_DELETE,LIST_CONTEXT_ITEM_ELEMENT_STATUS_HIGHLIGHTED , CONTEXT_ITEM_DELETE_COLOR); - __pItemContextFolder->SetElementBackgroundColor(IDA_CONTEXT_ITEM_DELETE,LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED , CONTEXT_ITEM_DELETE_COLOR); __pItemContextFolder->AddElement(IDA_CONTEXT_ITEM_FOLDER_DELETE, CommonUtil::GetString(L"IDS_BR_SK_DELETE_ABB"), true); + __pItemContextFolder->SetElementBackgroundColor(IDA_CONTEXT_ITEM_FOLDER_DELETE,LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL , CONTEXT_ITEM_DELETE_COLOR); + __pItemContextFolder->SetElementBackgroundColor(IDA_CONTEXT_ITEM_FOLDER_DELETE,LIST_CONTEXT_ITEM_ELEMENT_STATUS_HIGHLIGHTED , CONTEXT_ITEM_DELETE_COLOR); + __pItemContextFolder->SetElementBackgroundColor(IDA_CONTEXT_ITEM_FOLDER_DELETE,LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED , CONTEXT_ITEM_DELETE_COLOR); __pItemContextSite = new(std::nothrow) ListContextItem(); __pItemContextSite->Construct(); diff --git a/src/IntBookmarkPresentationModel.cpp b/src/IntBookmarkPresentationModel.cpp index 65d269a..69f24ec 100644 --- a/src/IntBookmarkPresentationModel.cpp +++ b/src/IntBookmarkPresentationModel.cpp @@ -127,9 +127,9 @@ BookmarkPresentationModel::SaveBookmark(BookmarkData& bookmark) DateTime dt; String bookmarkId; String bookmarkTitle = bookmark.GetBookmarkTitle(); - bookmarkTitle.Replace(L"'", L"''"); + bookmarkTitle.Replace(L"'", L"\'"); String bookmarkUrl = bookmark.GetUrl(); - bookmarkUrl.Replace(L"'", L"''"); + bookmarkUrl.Replace(L"'", L"\'"); AppLog("BookmarkPresentationModel::SaveBookmark"); @@ -297,9 +297,9 @@ BookmarkPresentationModel::SaveTempBookmark(BookmarkData& bookmark) DateTime dt; String bookmarkId; String bookmarkTitle = bookmark.GetBookmarkTitle(); - bookmarkTitle.Replace(L"'", L"''"); + bookmarkTitle.Replace(L"'", L"\'"); String bookmarkUrl = bookmark.GetUrl(); - bookmarkUrl.Replace(L"'", L"''"); + bookmarkUrl.Replace(L"'", L"\'"); PresentationModelBase::GetCurrentDateTime(dt); @@ -715,7 +715,7 @@ BookmarkPresentationModel::GetSearchBookmarkCount(int& searchBookmarkCount, Stri String bookmarkTable(BOOKMARK_URL_TABLE); result r = E_FAILURE; bool nextRowPresent = false; - text.Replace(L"'", L"''"); + text.Replace(L"'", L"\'"); query.Append(L"SELECT COUNT(ID) FROM "); query.Append(bookmarkTable); @@ -742,7 +742,7 @@ BookmarkPresentationModel::GetSearchBookmarkCount(int& searchBookmarkCount, Stri searchBookmarkCount = intVal; CATCH: - text.Replace(L"''", L"'"); +// text.Replace(L"''", L"'"); return r; } @@ -758,7 +758,7 @@ BookmarkPresentationModel::GetSearchFolderCount(int& searchFolderCount, String& String bookmarkTable(BOOKMARK_URL_TABLE); result r = E_FAILURE; bool nextRowPresent = false; - text.Replace(L"'", L"''"); + text.Replace(L"'", L"\'"); query.Append(L"SELECT COUNT(ID) FROM "); query.Append(bookmarkTable); @@ -781,7 +781,7 @@ BookmarkPresentationModel::GetSearchFolderCount(int& searchFolderCount, String& searchFolderCount = intVal; CATCH: - text.Replace(L"''", L"'"); +// text.Replace(L"''", L"'"); return r; } @@ -813,7 +813,7 @@ BookmarkPresentationModel::GetSearchBookmark(int startIndex, int limit, ArrayLis String bookmarkTable(BOOKMARK_URL_TABLE); result r = E_FAILURE; - text.Replace(L"'", L"''"); + text.Replace(L"'", L"\'"); query.Append(L"SELECT * FROM "); query.Append(bookmarkTable); query.Append(L" WHERE ((TITLE LIKE '%"); @@ -845,7 +845,7 @@ BookmarkPresentationModel::GetSearchBookmark(int startIndex, int limit, ArrayLis TryCatch( r == E_SUCCESS,,"BookmarkPresentationModel::CreateBookmarkList failed %s",GetErrorMessage(r)); CATCH: - text.Replace(L"''", L"'"); +// text.Replace(L"''", L"'"); return r; } @@ -856,7 +856,7 @@ BookmarkPresentationModel::GetSearchFolder(int startIndex, int limit, ArrayList& String query; String bookmarkTable(BOOKMARK_URL_TABLE); result r = E_FAILURE; - text.Replace(L"'", L"''"); + text.Replace(L"'", L"\'"); query.Append(L"SELECT * FROM "); query.Append(bookmarkTable); @@ -888,7 +888,7 @@ BookmarkPresentationModel::GetSearchFolder(int startIndex, int limit, ArrayList& TryCatch( r == E_SUCCESS,,"BookmarkPresentationModel::CreateBookmarkList failed %s",GetErrorMessage(r)); CATCH: - text.Replace(L"''", L"'"); +// text.Replace(L"''", L"'"); return r; } diff --git a/src/IntBrightnessForm.cpp b/src/IntBrightnessForm.cpp index 8ceeac0..8de040f 100644 --- a/src/IntBrightnessForm.cpp +++ b/src/IntBrightnessForm.cpp @@ -244,11 +244,12 @@ BrightnessForm::OnFormBackRequested(Form& source) void BrightnessForm::OnActionPerformed(const Control& source, int actionId) { + result r = E_SUCCESS; switch (actionId) { case IDA_AUTOBTN_CLICKED: __manualBrightness = false; -// __pBrightnessSlider->SetValue(6); + __pBrightnessSlider->SetValue(6); // __pBrightnessSlider->SetShowState(false); PowerManager::SetScreenBrightness(6); __pBrightnessSlider->SetEnabled(false); @@ -266,6 +267,24 @@ BrightnessForm::OnActionPerformed(const Control& source, int actionId) default: break; } + // save the slider value + // save the tab button + AppRegistry* pAppRegistry = App::GetInstance()->GetAppRegistry(); + String sliderKey("SliderValue"); + String tabKey("TabButton"); + int sliderValue = __pBrightnessSlider->GetValue(); + r = pAppRegistry->Set(sliderKey,sliderValue); + FooterItemStatus footerStatus; + GetFooter()->GetItemStatus(0,footerStatus); + if (footerStatus == FOOTER_ITEM_STATUS_SELECTED) + { + r = pAppRegistry->Set(tabKey,0); + } + else + { + r = pAppRegistry->Set(tabKey,1); + } + pAppRegistry->Save(); } void diff --git a/src/IntEditBookmarkListForm.cpp b/src/IntEditBookmarkListForm.cpp index f9dbe6e..856c734 100644 --- a/src/IntEditBookmarkListForm.cpp +++ b/src/IntEditBookmarkListForm.cpp @@ -205,10 +205,10 @@ EditBookmarkListForm::OnActionPerformed(const Tizen::Ui::Control& source, int ac } break; case IDA_BUTTON_NO: - __pConfirmationPopup->SetShowState(false); - __pConfirmationPopup->Show(); if(__pConfirmationPopup) { + __pConfirmationPopup->SetShowState(false); + __pConfirmationPopup->Show(); delete __pConfirmationPopup; __pConfirmationPopup = null; } diff --git a/src/IntEditHistoryListForm.cpp b/src/IntEditHistoryListForm.cpp index 0f38013..4c3e04e 100644 --- a/src/IntEditHistoryListForm.cpp +++ b/src/IntEditHistoryListForm.cpp @@ -274,10 +274,10 @@ EditHistoryListForm::OnActionPerformed(const Tizen::Ui::Control& source, int act } break; case IDA_BUTTON_NO: - __pConfirmationPopup->SetShowState(false); - __pConfirmationPopup->Show(); if(__pConfirmationPopup) { + __pConfirmationPopup->SetShowState(false); + __pConfirmationPopup->Show(); delete __pConfirmationPopup; __pConfirmationPopup = null; } diff --git a/src/IntHistoryListForm.cpp b/src/IntHistoryListForm.cpp index f6d597e..37166e6 100644 --- a/src/IntHistoryListForm.cpp +++ b/src/IntHistoryListForm.cpp @@ -302,11 +302,7 @@ HistoryListForm::OnActionPerformed(const Control& source, int actionId) } } -// r = pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT)); - if (IsFailed(r)) - { - return; - } + } break; default: diff --git a/src/IntHistoryPresentationModel.cpp b/src/IntHistoryPresentationModel.cpp index 07d7f58..ccce674 100644 --- a/src/IntHistoryPresentationModel.cpp +++ b/src/IntHistoryPresentationModel.cpp @@ -337,6 +337,7 @@ void HistoryPresentationModel::UpdateHistoryFavIcon(History& history, Tizen::Gra // added because conversion may fail if(GetLastResult() != E_SUCCESS) return; + delete pFavBuffer; history.SetFavIconBitmap(favIconImage); delete pImage; diff --git a/src/IntInternetApp.cpp b/src/IntInternetApp.cpp index 6932a3d..6ececde 100644 --- a/src/IntInternetApp.cpp +++ b/src/IntInternetApp.cpp @@ -186,17 +186,6 @@ InternetApp::OnAppInitialized(void) return false; } - AppRegistry* pAppRegistry = App::GetInstance()->GetAppRegistry(); - String sliderKey("SliderValue"); - - int sliderValue = 0; - - - r = pAppRegistry->Get(sliderKey, sliderValue); - r = PowerManager::SetScreenBrightness(sliderValue); - - AppLog("Settingscreenbrightness to %d result %s",sliderValue , GetErrorMessage(r)); - delete pArgList; pArgList = null; __pNewWindowInfo = null; @@ -224,6 +213,21 @@ InternetApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination) void InternetApp::OnForeground(void) { + AppLog("InternetApp::OnForeground"); + + AppRegistry* pAppRegistry = App::GetInstance()->GetAppRegistry(); + String sliderKey("SliderValue"); + + int sliderValue = 0; + + + result r = pAppRegistry->Get(sliderKey, sliderValue); + r = PowerManager::SetScreenBrightness(sliderValue); +// r = PowerManager::RestoreScreenBrightness(); + + AppLog("Settingscreenbrightness to %d result %s",sliderValue , GetErrorMessage(r)); + + Form* pCurrentForm = (SceneManager::GetInstance()->GetCurrentScene()->GetForm()); if (pCurrentForm) { diff --git a/src/IntMainForm.cpp b/src/IntMainForm.cpp index 056e076..4372b64 100644 --- a/src/IntMainForm.cpp +++ b/src/IntMainForm.cpp @@ -246,6 +246,11 @@ MainForm::~MainForm(void) delete __pHitElementResult; __pHitElementResult = null; } + if(__pOptionMenu) + { + delete __pOptionMenu; + __pOptionMenu = null; + } String* pSelectedScene = NULL; Object* pValue = NULL; @@ -262,8 +267,7 @@ MainForm::~MainForm(void) bool MainForm::Initialize(void) { - InternetApp* pInternet = static_cast (Application::GetInstance()); - Construct(L"IDL_FORM_HW_KEY"); + Construct(L"IDL_FORM"); // SetFormStyle(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_FOOTER); return true; @@ -793,6 +797,10 @@ result MainForm::InitImageContextMenu(Tizen::Graphics::Point p) delete __pImageMenu; __pImageMenu = null; } + if(GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE) + { + p.y = p.y + 54; + } __pImageMenu = new (std::nothrow) ContextMenu(); r = __pImageMenu->Construct(p, CONTEXT_MENU_STYLE_LIST, direction); @@ -822,8 +830,8 @@ MainForm::InitImageLinkContextMenu(Tizen::Graphics::Point p) __pImageMenu = null; } - if(__pAddressbar->GetShowState() == true) - p.y = p.y + __pAddressbar->GetHeight(); +// if(__pAddressbar->GetShowState() == true) +// p.y = p.y + __pAddressbar->GetHeight(); if(GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE) { p.y = p.y + 54; @@ -894,8 +902,6 @@ MainForm::InitSelectTextContextMenu(Point p, bool pasteOption, bool onlyPasteOpt } - - result MainForm::InitSelectTextContextMenuF(FloatPoint p, bool pasteOption, bool onlyPasteOption = false) { @@ -1595,7 +1601,7 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) if(__pNotification != null) { - delete __pNotification; + RemoveControl(__pNotification); __pNotification = null; } __pNotification = new (std::nothrow) NotificationPanel(*this); @@ -1625,7 +1631,7 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) delete pBookmark; if(__pNotification != null) { - delete __pNotification; + RemoveControl(__pNotification); __pNotification = null; } __pNotification = new (std::nothrow) NotificationPanel(*this); @@ -1651,7 +1657,7 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) break; case IDA_PRINT_CLICKED: { - r = __pWebViewer->SavePageAsPdf(UiApp::GetInstance()->GetAppRootPath()+"//data//test.pdf"); + r = __pWebViewer->SavePageAsPdf(UiApp::GetInstance()->GetAppRootPath()+"//shared//data//test.pdf"); AppLog("SavePageAsPdf result %s",GetErrorMessage(r)); AppLog("RequestPrint called!"); @@ -1670,7 +1676,7 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) String fileCount = L"service_print_files_count"; String countVal = L"1"; String fileFolder= L"service_print_files_folder_name"; - String folderVal = UiApp::GetInstance()->GetAppRootPath()+"//data"; + String folderVal = UiApp::GetInstance()->GetAppRootPath()+"//shared//data"; map.Add(&fileCount, &countVal); map.Add(&fileFolder, &folderVal); @@ -2062,7 +2068,7 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) delete pBuffer; if(__pNotification != null) { - delete __pNotification; + RemoveControl(__pNotification); __pNotification = null; } __pNotification = new NotificationPanel(*this); @@ -2956,6 +2962,13 @@ MainForm::OnLoadingCompleted(void) { return; } + + if(__pImageMenu && __pImageMenu->GetShowState()) + { + __pImageMenu->SetShowState(false); + __pImageMenu->Invalidate(true); + } + if (__pWebViewer->CanGoForward()) { //__pAddressbar->SetForwardButtonEnabled(true); @@ -3116,6 +3129,7 @@ void MainForm::OnEstimatedProgress(int progress) { AppLogDebug("MainForm::OnEstimatedProgress entered"); + if (progress < DEFAULT_PROGRESS_PERCENTAGE) progress = DEFAULT_PROGRESS_PERCENTAGE; //if(__pAddressbar) @@ -3598,11 +3612,11 @@ MainForm::UpdateFavicon(void) } - bool MainForm::OnLoadingRequested(const Tizen::Base::String& url, Tizen::Web::Controls::WebNavigationType type) { + AppLog("urlk %ls",url.GetPointer()); // when load new page if find word panel is open its show state is false if(__pFindWordControl && __pFindWordControl->GetShowState() == true) { @@ -3618,8 +3632,6 @@ MainForm::OnLoadingRequested(const Tizen::Base::String& url, RelayoutControls(false); } - - __pFooterPanel->Invalidate(true); Uri uriInfo; @@ -3690,7 +3702,6 @@ MainForm::OnWebDataReceived(const Tizen::Base::String& mime, return Tizen::Web::Controls::WEB_DECISION_CONTINUE; } - void MainForm::OnWebPageBlockSelected(Web& source, FloatPoint& startPoint, FloatPoint& endPoint) { @@ -3739,7 +3750,7 @@ MainForm::OnWebPageBlockSelected(Web& source, FloatPoint& startPoint, FloatPoint { AppLog("MainForm::OnWebPageBlockSelected show paste option"); - InitSelectTextContextMenuF(endPoint,true); + InitSelectTextContextMenuF(FloatPoint(endPoint.x,endPoint.y + __pWebViewer->GetY()),true); __pImageMenu->SetShowState(true); __pImageMenu->Show(); __pImageMenu->Invalidate(true); @@ -3753,7 +3764,7 @@ MainForm::OnWebPageBlockSelected(Web& source, FloatPoint& startPoint, FloatPoint __currentSelectedStr.Clear(); __currentSelectedStr = __pHitElementResult->GetUrl(); } - InitSelectTextContextMenuF(endPoint,false); + InitSelectTextContextMenuF(FloatPoint(endPoint.x,endPoint.y + __pWebViewer->GetY()),false); __pImageMenu->SetShowState(true); __pImageMenu->Show(); __pImageMenu->Invalidate(true); @@ -4239,7 +4250,8 @@ void MainForm::OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen: if (__pHitElementResult->HasImage() == true) { - InitImageContextMenu(currentPosition); + if(__pWebViewer != null) + InitImageContextMenu(Point(currentPosition.x,currentPosition.y + __pWebViewer->GetY())); __pImageMenu->SetShowState(true); __pImageMenu->Show(); __pImageMenu->Invalidate(true); @@ -4257,7 +4269,7 @@ void MainForm::OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen: { AppLog(null); } - InitImageLinkContextMenu(currentPosition); + InitImageLinkContextMenu(Point(currentPosition.x,currentPosition.y + __pWebViewer->GetY())); __pImageMenu->SetShowState(true); __pImageMenu->Show(); __pImageMenu->Invalidate(true); @@ -4283,7 +4295,7 @@ void MainForm::OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen: { AppLog("MainForm::OnWebPageBlockSelected show paste option"); - InitSelectTextContextMenu(currentPosition,true, true); + InitSelectTextContextMenu(Point(currentPosition.x , currentPosition.y + __pWebViewer->GetY()),true, true); if(__pImageMenu) { __pImageMenu->SetShowState(true); @@ -4790,7 +4802,9 @@ MainForm::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics pList->RemoveAll(true); delete pList; } -// RelayoutControls(false); + if(__pAddressbar) + __pAddressbar->SetShowState(false); + RelayoutControls(false); return; } @@ -5166,82 +5180,6 @@ MainForm::ReaderClicked() return; - int bodyWidth = ((double)(GetClientAreaBounds().width))*0.73; - - CreateReaderPanel(); - AppLogDebug("MainScene::ReaderClicked entered"); - - - /*if (__pArticleReaderPanel) - { - AppLogDebug("showstate true for reader panel"); - __pArticleReaderPanel->SetShowState(true); - __pArticleReaderPanel->Show(); - }*/ - int xPos = __pArticleReaderPanel->GetX(); - int yPos = __pArticleReaderPanel->GetY(); - AppLog("ReaderClicked() xPos = %d",xPos); - AppLog("ReaderClicked() yPos = %d",yPos); - - if (__pReaderData == null) - { - return; - } - - String loadData = L"\ - \ - \ - \ - \ - "); - AppLogDebug("data->GetLength %d",__pReaderData->GetLength()); - loadData.Append(*__pReaderData); - loadData.Append(L""); - - ByteBuffer buf ; - buf.Construct(loadData.GetLength()); - AppLogDebug("data->GetLength %d",loadData.GetLength()); - for (int z=0;zLoadData(L"",buf,L"text/html"); - AppLogDebug("LoadData result %s",GetErrorMessage(GetLastResult())); - } - else - { - AppLogDebug("cannot LoadData __pWebReader is null"); - } - } void MainForm::SetAddressbarMode(AddressBarMode addMode) diff --git a/src/IntPresentationModelBase.cpp b/src/IntPresentationModelBase.cpp index a8b9260..16e70e0 100644 --- a/src/IntPresentationModelBase.cpp +++ b/src/IntPresentationModelBase.cpp @@ -263,13 +263,6 @@ PresentationModelBase::DropDBTables(void) query.Format(MAX_DB_QUERY_SIZE, L"DROP TABLE IF EXISTS FaviconData"); break; } - - default: - { - AppLogDebug("PresentationModelBase::CreateDBTables: Table Type:%d is invalid", tableIndex); - break; - } - } r = PresentationModelBase::ExecuteQuery(query, resultCount); @@ -377,9 +370,9 @@ PresentationModelBase::ExecuteBookmarkQuery(const Tizen::Base::String& formatQue DateTime dt; String bookmarkId; String bookmarkTitle = bookmark.GetBookmarkTitle(); - bookmarkTitle.Replace(L"'", L"''"); + bookmarkTitle.Replace(L"'", L"\'"); String bookmarkUrl = bookmark.GetUrl(); - bookmarkUrl.Replace(L"'", L"''"); + bookmarkUrl.Replace(L"'", L"\'"); PresentationModelBase::GetCurrentDateTime(dt); @@ -506,10 +499,10 @@ PresentationModelBase::ExecuteHistoryQuery(const Tizen::Base::String& formatQuer int count; String historyTitle = history.GetHistoryTitle(); - historyTitle.Replace(L"'", L"''"); + historyTitle.Replace(L"'", L"\'"); String historyUrl = history.GetHistoryUrl(); - historyUrl.Replace(L"'", L"''"); + historyUrl.Replace(L"'", L"\'"); GetCurrentDateTime(date); @@ -998,15 +991,6 @@ PresentationModelBase::GetCurrentDateTime(DateTime& dt) r = SystemTime::GetCurrentTime(dt); return true; - if (IsFailed(r)) - { - return false; - } - localManager.Construct(); - tz = localManager.GetSystemTimeZone(); - dt = tz.UtcTimeToWallTime(dtNow); - - return true; } String diff --git a/src/IntRadioCustomItem.cpp b/src/IntRadioCustomItem.cpp index 69892b6..5aa68e1 100644 --- a/src/IntRadioCustomItem.cpp +++ b/src/IntRadioCustomItem.cpp @@ -30,18 +30,13 @@ using namespace Tizen::Base; using namespace Tizen::Graphics; using namespace Tizen::Ui::Controls; -static const wchar_t* IDB_BUTTON_RADIO_PRESS2 = L"00_button_radio_selected.png"; -static const wchar_t* IDB_BUTTON_RADIO_PRESS1 = L"00_button_radio.png"; - const int RadioCustomItem::IDA_FORMAT_STRING = 500; -const int RadioCustomItem::IDA_FORMAT_RADIO_BUTTON = 501; RadioCustomItem::RadioCustomItem(void) { __width = 0; __height = 0; __text = L""; - __isSelected = false; } RadioCustomItem::~RadioCustomItem(void) @@ -57,7 +52,7 @@ RadioCustomItem::Construct(int width, int height) __width = width; __height = height; const Dimension dim(width, height); - r = CustomItem::Construct(dim, LIST_ANNEX_STYLE_NORMAL); + r = CustomItem::Construct(dim, LIST_ANNEX_STYLE_RADIO); return r; } @@ -80,42 +75,11 @@ RadioCustomItem::Make(void) result r = E_FAILURE; Color textColor = CUSTOM_COLOR_LISTVIEW_TEXT2; Color pressedTextColor = CUSTOM_COLOR_LISTVIEW_TEXT; - Bitmap* pBitmap = null; - - if (__isSelected == true) - { - pBitmap = AppResource::GetInstance()->GetBitmapN(IDB_BUTTON_RADIO_PRESS2); - } - else - { - pBitmap = AppResource::GetInstance()->GetBitmapN(IDB_BUTTON_RADIO_PRESS1); - } - - if ( pBitmap != NULL) - { - AddElement(Rectangle(26, (__height-pBitmap->GetHeight())/2 + (__fontSize - 44)/2, pBitmap->GetWidth(), pBitmap->GetHeight()), IDA_FORMAT_RADIO_BUTTON, *pBitmap, null); - AppLogDebug("RadioCustomItem::the text is %ls",__text.GetPointer()); - r = AddElement(Rectangle(26 + pBitmap->GetWidth() + 10, 5, __width - 26 - 10 - pBitmap->GetWidth(), __height), IDA_FORMAT_STRING, __text, __fontSize, textColor, textColor, textColor, true); - delete pBitmap; - } + AppLogDebug("RadioCustomItem::the text is %ls",__text.GetPointer()); + r = AddElement(Rectangle(16, 5, __width - 16 , __height), IDA_FORMAT_STRING, __text, __fontSize, textColor, textColor, textColor, true); TryCatch(!IsFailed(r),,"RadioCustomItem::the value is %s",GetErrorMessage(r)); -// r = SetElementSelectionEnabled(IDA_FORMAT_STRING, true); -// TryCatch(!IsFailed(r),,"RadioCustomItem::the value is %s",GetErrorMessage(r)); - CATCH: return r; } - -void -RadioCustomItem::SetSelected(bool selectedValue) -{ - __isSelected = selectedValue; -} - -bool -RadioCustomItem::GetSelected(void) -{ - return __isSelected; -} diff --git a/src/IntSettingForm.cpp b/src/IntSettingForm.cpp index a41bafe..fbb3a3e 100644 --- a/src/IntSettingForm.cpp +++ b/src/IntSettingForm.cpp @@ -258,7 +258,6 @@ SettingForm::OnInitializing(void) SceneManager* pSceneManager = NULL; __fontSize = CommonUtil::GetFontSize(); - InternetApp* pInternet = static_cast (Application::GetInstance()); bool isHwKeySupported = false; @@ -657,8 +656,6 @@ SettingForm::CreateItem(int groupIndex, int itemIndex, int itemWidth) } else if (settingInfo[effectiveIndex].itemType == ITEM_TYPE_RADIO) { - - RadioCustomItem* pItem = new(std::nothrow) RadioCustomItem(); int parentIndex = 0; for (parentIndex = effectiveIndex; parentIndex > SETTING_INVALID; parentIndex--) @@ -702,7 +699,8 @@ SettingForm::CreateItem(int groupIndex, int itemIndex, int itemWidth) //if (pBitmap != null) // pItem->AddElement(Rectangle(0, 0, 10, 112), IDA_LIST_LEFT_SIDE_MARGIN, *pBitmap, null); - pItem->SetSelected(settingInfo[effectiveIndex].isSelected); +// pItem->SetSelected(settingInfo[effectiveIndex].isSelected); + __pList->SetItemChecked(groupIndex,itemIndex,settingInfo[effectiveIndex].isSelected); pItem->Make(); return pItem; -- 2.7.4