Nabi issue fix
authorSeema <seema.nagraj@samsung.com>
Wed, 20 Mar 2013 08:40:44 +0000 (14:10 +0530)
committerSeema <seema.nagraj@samsung.com>
Thu, 21 Mar 2013 05:12:55 +0000 (10:42 +0530)
Change-Id: I4ed664439d5e601631f6c5f02f1eb3645d88b4ce
Signed-off-by: Seema <seema.nagraj@samsung.com>
src/MmDrawingDetailForm.cpp
src/MmDrawingEditorForm.cpp
src/MmListEditorForm.cpp
src/MmListForm.cpp
src/MmTextDetailForm.cpp

index ac2440e..3b330a3 100644 (file)
@@ -294,7 +294,7 @@ MemoDrawingDetailForm::OnActionPerformed(const Control& source, int actionId)
                        {
                                __pPopup = new (std::nothrow) Popup();
                                __pPopupList = new (std::nothrow) ListView();
-                               __pPopupList->Construct(Tizen::Graphics::Rectangle(X_POPUP_LIST_RECTANGLE, Y_POPUP_LIST_RECTANGLE, W_POPUP_LIST_RECTANGLE, H_POPUP_LIST_RECTANGLE), true, false);
+                               __pPopupList->Construct(Tizen::Graphics::Rectangle(X_POPUP_LIST_RECTANGLE, Y_POPUP_LIST_RECTANGLE, W_POPUP_LIST_RECTANGLE, H_POPUP_LIST_RECTANGLE), true, SCROLL_STYLE_FAST_SCROLL);
                                AppControlListProvider* pAppControlListProvider = new (std::nothrow) AppControlListProvider();
                                ConstructAppControlPopup(__pPopup, __pPopupList, pAppControlListProvider, this, this);
                        }
@@ -398,13 +398,19 @@ MemoDrawingDetailForm::OnSceneActivatedN(const SceneId& previousSceneId, const S
                        SetComment(__pMemoData->GetMemoContents(), true);
                }
 
-               __pBitmap = img.DecodeN(__pMemoData->GetMemoDrawingPath(), BITMAP_PIXEL_FORMAT_RGB565, GetClientAreaBounds().width, __pDrawingPanel->GetHeight());
-               if (__pBitmap == null)
+               Dimension canvasSize;
+               canvasSize.SetSize(GetClientAreaBounds().width, __pDrawingPanel->GetHeight());
+
+               ByteBuffer* pBuffer = img.DecodeToBufferN(__pMemoData->GetMemoDrawingPath(), BITMAP_PIXEL_FORMAT_RGB565, canvasSize.width, canvasSize.height);
+               if (pBuffer != null)
+               {
+                       __pBitmap = Bitmap::GetNonScaledBitmapN(*pBuffer, canvasSize, BITMAP_PIXEL_FORMAT_RGB565);
+                       delete pBuffer;
+               }
+               if(__pBitmap != null)
                {
-                       AppLogDebug("Error in DecodeN");
-                       return;
+                       SetCanvasBitmap(*__pBitmap);
                }
-               SetCanvasBitmap(*__pBitmap);
        }
        return;
 }
index 50533e3..029e835 100644 (file)
@@ -1090,6 +1090,7 @@ MemoDrawingEditorForm::OnActionPerformed(const Control& source, int actionId)
                                __drawingMode = DRAWING_MODE_CURVELINE;
                        }
                        __pButtonEraser->Invalidate(false);
+                       ShowCommentControl();
                }
                break;
 
@@ -1309,15 +1310,19 @@ MemoDrawingEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, const S
                        //Gets the drawing canvas size
                        width = GetClientAreaBounds().width;
                        height = __pDrawingPanel->GetHeight();
-                       pBitmap = img.DecodeN(__pEditMemo->GetMemoDrawingPath(), BITMAP_PIXEL_FORMAT_RGB565, width, height);
-                       if (pBitmap == null)
+                       Dimension canvasSize;
+                       canvasSize.SetSize(GetClientAreaBounds().width, __pDrawingPanel->GetHeight());
+
+                       ByteBuffer* pBuffer = img.DecodeToBufferN(__pEditMemo->GetMemoDrawingPath(), BITMAP_PIXEL_FORMAT_RGB565, canvasSize.width, canvasSize.height);
+                       if (pBuffer != null)
+                       {
+                               pBitmap = Bitmap::GetNonScaledBitmapN(*pBuffer, canvasSize, BITMAP_PIXEL_FORMAT_RGB565);
+                               delete pBuffer;
+                       }
+                       if(pBitmap != null)
                        {
-                               AppLogDebug("Error in DecodeN");
-                               
-                               return;
+                               SetCanvasBitmap(*pBitmap);
                        }
