Fixed appcontrol issues to launch and applied GUI guide for ContactEditorForm and...
authorDongseok Jang <dongseok.jang@samsung.com>
Fri, 22 Mar 2013 08:23:18 +0000 (17:23 +0900)
committerDongseok Jang <dongseok.jang@samsung.com>
Fri, 22 Mar 2013 08:23:18 +0000 (17:23 +0900)
Change-Id: I23481e70fbbdaa2e82ef1e93f033e86c9c1935fd
Signed-off-by: Dongseok Jang <dongseok.jang@samsung.com>
13 files changed:
inc/CtGroupListPanel.h
src/CtContactDetailsForm.cpp
src/CtContactEditorForm.cpp
src/CtContactListEditorPanel.cpp
src/CtContactListPanel.cpp
src/CtContactSelectorForm.cpp
src/CtFavoriteListEditorPanel.cpp
src/CtFavoriteListPanel.cpp
src/CtGroupContactListEditorForm.cpp
src/CtGroupContactListForm.cpp
src/CtGroupListEditorPanel.cpp
src/CtGroupListPanel.cpp
src/CtSettingsForm.cpp

index 8a02f6b..1caa833 100644 (file)
@@ -22,7 +22,6 @@
 #ifndef _CT_GROUP_LIST_PANEL_H_
 #define _CT_GROUP_LIST_PANEL_H_
 
-#include <FApp.h>
 #include <FBase.h>
 #include <FUi.h>
 #include "CtIContactEventListener.h"
@@ -65,12 +64,7 @@ public:
        virtual void OnCategoriesChanged(void);
 
 private:
-       void ReturnValues(RequestId requestId, Tizen::App::AppCtrlResult appCtrlResult, const Tizen::Base::Collection::IMap* pReturnValue);
-       result LaunchAppControl(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, const Tizen::Base::String& argument, const Tizen::Base::String& type = L"");
-
-private:
        int __sweptItemIndex;
-       Tizen::App::AppControl* __pAppControl;
        Tizen::Ui::Controls::GroupedListView* __pListView;
        Tizen::Ui::Controls::ContextMenu* __pContextMenuMore;
        GroupListPresentationModel* __pPresentationModel;
index 564ee77..7ec7339 100644 (file)
@@ -548,6 +548,9 @@ ContactDetailsForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& current
 {
        ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
        pContactsApp->RemoveContactsAppChangeEventListener(*this);
+
+       delete __pAppControl;
+       __pAppControl = null;
 }
 
 void
index d50dc1a..190886c 100644 (file)
@@ -74,6 +74,7 @@ static const wchar_t* IDB_BUTTON_ADD= L"C02_caller_id_icon_add.png";
 static const wchar_t* IDB_BUTTON_ADD_PRESSED = L"C02_caller_id_icon_add_press.png";
 static const wchar_t* IDB_BUTTON_CAMERA = L"C02_caller_id_icon_camera.png";
 static const wchar_t* IDB_BUTTON_CAMERA_PRESSED = L"C02_caller_id_icon_camera_press.png";
+static const wchar_t* IDB_BUTTON_DROPBOX = L"C02_button_icon_dropbox.png";
 
 static const wchar_t* INPUT_KEY_TYPE = L"type";
 static const wchar_t* INPUT_KEY_MEDIA_TYPE = L"mediaType";
@@ -106,6 +107,8 @@ static const int W_THUMBNAIL_DELETE_BUTTON_GAP = 34;
 static const int H_THUMBNAIL_DELETE_BUTTON_GAP = 31;
 static const int H_GROUP_RINGTONE_LABEL = 64;
 static const int Y_EDITDATE = 8;
+static const int W_DROPBOX_ICON = 29;
+static const int H_DROPBOX_ICON = 29;
 
 static const int GROUP_ITEM_COUNT = 11;
 static const int NAME_FIELD_ITEM_COUNT = 1;
