NABI_SE Issue Fix: 45902 45915 and internal issue fix submit/tizen_2.2/20130714.134354 submit/tizen_2.2/20130714.143014
authorkamesh <kamesh.kvss@samsung.com>
Thu, 11 Jul 2013 13:04:01 +0000 (18:34 +0530)
committerkamesh <kamesh.kvss@samsung.com>
Thu, 11 Jul 2013 13:04:01 +0000 (18:34 +0530)
Change-Id: I019cf781d54c350d433ae987f136d3c5c01de928

inc/CtContactDetailsForm.h
src/CtContactDetailsForm.cpp
src/CtContactEditorForm.cpp
src/CtContactListEditorPanel.cpp
src/CtFavoriteListPanel.cpp

index d7c02e4..d0dbc72 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <FApp.h>
 #include <FBase.h>
+#include <FIo.h>
 #include <FUi.h>
 #include "CtIContactEventListener.h"
 #include "CtIContactsAppStateChangeEventListener.h"
@@ -36,6 +37,7 @@ class ContactDetailsForm
        , public Tizen::Ui::IActionEventListener
        , public Tizen::Ui::IPropagatedKeyEventListener
        , public Tizen::Ui::ITouchEventListener
+       , public Tizen::Io::IFileEventListener
        , public Tizen::Ui::Controls::IFormBackEventListener
        , public Tizen::Ui::Controls::IFormMenuEventListener
        , public Tizen::Ui::Controls::IListViewItemEventListener
@@ -76,6 +78,8 @@ public:
        virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
        virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
 
+       virtual void OnFileEventOccured(const unsigned long events, const Tizen::Base::String &path, const unsigned int eventId);
+
        virtual void OnContactsChanged(void);
        virtual void OnCategoriesChanged(void);
 
@@ -127,6 +131,7 @@ private:
        Tizen::Ui::Controls::TableView* __pTableView;
        Tizen::Ui::Controls::ContextMenu* __pContextMenuCall;
        Tizen::Ui::Controls::ContextMenu* __pContextMenuShare;
+       Tizen::Io::FileEventManager* __pFileEventManager;
        Tizen::Ui::Controls::OptionMenu* __pOptionMenu;
        Tizen::Ui::Controls::Popup* __pDefaultSelectorPopup;
        Tizen::Ui::Controls::Popup* __pInvalidFilePopup;
index 6664b16..20427a5 100644 (file)
@@ -36,6 +36,7 @@ using namespace Tizen::Base;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Base::Utility;
 using namespace Tizen::Graphics;
+using namespace Tizen::Io;
 using namespace Tizen::Media;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
@@ -118,6 +119,7 @@ static const int Y_POPUP_TEXT_LABEL = 12;
 static const int H_POPUP_TEXT_LABEL = 90;
 
 static const int SUB_INDEX_MASK = 0xF000;
+static const int MESSAGE_BOX_TIMEOUT_MS = 300000;
 
 static const unsigned int COLOR_TABLE_BG = Color32<248, 246, 239>::Value;
 static const unsigned int COLOR_ITEM_TITLE = Color32<128, 128, 128>::Value;
@@ -159,6 +161,7 @@ ContactDetailsForm::ContactDetailsForm(void)
 , __pTableView(null)
 , __pContextMenuCall(null)
 , __pContextMenuShare(null)
+, __pFileEventManager(null)
 , __pOptionMenu(null)
 , __pDefaultSelectorPopup(null)
 , __pInvalidFilePopup(null)
@@ -234,6 +237,7 @@ ContactDetailsForm::OnTerminating(void)
        delete __pAppControl;
        delete __pContextMenuCall;
        delete __pContextMenuShare;
+       delete __pFileEventManager;
        delete __pOptionMenu;
 
        if (__pItemList != null)
