From ca2e86c13bac5d6a97c98b11a0e9595182e5dd91 Mon Sep 17 00:00:00 2001 From: Bumseung Cho Date: Wed, 22 May 2013 22:07:21 +0900 Subject: [PATCH] String domain has been changed Change-Id: I0faf187aa3af9894a53706941a56abe5c3c47c97 Signed-off-by: Bumseung Cho --- src/ui/FUi_ResourceManager.cpp | 2 +- src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp | 12 ++++++------ src/ui/controls/FUiCtrl_GalleryPresenter.cpp | 4 ++-- src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp | 12 ++++++------ src/ui/inc/FUi_ResourceManager.h | 2 +- src/ui/inc/FUi_ResourceStringLoader.h | 2 +- src/ui/resource/FUi_ResourceStringLoader.cpp | 9 +++------ 7 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/ui/FUi_ResourceManager.cpp b/src/ui/FUi_ResourceManager.cpp index 3da91fa..be2ce02 100644 --- a/src/ui/FUi_ResourceManager.cpp +++ b/src/ui/FUi_ResourceManager.cpp @@ -725,7 +725,7 @@ _ResourceManager::GetBitmapN(int bitmapId, BitmapPixelFormat pixelFormat, _Contr } result -_ResourceManager::GetString(const String& stringId, String& string) +_ResourceManager::GetString(const char* stringId, String& string) { return __pStringLoader->GetString(stringId, string); } diff --git a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp index 8c069b9..d842991 100644 --- a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp +++ b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp @@ -1861,8 +1861,8 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) String copyText; String cutText; - GET_STRING_CONFIG(IDS_COM_BODY_COPY, copyText); - GET_STRING_CONFIG(IDS_COM_BODY_CUT, cutText); + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_COPY, copyText); + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_CUT, cutText); __pCopyPastePopup->AddItem(copyText, COPY_PASTE_COPY_ID, null, null, null); if (!__pEdit->IsViewModeEnabled()) @@ -1875,8 +1875,8 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) String selectText; String selectAllText; - GET_STRING_CONFIG(IDS_COM_SK_SELECT, selectText); - GET_STRING_CONFIG(IDS_COM_BODY_SELECT_ALL, selectAllText); + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_SELECT, selectText); + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_SELECT_ALL, selectAllText); __pCopyPastePopup->AddItem(selectText, COPY_PASTE_SELECT_ID, null, null, null); __pCopyPastePopup->AddItem(selectAllText, COPY_PASTE_SELECT_ALL_ID, null, null, null); @@ -1890,8 +1890,8 @@ _EditCopyPasteManager::CreateCopyPastePopup(void) String pasteText; String clipboardText; - GET_STRING_CONFIG(IDS_COM_BODY_PASTE, pasteText); - GET_STRING_CONFIG(IDS_COM_BODY_CLIPBOARD, clipboardText); + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_PASTE, pasteText); + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_CLIPBOARD, clipboardText); __pCopyPastePopup->AddItem(pasteText, COPY_PASTE_PASTE_ID, null, null, null); if (!isPasswordStyle && __pEdit->IsKeypadEnabled()) diff --git a/src/ui/controls/FUiCtrl_GalleryPresenter.cpp b/src/ui/controls/FUiCtrl_GalleryPresenter.cpp index 862415f..3cc9596 100644 --- a/src/ui/controls/FUiCtrl_GalleryPresenter.cpp +++ b/src/ui/controls/FUiCtrl_GalleryPresenter.cpp @@ -150,7 +150,7 @@ _GalleryPresenter::Construct(_GalleryItemProviderAdaptorImpl* pGalleryItemProvid r = __galleryRenderer.EnableEmptyView(); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - GET_STRING_CONFIG(IDS_COM_BODY_NO_IMAGES, __emptyText); + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_NO_IMAGES, __emptyText); r = __galleryRenderer.SetEmptyText(__emptyText); SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -1322,7 +1322,7 @@ _GalleryPresenter::UpdateEmptyString(void) { if (__userSetEmptyText == false) { - GET_STRING_CONFIG(IDS_COM_BODY_NO_IMAGES, __emptyText); + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_NO_IMAGES, __emptyText); result r = __galleryRenderer.SetEmptyText(__emptyText); SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp b/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp index bc8ea89..4c38c20 100644 --- a/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp +++ b/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp @@ -573,7 +573,7 @@ _MessageBoxPresenter::GetButtonString(void) case MSGBOX_STYLE_OK: __buttonNum = 1; - GET_STRING_CONFIG(IDS_COM_SK_OK, __buttonText[0]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_OK, __buttonText[0]); break; case MSGBOX_STYLE_CANCEL: @@ -583,20 +583,20 @@ _MessageBoxPresenter::GetButtonString(void) case MSGBOX_STYLE_OKCANCEL: __buttonNum = 2; - GET_STRING_CONFIG(IDS_COM_SK_OK, __buttonText[0]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_OK, __buttonText[0]); GET_STRING_CONFIG(IDS_COM_SK_CANCEL, __buttonText[1]); break; case MSGBOX_STYLE_YESNO: __buttonNum = 2; - GET_STRING_CONFIG(IDS_COM_SK_YES, __buttonText[0]); - GET_STRING_CONFIG(IDS_COM_SK_NO, __buttonText[1]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_YES, __buttonText[0]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_NO, __buttonText[1]); break; case MSGBOX_STYLE_YESNOCANCEL: __buttonNum = 3; - GET_STRING_CONFIG(IDS_COM_SK_YES, __buttonText[0]); - GET_STRING_CONFIG(IDS_COM_SK_NO, __buttonText[1]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_YES, __buttonText[0]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_NO, __buttonText[1]); GET_STRING_CONFIG(IDS_COM_SK_CANCEL, __buttonText[2]); break; diff --git a/src/ui/inc/FUi_ResourceManager.h b/src/ui/inc/FUi_ResourceManager.h index 68330ff..be25349 100644 --- a/src/ui/inc/FUi_ResourceManager.h +++ b/src/ui/inc/FUi_ResourceManager.h @@ -165,7 +165,7 @@ class _OSP_EXPORT_ _ResourceManager public: static _ResourceManager* GetInstance(void); result GetBitmapN(int bitmapId, Tizen::Graphics::BitmapPixelFormat pixelFormat, _ControlOrientation orientation, Tizen::Graphics::Bitmap*& pBitmap); - result GetString(const Tizen::Base::String& stringId, Tizen::Base::String& string); + result GetString(const char* stringId, Tizen::Base::String& string); result GetColor(int colorId, Tizen::Graphics::Color& color); result GetShape(int shapeId, _ControlOrientation orientation, int& value); result GetFixedValue(int shapeId, _ControlOrientation orientation, int& value); diff --git a/src/ui/inc/FUi_ResourceStringLoader.h b/src/ui/inc/FUi_ResourceStringLoader.h index 07efe92..652d408 100644 --- a/src/ui/inc/FUi_ResourceStringLoader.h +++ b/src/ui/inc/FUi_ResourceStringLoader.h @@ -40,7 +40,7 @@ public: StringLoader(void); virtual ~StringLoader(void); - result GetString(const Tizen::Base::String& stringId, Tizen::Base::String& string); + result GetString(const char* stringId, Tizen::Base::String& string); private: //coding idiom. diff --git a/src/ui/resource/FUi_ResourceStringLoader.cpp b/src/ui/resource/FUi_ResourceStringLoader.cpp index ab74b1f..65b5b14 100644 --- a/src/ui/resource/FUi_ResourceStringLoader.cpp +++ b/src/ui/resource/FUi_ResourceStringLoader.cpp @@ -26,6 +26,7 @@ using namespace Tizen::Base; namespace { const char* const SLP_SYSTEM_DOMAIN ="sys_string"; +const char* const OSP_DOMAIN ="osp"; } namespace Tizen { namespace Ui { namespace _Resource @@ -37,13 +38,9 @@ StringLoader::~StringLoader(void) { } result -StringLoader::GetString(const String& stringId, String& string) +StringLoader::GetString(const char* stringId, String& string) { - char* pString = null; - char* pStringId = _StringConverter::CopyToCharArrayN(stringId); - pString = dgettext(::SLP_SYSTEM_DOMAIN, pStringId); - string = pString; - delete[] pStringId; + string = dgettext(OSP_DOMAIN, stringId); return E_SUCCESS; } }}}//Tizen::Ui::_Resource -- 2.7.4