@@ -1522,6 +1525,15 @@ ContactEditorForm::GetInputFieldN(int groupIndex, int itemIndex, int itemWidth,
        pButtonType->AddTouchEventListener(*this);
        pButtonType->SetName(Integer::ToString(parsedItemIndex));
 
+       Bitmap* pDropBoxIcon = ResourceManager::GetBitmapN(IDB_BUTTON_DROPBOX);
+
+       if (pDropBoxIcon != null)
+       {
+               pButtonType->SetNormalBitmap(Point(W_TYPE_BUTTON - W_DROPBOX_ICON, H_BUTTON - H_DROPBOX_ICON), *pDropBoxIcon);
+               pButtonType->SetPressedBitmap(Point(W_TYPE_BUTTON - W_DROPBOX_ICON, H_BUTTON - H_DROPBOX_ICON), *pDropBoxIcon);
+               pButtonType->SetDisabledBitmap(Point(W_TYPE_BUTTON - W_DROPBOX_ICON, H_BUTTON - H_DROPBOX_ICON), *pDropBoxIcon);
+               delete pDropBoxIcon;
+       }
        pTableViewItem->AddControl(*pButtonType);
 
        Button *pButtonDelete = new (std::nothrow) Button();
@@ -2710,6 +2722,7 @@ ContactEditorForm::OnTextValueChanged(const Tizen::Ui::Control& source)
 
        pDeleteButton->SetShowState(true);
 
+       pEditField->HideKeypad();
        __pTableView->UpdateTableView();
        pEditField->ShowKeypad();
 }
index aa292e5..ff7ab0c 100644 (file)
@@ -87,8 +87,8 @@ static const int FONT_SIZE_BOTTOM_LABEL = 32;
 static const int FONT_SIZE_DELETE_POPUP_TEXT = 36;
 
 static const unsigned int COLOR_EMPTY_COMMENT = Color32<102, 102, 102>::Value;
-static const unsigned int COLOR_BOTTOM_LABEL_BG = Color32<215, 225, 232>::Value;
-static const unsigned int COLOR_BOTTOM_LABEL_FONT = Color32<76, 81, 88>::Value;
+static const unsigned int COLOR_BOTTOM_LABEL_BG = Color32<68, 68, 68>::Value;
+static const unsigned int COLOR_BOTTOM_LABEL_FONT = Color32<255, 255, 255>::Value;
 static const unsigned int COLOR_DELETE_POPUP_TEXT = Color32<128, 128, 128>::Value;
 static const unsigned int COLOR_CHECK_LABEL_BG = Color32<220, 218, 211>::Value;
 
index 23465bf..4d5eb5b 100644 (file)
@@ -44,6 +44,7 @@ using namespace Tizen::Social;
 static const int IDA_FOOTER_MORE = 0;
 static const int IDA_FOOTER_CREATE = 1;
 static const int IDA_MORE_DELETE = 2;
+static const int IDA_MORE_SETTING = 3;
 static const int IDA_HEADER_CONTACTS = 10;
 static const int IDA_HEADER_GROUPS = 11;
 static const int IDA_HEADER_FAVORITES = 12;
@@ -207,6 +208,7 @@ ContactListPanel::OnInitializing(void)
        __pContextMenuMore = new (std::nothrow) ContextMenu();
        __pContextMenuMore->Construct(Point(X_MORE, clientBounds.y + clientBounds.height), CONTEXT_MENU_STYLE_LIST);
        __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_SK_DELETE"), IDA_MORE_DELETE);
+       __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_CONTACT_SETTINGS"), IDA_MORE_SETTING);
        __pContextMenuMore->AddActionEventListener(*this);
 
        return E_SUCCESS;
@@ -292,6 +294,11 @@ ContactListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int action
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTACT_LIST_EDITOR));
                }
                break;
+       case IDA_MORE_SETTING:
+               {
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SETTINGS, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
+               }
+               break;
        case IDA_POPUP_DELETE_OK:
                {
                        int groupIndex = (__sweptItemIndex >> LIST_VIEW_GROUP_INDEX_SHIFT) & LIST_VIEW_MASK;
@@ -436,6 +443,9 @@ ContactListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSc
 
        __pPresentationModel->RemoveContactChangeListener(*this);
        pContactsApp->RemoveContactsAppChangeEventListener(*this);
+
+       delete __pAppControl;
+       __pAppControl = null;
 }
 
 int
index 83fcab2..d97620f 100644 (file)
@@ -55,8 +55,8 @@ static const int Y_CHECK_LABEL = 20;
 
 static const int FONT_SIZE_BOTTOM_LABEL = 32;
 
