From 26e723d732dee359276f8affa3be6dc57849ec62 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Mon, 11 Sep 2017 15:48:43 +0900 Subject: [PATCH] Revert "[Tizen] Added layout direction change by system language" This reverts commit e4110a9070a6f2e6b9ebb1f254ec06512f121f42. Change-Id: I64d9585b8888bbae84b839d6bfa43ae11a325bd2 --- adaptors/common/adaptor-impl.cpp | 14 ---------- adaptors/common/adaptor-impl.h | 11 -------- adaptors/common/locale-utils.cpp | 18 +------------ adaptors/common/locale-utils.h | 3 --- adaptors/tizen/adaptor-impl-tizen.cpp | 48 --------------------------------- adaptors/ubuntu/adaptor-impl-ubuntu.cpp | 4 --- packaging/dali-adaptor.spec | 1 - 7 files changed, 1 insertion(+), 98 deletions(-) diff --git a/adaptors/common/adaptor-impl.cpp b/adaptors/common/adaptor-impl.cpp index 4042991..2eb5e82 100644 --- a/adaptors/common/adaptor-impl.cpp +++ b/adaptors/common/adaptor-impl.cpp @@ -20,9 +20,6 @@ // EXTERNAL INCLUDES #include -#include -#include -#include #include #include #include @@ -58,8 +55,6 @@ #include #include -#include - using Dali::TextAbstraction::FontClient; namespace Dali @@ -194,8 +189,6 @@ void Adaptor::Initialize( Dali::Configuration::ContextLoss configuration ) { Dali::SetMaxTextureSize( mEnvironmentOptions->GetMaxTextureSize() ); } - - SetupSystemInformation(); } Adaptor::~Adaptor() @@ -830,13 +823,6 @@ float Adaptor::GetStereoBase() const return mCore->GetStereoBase(); } -void Adaptor::SetRootLayoutDirection( std::string locale ) -{ - Dali::Stage stage = Dali::Stage::GetCurrent(); - - stage.GetRootLayer().SetProperty( DevelActor::Property::LAYOUT_DIRECTION, Internal::Adaptor::Locale::GetLayoutDirection( locale ) ); -} - } // namespace Adaptor } // namespace Internal diff --git a/adaptors/common/adaptor-impl.h b/adaptors/common/adaptor-impl.h index 5920b85..f48f29e 100644 --- a/adaptors/common/adaptor-impl.h +++ b/adaptors/common/adaptor-impl.h @@ -345,12 +345,6 @@ public: */ void SurfaceResizeComplete( Dali::Adaptor::SurfaceSize surfaceSize ); - /** - * Sets layout direction of root by system language - * @param[in] locale System locale - */ - void SetRootLayoutDirection( std::string locale ); - public: //AdaptorInternalServices /** @@ -522,11 +516,6 @@ private: */ void GetDataStoragePath(std::string& path); - /** - * Sets up system information if needs - */ - void SetupSystemInformation(); - private: /** diff --git a/adaptors/common/locale-utils.cpp b/adaptors/common/locale-utils.cpp index 6df8616..d14856b 100644 --- a/adaptors/common/locale-utils.cpp +++ b/adaptors/common/locale-utils.cpp @@ -46,7 +46,7 @@ const LocaleDirection LOCALE_DIRECTION_LOOKUP_TABLE[] = { "am", "Amharic", Dali::ImfManager::LeftToRight }, { "ar", "Arabic", Dali::ImfManager::RightToLeft }, { "as", "Assamese", Dali::ImfManager::LeftToRight }, - { "az", "Azerbaijani", Dali::ImfManager::RightToLeft }, + { "az", "Azeri", Dali::ImfManager::LeftToRight }, { "be", "Belarusian", Dali::ImfManager::LeftToRight }, { "bg", "Bulgarian", Dali::ImfManager::LeftToRight }, { "bn", "Bengali", Dali::ImfManager::LeftToRight }, @@ -165,22 +165,6 @@ Dali::ImfManager::TextDirection GetTextDirection( std::string locale ) return direction; } -// ToDo: ImfManager enum should be removed from this function or locale-util should be modified. -DevelActor::LayoutDirection::Type GetLayoutDirection( std::string locale ) -{ - Dali::ImfManager::TextDirection textDirection( Dali::ImfManager::LeftToRight ); - DevelActor::LayoutDirection::Type direction( DevelActor::LayoutDirection::LTR ); - - textDirection = GetTextDirection( locale ); - - if( textDirection == Dali::ImfManager::RightToLeft ) - { - direction = DevelActor::LayoutDirection::RTL; - } - - return direction; -} - } // namespace Locale } // namespace Adaptor diff --git a/adaptors/common/locale-utils.h b/adaptors/common/locale-utils.h index 7d7cec6..b04182b 100644 --- a/adaptors/common/locale-utils.h +++ b/adaptors/common/locale-utils.h @@ -20,7 +20,6 @@ // EXTERNAL INCLUDES #include -#include // INTERNAL INCLUDES #include @@ -39,8 +38,6 @@ namespace Locale Dali::ImfManager::TextDirection GetTextDirection( std::string locale ); -DevelActor::LayoutDirection::Type GetLayoutDirection( std::string locale ); - } // namespace Locale } // namespace Adaptor diff --git a/adaptors/tizen/adaptor-impl-tizen.cpp b/adaptors/tizen/adaptor-impl-tizen.cpp index 67afe39..1619139 100644 --- a/adaptors/tizen/adaptor-impl-tizen.cpp +++ b/adaptors/tizen/adaptor-impl-tizen.cpp @@ -25,8 +25,6 @@ #include #endif -#include - namespace Dali { @@ -36,30 +34,6 @@ namespace Internal namespace Adaptor { -namespace -{ - -static void OnSystemLanguageChanged( system_settings_key_e key, void* data ) -{ - char* locale = NULL; - if( system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale ) != SYSTEM_SETTINGS_ERROR_NONE || - locale == NULL ) - { - DALI_LOG_ERROR( "DALI OnSystemLanguageChanged failed " ); - return; - } - - Adaptor* adaptor = static_cast< Adaptor* >( data ); - if( adaptor != NULL ) - { - adaptor->SetRootLayoutDirection( locale ); - } - - free( locale ); -} - -} // namesapce - void Adaptor::GetDataStoragePath( std::string& path) { #ifdef USE_APPFW @@ -108,28 +82,6 @@ void Adaptor::SurfaceInitialized() #endif } -void Adaptor::SetupSystemInformation() -{ - if( system_settings_set_changed_cb( SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, OnSystemLanguageChanged, this ) != SYSTEM_SETTINGS_ERROR_NONE ) - { - DALI_LOG_ERROR( "DALI system_settings_set_changed_cb failed.\n" ); - return; - } - - char* locale = NULL; - if( system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale ) != SYSTEM_SETTINGS_ERROR_NONE || - locale == NULL ) - { - DALI_LOG_ERROR( "DALI OnSystemLanguageChanged failed " ); - return; - } - - SetRootLayoutDirection( locale ); - - free( locale ); - -} - } // namespace Adaptor } // namespace Internal diff --git a/adaptors/ubuntu/adaptor-impl-ubuntu.cpp b/adaptors/ubuntu/adaptor-impl-ubuntu.cpp index 4f1201c..be25b7b 100644 --- a/adaptors/ubuntu/adaptor-impl-ubuntu.cpp +++ b/adaptors/ubuntu/adaptor-impl-ubuntu.cpp @@ -41,10 +41,6 @@ void Adaptor::SurfaceInitialized() { } -void Adaptor::SetupSystemInformation() -{ -} - } // namespace Adaptor } // namespace Internal diff --git a/packaging/dali-adaptor.spec b/packaging/dali-adaptor.spec index 77a92a7..2cf0dae 100644 --- a/packaging/dali-adaptor.spec +++ b/packaging/dali-adaptor.spec @@ -117,7 +117,6 @@ BuildRequires: pkgconfig(capi-appfw-app-control) BuildRequires: pkgconfig(screen_connector_provider) BuildRequires: pkgconfig(ecore-imf) %endif - BuildRequires: pkgconfig(capi-system-system-settings) # for feedback plugin -- 2.7.4