From 85349226fd858bd7836c3814be411c274472e27e Mon Sep 17 00:00:00 2001 From: Seema Date: Wed, 13 Mar 2013 12:47:25 +0530 Subject: [PATCH] Nabi issues fix Change-Id: Id91900aeb40fcfbd335aca27a618d9e7678f608e Signed-off-by: Seema --- res/screen-size-normal/IDL_MEMO_DRAWING_DETAIL.xml | 2 +- src/MmDrawingDetailForm.cpp | 14 ++++++-------- src/MmListEditorForm.cpp | 12 +++++------- src/MmListForm.cpp | 9 +++++++++ src/MmTextDetailForm.cpp | 12 +++++------- src/MmTextEditorForm.cpp | 3 ++- 6 files changed, 28 insertions(+), 24 deletions(-) diff --git a/res/screen-size-normal/IDL_MEMO_DRAWING_DETAIL.xml b/res/screen-size-normal/IDL_MEMO_DRAWING_DETAIL.xml index 71b70ae..c9bdf35 100644 --- a/res/screen-size-normal/IDL_MEMO_DRAWING_DETAIL.xml +++ b/res/screen-size-normal/IDL_MEMO_DRAWING_DETAIL.xml @@ -29,7 +29,7 @@ - + diff --git a/src/MmDrawingDetailForm.cpp b/src/MmDrawingDetailForm.cpp index 4500234..ac2440e 100644 --- a/src/MmDrawingDetailForm.cpp +++ b/src/MmDrawingDetailForm.cpp @@ -290,16 +290,14 @@ MemoDrawingDetailForm::OnActionPerformed(const Control& source, int actionId) { UpdateComment(); // Shows List of AppControls to share Memo. - if (__pPopup != null) + if (__pPopup == null) { - delete __pPopup; - __pPopup = null; + __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); + AppControlListProvider* pAppControlListProvider = new (std::nothrow) AppControlListProvider(); + ConstructAppControlPopup(__pPopup, __pPopupList, pAppControlListProvider, this, this); } - __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); - AppControlListProvider* pAppControlListProvider = new (std::nothrow) AppControlListProvider(); - ConstructAppControlPopup(__pPopup, __pPopupList, pAppControlListProvider, this, this); __pPopup->SetShowState(true); __pPopup->Show(); } diff --git a/src/MmListEditorForm.cpp b/src/MmListEditorForm.cpp index 527931e..f03b1af 100644 --- a/src/MmListEditorForm.cpp +++ b/src/MmListEditorForm.cpp @@ -299,15 +299,13 @@ MemoListEditorForm::OnActionPerformed(const Control& source, int actionId) case IDA_FOOTER_BUTTON_EDIT: //Share { // Shows List of AppControls to share Memo. - if (__pPopup != null) + if (__pPopup == null) { - delete __pPopup; - __pPopup = null; + __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); + ConstructAppControlPopup(__pPopup, __pPopupList, __pAppControlListProvider, this, this); } - __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); - ConstructAppControlPopup(__pPopup, __pPopupList, __pAppControlListProvider, this, this); __pPopup->SetShowState(true); __pPopup->Show(); } diff --git a/src/MmListForm.cpp b/src/MmListForm.cpp index 58a78e5..a9b9b36 100644 --- a/src/MmListForm.cpp +++ b/src/MmListForm.cpp @@ -169,6 +169,15 @@ MemoListForm::DisplayData(RequestId requestId, Tizen::Base::Collection::IList* p //Set search list item provider MemoListPresentationModel::GetInstance()->ResetListIndex(ID_SEARCH_LIST); __pMemoListView->SetItemProvider(*GetItemProvider(ID_SEARCH_LIST)); + + if(__pSearchBar->GetTextLength() == 0) + { + __pMemoListView->SetEnabled(false); + } + else + { + __pMemoListView->SetEnabled(true); + } //Show the number of memo in header SetListFormTitle(ID_SEARCH_LIST); } diff --git a/src/MmTextDetailForm.cpp b/src/MmTextDetailForm.cpp index b8fc02a..08d76e9 100644 --- a/src/MmTextDetailForm.cpp +++ b/src/MmTextDetailForm.cpp @@ -232,15 +232,13 @@ MemoTextDetailForm::OnActionPerformed(const Control& source, int actionId) case IDA_FOOTER_BUTTON_SHARE: //Share { // Shows List of AppControls to share Memo. - if (__pPopup != null) + if (__pPopup == null) { - delete __pPopup; - __pPopup = null; + __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); + ConstructAppControlPopup(__pPopup, __pPopupList, __pAppControlListProvider, this, this); } - __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); - ConstructAppControlPopup(__pPopup, __pPopupList, __pAppControlListProvider, this, this); __pPopup->SetShowState(true); __pPopup->Show(); } diff --git a/src/MmTextEditorForm.cpp b/src/MmTextEditorForm.cpp index 3432134..64569d4 100644 --- a/src/MmTextEditorForm.cpp +++ b/src/MmTextEditorForm.cpp @@ -117,6 +117,7 @@ MemoTextEditorForm::OnInitializing(void) __pColorPicker = static_cast(GetControl("IDC_COLORPICKER",true)); __pColorPicker->SetColor(Color(COLOR_BLACK, false)); __pColorPicker->AddColorChangeEventListener(*this); + __pColorPicker->SetSaturation(100); __pPreviewLabel = static_cast(GetControl("IDC_LABEL",true)); __pPreviewLabel->SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK)); @@ -386,6 +387,7 @@ MemoTextEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, const Scen //New memo RefreshCreateView(); } + __pColorPicker->SetSaturation(100); ShowKeypad(true); return; } @@ -481,7 +483,6 @@ MemoTextEditorForm::RefreshCreateView(void) __pFormHeader->SetTitleText(GetResourceString(L"IDS_MEMO_NEW")); __pFormHeader->Invalidate(false); - __pColorPicker->SetSaturation(100); __pColorPickerPanel->SetShowState(false); __pColorPickerPanel->Invalidate(true); __pSliderPanel->SetShowState(false); -- 2.7.4