-                       SetCanvasBitmap(*pBitmap);
-                       //delete pBitmap;
 
                        String drawingPath = File::GetFileName(__pEditMemo->GetMemoDrawingPath());
                        String memoContent = __pEditMemo->GetMemoContents().GetPointer();
index f03b1af..2e9cf44 100644 (file)
@@ -303,7 +303,7 @@ MemoListEditorForm::OnActionPerformed(const Control& source, int actionId)
                        {
                                __pPopup = new (std::nothrow) Popup();
                                __pPopupList = new (std::nothrow) ListView();
-                               __pPopupList->Construct(Tizen::Graphics::Rectangle(X_POPUP_LIST_RECTANGLE, Y_POPUP_LIST_RECTANGLE, W_POPUP_LIST_RECTANGLE, H_POPUP_LIST_RECTANGLE), true, false);
+                               __pPopupList->Construct(Tizen::Graphics::Rectangle(X_POPUP_LIST_RECTANGLE, Y_POPUP_LIST_RECTANGLE, W_POPUP_LIST_RECTANGLE, H_POPUP_LIST_RECTANGLE), true, SCROLL_STYLE_FAST_SCROLL);
                                ConstructAppControlPopup(__pPopup, __pPopupList, __pAppControlListProvider, this, this);
                        }
                        __pPopup->SetShowState(true);
index a9b9b36..405424a 100644 (file)
@@ -104,7 +104,7 @@ MemoListForm::OnInitializing(void)
        __pMemoListView->SetTextColorOfEmptyList(Color::GetColor(COLOR_ID_GREY));
        __pMemoListView->SetShowState(false);
        SetControlAlwaysOnTop(*__pMemoListView, true); //If not set, in search mode list will be below Keypad, and it will not receive any events
-
+       __pSearchBar->SetContent(__pMemoListView);
        __pContextMenu = new (std::nothrow) ContextMenu();
        __pFormFooter->GetPosition(xPos, yPos);
        __pContextMenu->Construct(Point(0 , yPos), CONTEXT_MENU_STYLE_LIST);
@@ -173,10 +173,12 @@ MemoListForm::DisplayData(RequestId requestId, Tizen::Base::Collection::IList* p
                        if(__pSearchBar->GetTextLength() == 0)
                        {
                                __pMemoListView->SetEnabled(false);
+                               __pSearchBar->SetContentAreaVisible(false);
                        }
                        else
                        {
                                __pMemoListView->SetEnabled(true);
+                               __pSearchBar->SetContentAreaVisible(true);
                        }
                        //Show the number of memo in header
                        SetListFormTitle(ID_SEARCH_LIST);
@@ -363,6 +365,7 @@ MemoListForm::OnSearchBarModeChanged(SearchBar& source, SearchBarMode mode)
                __pSearchBar->SetGuideText(L"");
                __pFormFooter->SetShowState(false);
                __pMemoListView->ScrollToItem(0);
+               __pMemoListView->SetEnabled(false);
        }
        __pMemoListView->Invalidate(false);
        __pFormFooter->Draw();
index 08d76e9..9a3af8c 100644 (file)
@@ -236,7 +236,7 @@ MemoTextDetailForm::OnActionPerformed(const Control& source, int actionId)
                        {
                                __pPopup = new (std::nothrow) Popup();
                                __pPopupList = new (std::nothrow) ListView();
-                               __pPopupList->Construct(Tizen::Graphics::Rectangle(X_POPUP_LIST_RECTANGLE, Y_POPUP_LIST_RECTANGLE, W_POPUP_LIST_RECTANGLE, H_POPUP_LIST_RECTANGLE), true, false);
+                               __pPopupList->Construct(Tizen::Graphics::Rectangle(X_POPUP_LIST_RECTANGLE, Y_POPUP_LIST_RECTANGLE, W_POPUP_LIST_RECTANGLE, H_POPUP_LIST_RECTANGLE), true, SCROLL_STYLE_FAST_SCROLL);
                                ConstructAppControlPopup(__pPopup, __pPopupList, __pAppControlListProvider, this, this);
                        }
                        __pPopup->SetShowState(true);