-static const unsigned int COLOR_BOTTOM_LABEL_BG = Color32<215, 225, 232>::Value;
-static const unsigned int COLOR_BOTTOM_LABEL_FONT = Color32<76, 81, 88>::Value;
+static const unsigned int COLOR_BOTTOM_LABEL_BG = Color32<68, 68, 68>::Value;
+static const unsigned int COLOR_BOTTOM_LABEL_FONT = Color32<255, 255, 255>::Value;
 static const unsigned int COLOR_CHECK_LABEL_BG = Color32<220, 218, 211>::Value;
 
 ContactSelectorForm::ContactSelectorForm(void)
index 5c197f9..8d57ae7 100644 (file)
@@ -79,8 +79,8 @@ static const unsigned int COLOR_TEXT_WITH_THUMBNAIL = Color32<249, 249, 249>::Va
 static const unsigned int COLOR_TEXT = Color32<255, 255, 255>::Value;
 static const unsigned int COLOR_LINE = Color32<225, 225, 225, 26>::Value;
 static const unsigned int COLOR_EMPTY_COMMENT = Color32<102, 102, 102>::Value;
-static const unsigned int COLOR_BOTTOM_LABEL_BG = Color32<215, 225, 232>::Value;
-static const unsigned int COLOR_BOTTOM_LABEL_FONT = Color32<76, 81, 88>::Value;
+static const unsigned int COLOR_BOTTOM_LABEL_BG = Color32<68, 68, 68>::Value;
+static const unsigned int COLOR_BOTTOM_LABEL_FONT = Color32<255, 255, 255>::Value;
 
 FavoriteListEditorPanel::FavoriteListEditorPanel(void)
 : __pFavoriteListView(null)
index 1fa3599..9e4a56d 100644 (file)
@@ -394,6 +394,9 @@ FavoriteListPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentS
 
        Footer* pFooter = pForm->GetFooter();
        pFooter->RemoveActionEventListener(*this);
+
+       delete __pAppControl;
+       __pAppControl = null;
 }
 
 void
index dfca452..0cfb8a7 100644 (file)
@@ -67,8 +67,8 @@ static const int Y_CHECK_LABEL = 20;
 static const int FONT_SIZE_BOTTOM_LABEL = 32;
 static const int FONT_SIZE_EMPTY_COMMENT = 32;
 
-static const unsigned int COLOR_BOTTOM_LABEL_BG = Color32<215, 225, 232>::Value;
-static const unsigned int COLOR_BOTTOM_LABEL_FONT = Color32<76, 81, 88>::Value;
+static const unsigned int COLOR_BOTTOM_LABEL_BG = Color32<68, 68, 68>::Value;
+static const unsigned int COLOR_BOTTOM_LABEL_FONT = Color32<255, 255, 255>::Value;
 static const unsigned int COLOR_EMPTY_COMMENT = Color32<102, 102, 102>::Value;
 static const unsigned int COLOR_CHECK_LABEL_BG = Color32<220, 218, 211>::Value;
 
@@ -443,6 +443,9 @@ GroupContactListEditorForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId&
        if (__launchType != 0)
        {
                pContactsApp->RemoveContactsAppChangeEventListener(*this);
+
+               delete __pAppControl;
+               __pAppControl = null;
        }
        __pPresentationModel->RemoveContactChangeListener(*this);
 }
index aff0cd7..4dbce6c 100644 (file)
@@ -417,6 +417,9 @@ GroupContactListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curre
        }
        __pPresentationModel->RemoveContactChangeListener(*this);
        pContactsApp->RemoveContactsAppChangeEventListener(*this);
+
+       delete __pAppControl;
+       __pAppControl = null;
 }
 
 int
index 2267634..aec4cd1 100644 (file)
@@ -53,8 +53,8 @@ static const wchar_t* IDB_BUTTON_RENAME_NORMAL = L"00_button_rename.png";
 static const wchar_t* IDB_BUTTON_RENAME_PRESSED = L"00_button_rename_press.png";
 
 static const unsigned int COLOR_CHECK_LABEL_BG = Color32<220, 218, 211>::Value;
