Added AppControl Message
authorMyunkyu <mk70.kang@partner.samsung.com>
Fri, 26 Apr 2013 06:23:15 +0000 (15:23 +0900)
committerMyunkyu <mk70.kang@partner.samsung.com>
Fri, 26 Apr 2013 06:23:15 +0000 (15:23 +0900)
Change-Id: I37a95eb1d0086a0396911782fdb0102b5d6f01bd

inc/MpTypes.h
src/MpAllListPanel.cpp
src/MpArtistContentListForm.cpp
src/MpFolderContentListForm.cpp
src/MpSharePopup.cpp

index d9ceef5..2ca2321 100644 (file)
@@ -615,7 +615,7 @@ static const Tizen::Base::String TabNameId[HEAD_ITEM_COUNT] =
 static const int TIMER_INTERVAL = 100;
 static const int MIN_REWIND_POSITION = 2;
 
-static const Tizen::Base::String PROVIDER_ID_MESSAGE = L"tizen.message";
+static const Tizen::Base::String PROVIDER_ID_MESSAGE = L"tizen.messages";
 static const Tizen::Base::String PROVIDER_ID_EMAIL = L"tizen.email";
 static const Tizen::Base::String PROVIDER_ID_CONTACT = L"tizen.contacts";
 static const Tizen::Base::String OPERATION_ID_COMPOSE = L"http://tizen.org/appcontrol/operation/compose";
index 883eb2c..b39169e 100644 (file)
@@ -201,7 +201,7 @@ AllListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
        case IDA_FLICK_MENU_ITEM_SHARE:
                {
                        CreateContextMenuN(source);
-                       SetContextMenuItem(CONTEXT_MENU_ITEM_STYLE_EMAIL);
+                       SetContextMenuItem(CONTEXT_MENU_ITEM_STYLE_EMAIL | CONTEXT_MENU_ITEM_STYLE_MESSAGE);
                }
                break;
 
@@ -255,7 +255,6 @@ AllListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                        Tizen::Base::Collection::ArrayList* pValueList = new (std::nothrow) ArrayList(SingleObjectDeleter);
                        pValueList->Construct();
                        pValueList->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
-
                        pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pValueList);
 
                        r = pAppControl->Start(null, null, pDataList, this);
index 995794f..4ce8d90 100644 (file)
@@ -230,7 +230,7 @@ ArtistContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int a
        case IDA_FLICK_MENU_ITEM_SHARE:
                {
                        CreateContextMenuN(source);
-                       SetContextMenuItem(CONTEXT_MENU_ITEM_STYLE_EMAIL);
+                       SetContextMenuItem(CONTEXT_MENU_ITEM_STYLE_EMAIL | CONTEXT_MENU_ITEM_STYLE_MESSAGE);
                }
                break;
 
index e074555..a6c9006 100644 (file)
@@ -247,7 +247,7 @@ FolderContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int a
        case IDA_FLICK_MENU_ITEM_SHARE:
                {
                        CreateContextMenuN(source);
-                       SetContextMenuItem(CONTEXT_MENU_ITEM_STYLE_EMAIL);
+                       SetContextMenuItem(CONTEXT_MENU_ITEM_STYLE_EMAIL | CONTEXT_MENU_ITEM_STYLE_MESSAGE);
                }
                break;
 
index 1376455..26840c6 100644 (file)
@@ -33,10 +33,10 @@ using namespace Tizen::Graphics;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 
-//static const int INDEX_SHART_ITEM_MESSAGE = 0;
+static const int INDEX_SHART_ITEM_MESSAGE = 1;
 static const int INDEX_SHART_ITEM_EMAIL = 0;//NEED
 //static const int INDEX_SHARE_TOTAL_BLUETOOTH = 2;
-static const int SHARE_TOTAL_COUNT = 1;//NEED 3
+static const int SHARE_TOTAL_COUNT = 2;//NEED 3
 static const int HEIGHT_POPUP_ITEM = 110;
 
 const wchar_t* EMPTY_SPACE = L"";
@@ -228,7 +228,7 @@ SharePopup::CreateItem(const int itemIndex, int itemWidth)
        }
 
        //String shareItemName[] = {L"Message", L"Email", L"Bluetooth"};//NEED STRING Bluetooth
-       String shareItemName[] = {ResourceManager::GetString(L"IDS_COM_BODY_EMAIL")};
+       String shareItemName[] = {ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"), ResourceManager::GetString(L"IDS_COM_BODY_MESSAGE")};
        Label* pShareItemLabel = new (std::nothrow) Label();
        pShareItemLabel->Construct(Rectangle(0, 0, POPUP_ITEM_WIDTH, HEIGHT_POPUP_ITEM), L"");
        pShareItemLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
@@ -275,11 +275,16 @@ SharePopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableVie
        {
                switch (itemIndex)
                {
-//             case INDEX_SHART_ITEM_MESSAGE: NEED
-//                     {
-//                             LaunchAppControl(OPERATION_ID_COMPOSE, PROVIDER_ID_MESSAGE);
-//                     }
-//                     break;
+               case INDEX_SHART_ITEM_MESSAGE: //NEED
+                       {
+                               Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                               pDataList->Construct();
+                               pDataList->Add(*(new (std::nothrow) Boolean(true)));
+
+                               __pControl->SendUserEvent(ID_DESTORY_SHARE_POPUP, pDataList);
+                               LaunchAppControl(OPERATION_ID_COMPOSE, PROVIDER_ID_MESSAGE);
+                       }
+                       break;
 
                case INDEX_SHART_ITEM_EMAIL:
                        {
@@ -366,6 +371,7 @@ SharePopup::LaunchAppControl(const Tizen::Base::String& operationId, const Tizen
        AppControl* pAc = AppManager::FindAppControlN(providerId, operationId);
        if (pAc == null)
        {
+               AppLogDebug("EXIT");
                return E_FAILURE;
        }