From 66793761d5a7ade7f7d6c1b2d49c596979c43a89 Mon Sep 17 00:00:00 2001 From: "Jungmin, Park" Date: Mon, 1 Apr 2013 16:39:59 +0900 Subject: [PATCH] Revert "apply new API 'add_to_home_remove_shortcut'" This reverts commit ac5888e558fc7acf7159ebfdb11b48eb002c9e63 --- src/core/FShellShortcutManager.cpp | 23 +++++++---------------- src/core/FShell_ShortcutManagerImpl.cpp | 11 ++--------- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/src/core/FShellShortcutManager.cpp b/src/core/FShellShortcutManager.cpp index fd2b6e1..062f468 100644 --- a/src/core/FShellShortcutManager.cpp +++ b/src/core/FShellShortcutManager.cpp @@ -80,12 +80,18 @@ ShortcutManager::AddShortcut(const AppId& appId, const String& displayName, cons result r = _AccessController::CheckUserPrivilege(_PRV_SHORTCUT_INSTALL); SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method."); + if( allowDuplication ) + { + SysLog(NID_SHELL, "This feature(allowDuplication) is not yet implemented!"); + } + std::unique_ptr pAppId(_StringConverter::CopyToCharArrayN(appId)); std::unique_ptr pIcon(_StringConverter::CopyToCharArrayN(iconFilePath)); std::unique_ptr pName(_StringConverter::CopyToCharArrayN(displayName)); std::unique_ptr pUriData(_StringConverter::CopyToCharArrayN(uriData)); - int type = (uriData.IsEmpty())? LAUNCH_BY_PACKAGE : LAUNCH_BY_URI; + int type = (uriData.IsEmpty())? LAUNCH_BY_PACKAGE : LAUNCH_BY_URI; + //int ret = add_to_home_shortcut(pAppId.get(), pName.get(), type, pUriData.get(), pIcon.get(), NULL, this); int ret = add_to_home_shortcut(pAppId.get(), pName.get(), type, pUriData.get(), pIcon.get(), allowDuplication, NULL, this); SysTryReturnResult(NID_SHELL, ret == 0, E_SYSTEM, "Failed to add_to_home_shortcut"); @@ -93,21 +99,6 @@ ShortcutManager::AddShortcut(const AppId& appId, const String& displayName, cons } result -ShortcutManager::RemoveShortcut(const Tizen::App::AppId& appId, const Tizen::Base::String& displayName) -{ - result r = _AccessController::CheckUserPrivilege(_PRV_SHORTCUT_INSTALL); - SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method."); - - std::unique_ptr pAppId(_StringConverter::CopyToCharArrayN(appId)); - std::unique_ptr pName(_StringConverter::CopyToCharArrayN(displayName)); - - int ret = add_to_home_remove_shortcut(pAppId.get(), pName.get(), "", null, this); - SysTryReturnResult(NID_SHELL, ret == 0, E_SYSTEM, "Failed to add_to_home_remove_shortcut"); - - return E_SUCCESS; -} - -result ShortcutManager::AddShortcutRequestListener(IShortcutRequestListener& listener) { return __pShortcutManagerImpl->AddShortcutRequestListener(listener); diff --git a/src/core/FShell_ShortcutManagerImpl.cpp b/src/core/FShell_ShortcutManagerImpl.cpp index 95e7cba..ef6344a 100644 --- a/src/core/FShell_ShortcutManagerImpl.cpp +++ b/src/core/FShell_ShortcutManagerImpl.cpp @@ -80,14 +80,7 @@ int ShortcutRequestEventHandlerCB(const char* appId, const char* text, int type, pListenerList->GetAt(i, pListener); if( pListener != null) { - if( type == SHORTCUT_REMOVE) - { - pListener->OnShortcutRemoveRequested(appId, text); - } - else - { - pListener->OnShortcutAddRequested(appId, text, icon, content_info); - } + pListener->OnShortcutAddRequested(appId, text, icon, content_info); } } @@ -102,7 +95,7 @@ int ShortcutRequestEventReceiverCB(const char* appId, const char* text, int type if( type == SHORTCUT_PACKAGE || type == SHORTCUT_DATA - || type == SHORTCUT_REMOVE) + || type == SHORTCUT_DATA) { ShortcutRequestEventHandlerCB(appId, text, type, content_info, icon, pid, period, allowDuplication, data); } -- 2.7.4