-static const unsigned int COLOR_BOTTOM_LABEL_BG = Color32<215, 225, 232>::Value;
-static const unsigned int COLOR_BOTTOM_LABEL_FONT = Color32<76, 81, 88>::Value;
+static const unsigned int COLOR_BOTTOM_LABEL_BG = Color32<68, 68, 68>::Value;
+static const unsigned int COLOR_BOTTOM_LABEL_FONT = Color32<255, 255, 255>::Value;
 
 static const int FONT_SIZE_GROUP_NAME = 44;
 static const int FONT_SIZE_BOTTOM_LABEL = 32;
index 622172b..447a3ac 100644 (file)
@@ -67,14 +67,8 @@ static const int W_ELEMENT_GAP = 16;
 
 static const int FONT_SIZE_GROUP_NAME = 44;
 
-static const wchar_t* INPUT_KEY_TYPE = L"type";
-static const wchar_t* INPUT_TYPE_SMS = L"SMS";
-static const wchar_t* INPUT_KEY_TEL = L"tel";
-static const wchar_t* INPUT_KEY_TO = L"to";
-
 GroupListPanel::GroupListPanel(void)
 : __sweptItemIndex(0)
-, __pAppControl(null)
 , __pListView(null)
 , __pContextMenuMore(null)
 , __pPresentationModel(null)
@@ -127,7 +121,6 @@ GroupListPanel::OnTerminating(void)
                __pPresentationModel->RemoveGroupChangeListener(*this);
        }
 
-       delete __pAppControl;
        delete __pContextMenuMore;
 
        return r;
@@ -487,52 +480,3 @@ void
 GroupListPanel::OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction)
 {
 }
-
-void
-GroupListPanel::ReturnValues(RequestId requestId, Tizen::App::AppCtrlResult appCtrlResult, const Tizen::Base::Collection::IMap* pReturnValue)
-{
-       AppControlProviderManager* pAppManager = AppControlProviderManager::GetInstance();
-       pAppManager->SendAppControlResult(requestId, appCtrlResult, pReturnValue);
-
-       UiApp* pApp = UiApp::GetInstance();
-       pApp->Terminate();
-}
-
-result
-GroupListPanel::LaunchAppControl(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, const Tizen::Base::String& argument, const Tizen::Base::String& type)
-{
-       result r = E_SUCCESS;
-
-       if (__pAppControl != null)
-       {
-               return E_FAILURE;
-       }
-
-       HashMap extraData;
-       extraData.Construct();
-
-       if (appId.Equals(String(PROVIDER_ID_PHONE)))
-       {
-               extraData.Add(new (std::nothrow) String(INPUT_KEY_TEL), new (std::nothrow) String(argument));
-               extraData.Add(new (std::nothrow) String(INPUT_KEY_TYPE), new (std::nothrow) String(type));
-       }
-       else if (appId.Equals(String(PROVIDER_ID_MESSAGE)))
-       {
-               extraData.Add(new (std::nothrow) String(INPUT_KEY_TO), new (std::nothrow) String(argument));
-               extraData.Add(new (std::nothrow) String(INPUT_KEY_TYPE), new (std::nothrow) String(INPUT_TYPE_SMS));
-       }
-
-       __pAppControl = AppManager::FindAppControlN(appId, operationId);
-       if (__pAppControl != null)
-       {
-               r = __pAppControl->Start(null, null, &extraData, null);
-               if (IsFailed(r))
-               {
-                       AppLogDebug("[%s] Unable to launch app control", GetErrorMessage(r));
-               }
-       }
-
-       extraData.RemoveAll(true);
-
-       return r;
-}
index 069291d..f9f3168 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <FApp.h>
 #include <FSystem.h>
+#include "CtContactsApp.h"
 #include "CtResourceManager.h"
 #include "CtSceneRegister.h"
 #include "CtSettingsForm.h"
@@ -113,8 +114,19 @@ SettingsForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 void
 SettingsForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
-       UiApp* pApp = UiApp::GetInstance();
-       pApp->Terminate();
+       ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
+
+       if (pContactsApp->GetOperationId() == OPERATION_ID_CONFIGURE)
+       {
+               UiApp* pApp = UiApp::GetInstance();
+               pApp->Terminate();
+       }
+       else
+       {
+               SceneManager* pSceneManager = SceneManager::GetInstance();
+
+               pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
+       }
 }
 
 int