Fixed Nabi Issues N_SE-38286,37681,38609,38669,38570,38534,38537,38607,38564,38605...
authorVinay Sachdeva <v.sachdeva@samsung.com>
Wed, 15 May 2013 22:09:18 +0000 (03:39 +0530)
committerVinay Sachdeva <v.sachdeva@samsung.com>
Wed, 15 May 2013 22:09:18 +0000 (03:39 +0530)
Change-Id: I091b45105c58e76bf7335f5bc44cf5eb3be6f368
Signed-off-by: Vinay Sachdeva <v.sachdeva@samsung.com>
src/IntAddressbar.cpp
src/IntBookmarkListForm.cpp
src/IntEditHistoryListForm.cpp
src/IntHistory.cpp
src/IntHistoryListForm.cpp
src/IntHistoryPresentationModel.cpp
src/IntMainForm.cpp
src/IntSharePopup.cpp

index 6bbac6a..3172c48 100644 (file)
@@ -684,7 +684,7 @@ Addressbar::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 void
 Addressbar::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction)
 {
-       AppLog("Addressbar::OnKeypadActionPerformed keypadAction %d",keypadAction);
+       AppLog("XYZ::Addressbar::OnKeypadActionPerformed keypadAction %d",keypadAction);
        switch (keypadAction)
        {
        case KEYPAD_ACTION_GO:
@@ -722,7 +722,7 @@ Addressbar::OnKeypadClosed(Tizen::Ui::Control& source)
 //     String state = L"";
 //     result r  = DeviceManager::GetState(DEVICE_TYPE_KEYBOARD,state);
 //     AppLog("Device State %S error %s",state.GetPointer(),GetErrorMessage(r));
-
+       AppLog("XYZ::Addressbar::OnKeypadClosed");
        if(__isKeyboardConnected == true)
        {
                return;
@@ -762,6 +762,7 @@ Addressbar::OnKeypadClosed(Tizen::Ui::Control& source)
 void
 Addressbar::OnKeypadOpened(Tizen::Ui::Control& source)
 {
+       AppLog("XYZ::Addressbar::OnKeypadOpened");
 //     String state = L"";
 //     result r = DeviceManager::GetState(DEVICE_TYPE_KEYBOARD,state);
 //     AppLog("Device State %S error %s",state.GetPointer(),GetErrorMessage(r));
@@ -773,6 +774,7 @@ Addressbar::OnKeypadOpened(Tizen::Ui::Control& source)
 void
 Addressbar::OnKeypadWillOpen(Tizen::Ui::Control& source)
 {
+       AppLog("XYZ::Addressbar::OnKeypadWillOpen");
        if(__pListener != null)
        {
                __pListener->OnAddressBarKeypadWillOpen(*this);
@@ -857,7 +859,7 @@ Addressbar::OnFocusGained(const Control& source)
 {
        //SetAddressbarMode(ADDRESSBAR_MODE_EDIT);
        //      SetAddressbarMode(__prevAddMode);
-       AppLog("Focus:: Addressbar::OnFocusGained called");
+       AppLog("XYZ::Addressbar::OnFocusGained");
        if(__pAddressbarUrlField != null)
        {
                __pAddressbarUrlField->SetCursorPosition(__pAddressbarUrlField->GetTextLength());
@@ -880,7 +882,7 @@ Addressbar::OnFocusGained(const Control& source)
 void
 Addressbar::OnFocusLost(const Tizen::Ui::Control& source)
 {
-       AppLog("Focus::Addressbar::OnFocusLost");
+       AppLog("XYZ::Addressbar::OnFocusLost");
        if(__pAddressbarUrlField)
        {
                String removedHttpUrl = RemoveHttpTextFromDisplayURL();
index 758f0e6..815adf8 100644 (file)
@@ -1008,6 +1008,7 @@ void
 BookmarkListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, Tizen::Ui::Controls::SearchBarMode mode)
 {
        result r = E_FAILURE;
+       AppLog("ABCD::BookmarkListForm::OnSearchBarModeChanged");
 
        if (mode == SEARCH_BAR_MODE_NORMAL)
        {
@@ -1042,7 +1043,8 @@ BookmarkListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source,
 void
 BookmarkListForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
 {
-       GetFooter()->SetShowState(false);
+       AppLog("ABCD::BookmarkListForm::OnKeypadWillOpen");
+
        __pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight());
        __pSearchListView->SetEnabled(false);
        __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), __pSearchListView->GetHeight()));
@@ -1052,6 +1054,8 @@ BookmarkListForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
 void
 BookmarkListForm::OnKeypadOpened(Tizen::Ui::Control& source)
 {
+       GetFooter()->SetShowState(false);
+       AppLog("ABCD::BookmarkListForm::OnKeypadOpened");
        __pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), __pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
        Invalidate(true);
 }
@@ -1059,6 +1063,7 @@ BookmarkListForm::OnKeypadOpened(Tizen::Ui::Control& source)
 void
 BookmarkListForm::OnKeypadClosed(Tizen::Ui::Control& source)
 {
+       AppLog("ABCD::BookmarkListForm::OnKeypadClosed");
        AppLog("jahsjkdad %d",Clipboard::GetInstance()->IsPopupVisible());
        if(Clipboard::GetInstance()->IsPopupVisible() == true)
        {
index 6afe86e..69e7fc2 100644 (file)
@@ -419,29 +419,36 @@ EditHistoryListForm::CreateGroupItem(int groupIndex, int itemWidth)
        {
        case 1:
                text.Append(L"Sun");
+               text.Append(L", ");
                break;
        case 2:
                text.Append(L"Mon");
+               text.Append(L", ");
                break;
        case 3:
                text.Append(L"Tue");
+               text.Append(L", ");
                break;
        case 4:
                text.Append(L"Wed");
+               text.Append(L", ");
                break;
        case 5:
                text.Append(L"Thu");
+               text.Append(L", ");
                break;
        case 6:
                text.Append(L"Fri");
+               text.Append(L", ");
                break;
        case 7:
                text.Append(L"Sat");
+               text.Append(L", ");
                break;
        default:
                break;
        }
-       text.Append(L", ");
+
 
        String month = L"";
 
index 82ad2ee..85f1fd7 100644 (file)
@@ -218,6 +218,11 @@ History::SetFavIconBitmap(Tizen::Graphics::Bitmap& favIconImage)
        Image* pImage = null;
        pImage = new Image();
        pImage->Construct();
+       if (__pFavIconData != null)
+       {
+               delete __pFavIconData;
+               __pFavIconData = null;
+       }
        __pFavIconData = pImage->EncodeToBufferN(favIconImage,Tizen::Media::IMG_FORMAT_PNG);
 
        __favIconWidth = favIconImage.GetWidth();
index fc92f05..a3fdda1 100644 (file)
@@ -560,7 +560,7 @@ HistoryListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
        }
        if (pBitmap != null)
        {
-               r = pItem->AddElement(Rectangle(16, 28, 72, 72), IDA_FORMAT_ICON, *pBitmap, null);
+               r = pItem->AddElement(Rectangle(16, 28,72, 72), IDA_FORMAT_ICON, *pBitmap, null);
                delete pBitmap;
                if (IsFailed(r))
                {
@@ -1010,6 +1010,7 @@ HistoryListForm::OnSearchBarModeChanged(SearchBar& source, SearchBarMode mode)
                {
                        return;
                }
+
                __pSearchListView->SetEnabled(true);
                if(__pSearchBar != null)
                        __pGroupedListView->SetBounds(0, __pSearchBar->GetY() + __pSearchBar->GetHeight(), GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight());
@@ -1035,8 +1036,7 @@ HistoryListForm::OnSearchBarModeChanged(SearchBar& source, SearchBarMode mode)
        }
        else
        {
-               // added
-               GetFooter()->SetShowState(false);
+
                //              __pSearchListView->SetEnabled(false);
                r = __pSearchListView->SetShowState(true);
                if (IsFailed(r))
@@ -1089,7 +1089,7 @@ HistoryListForm::GetMonth(int month)
                monthValue.Append(CommonUtil::GetString(L"IDS_COM_BODY_JUL"));
                break;
        case AUGUST:
-               monthValue.Append(CommonUtil::GetString(L"DS_COM_BODY_AUG"));
+               monthValue.Append(CommonUtil::GetString(L"IDS_COM_BODY_AUG"));
                break;
        case SEPTEMBER:
                monthValue.Append(CommonUtil::GetString(L"IDS_COM_BODY_SEP"));
@@ -1228,6 +1228,9 @@ HistoryListForm::OnKeypadWillOpen(Control& source)
 void
 HistoryListForm::OnKeypadOpened(Control& source)
 {
+       // this is added because some time footer is shown when key pad is opened, do not remove
+       GetFooter()->SetShowState(false);
+       GetFooter()->Invalidate(true);
        __pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), __pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
 }
 
index 732d930..a325f4c 100644 (file)
@@ -333,12 +333,8 @@ void HistoryPresentationModel::UpdateHistoryFavIcon(History& history, Tizen::Gra
        pImage = new Image();
        pImage->Construct();
 
-       int __favIconWidth = favIconImage.GetWidth();
-       int __favIconHeight = favIconImage.GetHeight();
-
        Tizen::Base::ByteBuffer* pFavBuffer = pImage->EncodeToBufferN(favIconImage, IMG_FORMAT_PNG);
-
-       history.SetFavIconBuffer(*pFavBuffer);
+       history.SetFavIconBitmap(favIconImage);
 
        delete pImage;
 
index caab5ef..b0ae21e 100644 (file)
@@ -874,8 +874,6 @@ MainForm::InitSelectTextContextMenu(Tizen::Graphics::Point p, bool pasteOption,
 {
        result r = E_SUCCESS;
        ContextMenuAnchorDirection direction = CONTEXT_MENU_ANCHOR_DIRECTION_AUTO;
-       if(onlyPasteOption == true)
-               return E_SUCCESS;
 
        AppLog("MainForm::InitSelectTextContextMenu clicked on text");
        if (__pImageMenu != null)
@@ -2100,7 +2098,7 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
        case IDA_FIND_TEXT__CLICKED:
        {
                OnAddressCancelledClicked(*__pAddressbar);
-               __pFooterPanel->SetShowState(false);
+//             __pFooterPanel->SetShowState(false);
                AppLogDebug("MainForm::OnActionPerformed find word clicked");
                __currentSearchStr.Clear();
                __currentSearchStr.Append(__currentSelectedStr);
@@ -2213,7 +2211,8 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                        String nameElement = __pHitElementResult->GetAttributeValue(L"name");
                        AppLog("MainForm::IDA_PASTE_TEXT_CLICKED id is %ls",idElement.GetPointer());
 //                     String script = L"function insertAtCursor(myField, myValue) {   if (document.selection) {               myField.focus();                sel = document.selection.createRange();                 sel.text = myValue;     }               else if (myField.selectionStart || myField.selectionStart == '0'){              var startPos = myField.selectionStart;          var endPos = myField.selectionEnd;              myField.value = myField.value.substring(0, startPos)+ myValue + myField.value.substring(endPos, myField.value.length);          } else {                        myField.value += myValue;               }       } ";
-                       String script = L"function insertAtCursor(myField, myValue) {  if (document.selection) {   document.getElementById(myField).focus();   sel = document.selection.createRange();   sel.text = myValue;  }   else if (document.getElementById(myField).selectionStart || document.getElementById(myField).selectionStart == '0'){   var startPos = document.getElementById(myField).selectionStart;   var endPos = document.getElementById(myField).selectionEnd;   document.getElementById(myField).value = document.getElementById(myField).value.substring(0, startPos)+ myValue + document.getElementById(myField).value.substring(endPos, document.getElementById(myField).value.length);   } else {    document.getElementById(myField).value += myValue;   }  } ";
+                       String script = L"function insertAtCursor(myField, myValue) {  if (document.selection) {   document.getElementById(myField).focus();   sel = document.selection.createRange();   sel.text = myValue;  }   else if (document.getElementById(myField).selectionStart || document.getElementById(myField).selectionStart == '0'){   var startPos = document.getElementById(myField).selectionStart;   var endPos = document.getElementById(myField).selectionEnd;   document.getElementById(myField).value = document.getElementById(myField).value.substring(0, startPos)+ myValue + document.getElementById(myField).value.substring(endPos, document.getElementById(myField).value.length);   } else {    document.getElementById(myField).value += myValue;   }  } ";//by hyunn.lee
+
                        if(idElement.GetLength() != 0)
                        {
                                script.Append("insertAtCursor('");
@@ -2582,6 +2581,12 @@ MainForm::OnLoadingStarted(void)
                        return;
                }
        }
+       if ( __pAddressbar != null && __pAddressbar->GetShowState() == true)
+       {
+               __pAddressbar->SetShowState(false);
+               OnAddressCancelledClicked(*__pAddressbar);
+               __pAddressbar->Invalidate(true);
+       }
        Bitmap* pBitmap = FaviconManager::GetInstance()->GetDefaultFaviconN();
        if(pBitmap != null)
        {
@@ -2622,7 +2627,7 @@ MainForm::OnLoadingCanceled(void)
 void
 MainForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
 {
-       AppLog("MainForm::OnKeypadWillOpen");
+       AppLog("XYZ::MainForm::OnKeypadWillOpen");
        if (__pAddressbar != null)
        {
                OnAddressBarKeypadWillOpen(*__pAddressbar);
@@ -2633,6 +2638,7 @@ MainForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
 void
 MainForm::OnKeypadOpened(Tizen::Ui::Control& source)
 {
+       AppLog("XYZ::MainForm::OnKeypadOpened");
        if(__pAddressbar != null)
        {
                OnAddressBarKeypadOpened(*__pAddressbar);
@@ -2643,7 +2649,7 @@ MainForm::OnKeypadOpened(Tizen::Ui::Control& source)
 void
 MainForm::OnKeypadClosed(Tizen::Ui::Control& source)
 {
-
+       AppLog("XYZ::MainForm::OnKeypadClosed");
 
        if (__pAddressbar != null)
        {
@@ -2788,8 +2794,6 @@ void MainForm::OnFaviconReceived(const Tizen::Graphics::Bitmap& favicon)
        AppLog("MainForm::OnFaviconReceived");
        if (__pWebViewer != null && __pHistory != null)
        {
-               Bitmap* pFavIconBitmap = __pWebViewer->GetFaviconN();
-
                HistoryPresentationModel::GetInstance()->UpdateHistoryFavIcon(*__pHistory, *(__pWebViewer->GetFaviconN()));
        }
 }
@@ -3309,7 +3313,11 @@ MainForm::UpdateFavicon(void)
        }
        else
        {
-               delete tempPath;
+               // do not remove
+               if(tempPath != null)
+               {
+                       delete tempPath;
+               }
                AppLogDebug("Error occured: %s", GetErrorMessage(GetLastResult()));
        }
 
@@ -3321,7 +3329,21 @@ MainForm::OnLoadingRequested(const Tizen::Base::String& url,
                Tizen::Web::Controls::WebNavigationType type)
 {
        // when load new page if find word panel is open its show state is false
-       ShowFindWordPanel(false);
+       if(__pFindWordControl && __pFindWordControl->GetShowState() == true)
+       {
+               __currentSearchStr = L"";
+               __currentWordIndex = 0;
+               __maxOccurrances = 0;
+               __pFindWordEditField->SetText(L"");
+               __pFindWordNext->SetEnabled(false);
+               __pFindWordPrev->SetEnabled(false);
+               __pFindWordCountLabel->SetText(L"0/0");
+//             __pWebViewer->SearchText(L"aaaabbbbcccc",true);
+               __pFindWordControl->SetShowState(false);
+               __pFindWordEditField->HideKeypad();
+       }
+
+//     ShowFindWordPanel(false);
 
        __pFooterPanel->Invalidate(true);
 
@@ -3384,12 +3406,6 @@ MainForm::OnLoadingRequested(const Tizen::Base::String& url,
                }
        }
 
-       if ( __pAddressbar != null && __pAddressbar->GetShowState() == true)
-       {
-               __pAddressbar->SetShowState(false);
-               OnAddressCancelledClicked(*__pAddressbar);
-               __pAddressbar->Invalidate(true);
-       }
        return false;
 }
 
@@ -3920,9 +3936,9 @@ void MainForm::OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen:
                        InitSelectTextContextMenu(currentPosition,true, true);
                        if(__pImageMenu)
                        {
-//                             __pImageMenu->SetShowState(true);
-//                             __pImageMenu->Show();
-//                             __pImageMenu->Invalidate(true);
+                               __pImageMenu->SetShowState(true);
+                               __pImageMenu->Show();
+                               __pImageMenu->Invalidate(true);
                        }
                }
                __isLongPressedDone = true;
index e530bf9..477a202 100644 (file)
@@ -186,8 +186,7 @@ SharePopup::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView,
 
                // share via message
                StartMessageAppControl();
-               Popup::SetShowState(false);
-               Popup::Show();
+
        }
        break;
        case 1:
@@ -195,8 +194,7 @@ SharePopup::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView,
 
                // share via email
                StartEmailAppControl();
-               Popup::SetShowState(false);
-               Popup::Show();
+
        }
        break;
        default:
@@ -326,6 +324,9 @@ SharePopup::StartEmailAppControl(void)
    String ccVal = L"";
    String bccKey = L"http://tizen.org/appcontrol/data/bcc";
    String bccVal = L"";
+   String resultKey = L"http://tizen.org/appcontrol/data/return_result";
+   String resultVal = "true";
+
 
    //String attachKey = L"attachments";
    String attachKey = L"http://tizen.org/appcontrol/data/path";
@@ -354,6 +355,7 @@ SharePopup::StartEmailAppControl(void)
    extraData.Add(&toKey, &toVal);
    extraData.Add(&ccKey, &ccVal);
    extraData.Add(&bccKey, &bccVal);
+   extraData.Add(&resultKey, &resultVal);
    if(attachVal.GetLength() > 0)
    {
           extraData.Add(&attachKey, pDataList);
@@ -390,6 +392,8 @@ SharePopup::StartMessageAppControl(void)
        String textVal;
        String attachKey = L"http://tizen.org/appcontrol/data/path";
        String attachVal;
+       String resultKey = L"http://tizen.org/appcontrol/data/return_result";
+       String resultVal = "true";
        ArrayList* pDataList = null;
 
        if (__pShareList != null)
@@ -449,7 +453,7 @@ SharePopup::StartMessageAppControl(void)
                // type is SMS , attach the text
                extraData.Add(&textKey, &textVal);
        }
-
+       extraData.Add(&resultKey, &resultVal);
        AppControl* pAc = AppManager::FindAppControlN(L"tizen.messages", L"http://tizen.org/appcontrol/operation/compose");
        if (pAc)
        {
@@ -471,26 +475,12 @@ void
 SharePopup::OnAppControlCompleted(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, const Tizen::Base::Collection::IList* pResultList)
 {
        AppLog("InternetApp::OnForeground called");
-       Frame* pCurrentFrame = null;
-       pCurrentFrame =  Application::GetInstance()->GetAppFrame()->GetFrame();
 
-       if (pCurrentFrame != null)
-       {
-               pCurrentFrame->SetEnabled(true);
-               pCurrentFrame->Invalidate(true);
-       }
 }
 
 void SharePopup::OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData)
 {
        AppLog("SharePopup::OnAppControlCompleteResponseReceived");
-       Frame* pCurrentFrame = null;
-       pCurrentFrame =  Application::GetInstance()->GetAppFrame()->GetFrame();
-
-       if (pCurrentFrame != null)
-       {
-               pCurrentFrame->SetEnabled(true);
-               pCurrentFrame->Invalidate(true);
-       }
-
+       Popup::SetShowState(false);
+       Popup::Show();
 }