Revert "[Tizen] Added layout direction change by system language" 18/148918/1
authorHeeyong Song <heeyong.song@samsung.com>
Mon, 11 Sep 2017 06:48:43 +0000 (15:48 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 11 Sep 2017 06:48:46 +0000 (15:48 +0900)
This reverts commit e4110a9070a6f2e6b9ebb1f254ec06512f121f42.

Change-Id: I64d9585b8888bbae84b839d6bfa43ae11a325bd2

adaptors/common/adaptor-impl.cpp
adaptors/common/adaptor-impl.h
adaptors/common/locale-utils.cpp
adaptors/common/locale-utils.h
adaptors/tizen/adaptor-impl-tizen.cpp
adaptors/ubuntu/adaptor-impl-ubuntu.cpp
packaging/dali-adaptor.spec

index 4042991..2eb5e82 100644 (file)
@@ -20,9 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
-#include <dali/public-api/common/stage.h>
-#include <dali/public-api/actors/layer.h>
-#include <dali/devel-api/actors/actor-devel.h>
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/core.h>
 #include <dali/integration-api/context-notifier.h>
@@ -58,8 +55,6 @@
 #include <tizen-logging.h>
 #include <image-loading.h>
 
-#include <locale-utils.h>
-
 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
index 5920b85..f48f29e 100644 (file)
@@ -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:
 
   /**
index 6df8616..d14856b 100644 (file)
@@ -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
index 7d7cec6..b04182b 100644 (file)
@@ -20,7 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <string>
-#include <dali/devel-api/actors/actor-devel.h>
 
 // INTERNAL INCLUDES
 #include <imf-manager.h>
@@ -39,8 +38,6 @@ namespace Locale
 
 Dali::ImfManager::TextDirection GetTextDirection( std::string locale );
 
-DevelActor::LayoutDirection::Type GetLayoutDirection( std::string locale );
-
 } // namespace Locale
 
 } // namespace Adaptor
index 67afe39..1619139 100644 (file)
@@ -25,8 +25,6 @@
 #include <ecore-wl-render-surface.h>
 #endif
 
-#include <system_settings.h>
-
 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
index 4f1201c..be25b7b 100644 (file)
@@ -41,10 +41,6 @@ void Adaptor::SurfaceInitialized()
 {
 }
 
-void Adaptor::SetupSystemInformation()
-{
-}
-
 } // namespace Adaptor
 
 } // namespace Internal
index 77a92a7..2cf0dae 100644 (file)
@@ -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