@@ -277,7 +281,7 @@ ContactDetailsForm::OnActionPerformed(const Tizen::Ui::Control& source, int acti
                {
                        int modalResult = 0;
                        MessageBox deleteMessageBox;
-                       deleteMessageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q"), MSGBOX_STYLE_YESNO);
+                       deleteMessageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q"), MSGBOX_STYLE_YESNO, MESSAGE_BOX_TIMEOUT_MS);
                        deleteMessageBox.ShowAndWait(modalResult);
 
                        if (modalResult == MSGBOX_RESULT_YES)
@@ -1615,6 +1619,19 @@ ContactDetailsForm::OnTouchCanceled(const Tizen::Ui::Control& source, const Tize
 }
 
 void
+ContactDetailsForm::OnFileEventOccured(const unsigned long events, const Tizen::Base::String &path, const unsigned int eventId)
+{
+       AppLogDebug("Kamesh: OnFileEventOccured");
+       AppLogDebug("Kamesh: path = %ls", path.GetPointer());
+       String ringtonePath = __pPresentationModel->GetValue(DETAIL_PROPERTY_RINGTONE);
+       AppLogDebug("Kamesh: ringtonePath = %ls", ringtonePath.GetPointer());
+       if (ringtonePath.Equals(ResourceManager::GetString(L"IDS_PB_BODY_DEFAULT"), false) == true )
+       {
+               __pTableView->RefreshItem(__pItemList->GetCount() - 1, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       }
+}
+
+void
 ContactDetailsForm::OnScrollEndReached (Tizen::Ui::Control &source, Tizen::Ui::Controls::ScrollEndEvent type)
 {
 }
@@ -1787,6 +1804,14 @@ ContactDetailsForm::OnAppControlCompleteResponseReceived(const Tizen::App::AppId
                                __pPresentationModel->SetValue(DETAIL_PROPERTY_RINGTONE, *pResultString);
                                __pPresentationModel->UpdateContact();
                                __pTableView->RefreshItem(__pItemList->GetCount() - 1, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+
+                               if (__pFileEventManager == null)
+                               {
+                                       __pFileEventManager = new (std::nothrow) FileEventManager();
+                                       __pFileEventManager->Construct(*this);
+                               }
+                               __pFileEventManager->AddPath(*pResultString, FILE_EVENT_TYPE_DELETE | FILE_EVENT_TYPE_DELETE_SELF | FILE_EVENT_TYPE_MODIFY | FILE_EVENT_TYPE_MOVE_SELF);
+
                        }
                }
        }
index 3cf8bcb..1c8476e 100644 (file)
@@ -133,6 +133,9 @@ static const int X_REFRESH_BUTTON_MARGIN = 88;
 static const int Y_EDIT_FIELD_GAP = 5;
 static const int H_EDIT_FIELD_GAP = 10;
 
+static const int X_MORE_INFO_PANEL_GAP = 5;
+static const int H_MORE_INFO_PANEL_GAP = 10;
+
 static const int FONT_SIZE_SAVE_CONTACT_CONFIRM = 42;
 static const int FONT_SIZE_SAVE_CONTACT_BUTTON = 36;
 
@@ -2288,7 +2291,7 @@ ContactEditorForm::GetMoreInformationField(int itemWidth)
        pMoreInformationItem->SetBackgroundColor(Color(COLOR_TABLE_VIEW_BG), TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
 
        Panel* pPanel = new (std::nothrow) Panel();
-       pPanel->Construct(Rectangle(0, -(H_DIVIDER), itemWidth, H_DESCRIPTION_CONTAINER + H_DIVIDER));
+       pPanel->Construct(Rectangle(X_MORE_INFO_PANEL_GAP, X_MORE_INFO_PANEL_GAP, itemWidth - H_MORE_INFO_PANEL_GAP, H_DESCRIPTION_CONTAINER - H_MORE_INFO_PANEL_GAP));
        pPanel->SetBackgroundColor(Color(COLOR_TABLE_VIEW_BG));
 
        pMoreInformationItem->AddControl(pPanel);
index 8887e54..174b8b1 100644 (file)
@@ -1001,7 +1001,6 @@ ContactListEditorPanel::OnTextValueChanged(const Tizen::Ui::Control& source)
                __pSelectAll->SetSelected(isChecked);
                __pListView->Invalidate(true);
        }
-       UpdateBottomLabel();
 }
 
 void
index 807e20c..0e130ea 100644 (file)
@@ -688,6 +688,8 @@ FavoriteListPanel::GetItemCount(void)
 void
 FavoriteListPanel::OnContactsChanged(void)
 {
+       ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
+
        HideContactValuePopup();
        if (__pContextMenuAction != null)
        {
@@ -695,7 +697,14 @@ FavoriteListPanel::OnContactsChanged(void)
                __pContextMenuAction = null;
        }
 
-       __pPresentationModel->InitializeFavoriteList();
+       if (pContactsApp->GetOperationId() == OPERATION_ID_PICK)
+       {
+               __pPresentationModel->InitializeFavoriteList(pContactsApp->GetReturnType());
+       }
+       else
+       {
+               __pPresentationModel->InitializeFavoriteList();
+       }
 
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);