From: minho.sun Date: Tue, 30 May 2017 06:39:07 +0000 (+0900) Subject: Fix feedback style error message. X-Git-Tag: dali_1.2.42~5^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=b81849b1d366b03595dec285264ecbd8b6f1801e Fix feedback style error message. Fix feedback style error message. It ocurred because of empty path. Give default theme path when applying default theme instead of empty path. Plus, add default-feedback-theme.json to resource package. Change-Id: I2459cc39a798bf3b86c688275feae8957798bcd9 Signed-off-by: minho.sun --- diff --git a/dali-toolkit/internal/styling/style-manager-impl.cpp b/dali-toolkit/internal/styling/style-manager-impl.cpp index 98596eb..ba89d88 100644 --- a/dali-toolkit/internal/styling/style-manager-impl.cpp +++ b/dali-toolkit/internal/styling/style-manager-impl.cpp @@ -133,8 +133,7 @@ void StyleManager::ApplyTheme( const std::string& themeFile ) void StyleManager::ApplyDefaultTheme() { - std::string empty; - SetTheme( empty ); + SetTheme( DEFAULT_THEME ); } const std::string& StyleManager::GetDefaultFontFamily() const @@ -233,10 +232,10 @@ void StyleManager::SetTheme( const std::string& themeFile ) // Always load the default theme first, then merge in the custom theme if present themeLoaded = LoadJSON( mThemeBuilder, DEFAULT_THEME ); + mThemeFile = themeFile; - if( ! themeFile.empty() ) + if( themeFile.compare(DEFAULT_THEME) != 0 ) { - mThemeFile = themeFile; themeLoaded = LoadJSON( mThemeBuilder, mThemeFile ); } diff --git a/packaging/dali-toolkit.spec b/packaging/dali-toolkit.spec index 39f269b..dca59a9 100644 --- a/packaging/dali-toolkit.spec +++ b/packaging/dali-toolkit.spec @@ -185,6 +185,9 @@ cp -r dali-toolkit/styles/720x1280/* %{buildroot}%{dali_toolkit_style_files}/720 mkdir -p %{buildroot}%{dali_toolkit_style_files}/1920x1080 cp -r dali-toolkit/styles/1920x1080/* %{buildroot}%{dali_toolkit_style_files}/1920x1080 +# Copy default feedback theme +cp dali-toolkit/styles/default-feedback-theme.json %{buildroot}%{dali_toolkit_style_files} + ############################## # Post Install ############################## @@ -276,6 +279,7 @@ popd %{dali_toolkit_image_files}/* %{dali_toolkit_sound_files}/* %{dali_toolkit_style_files}/480x800/* +%{dali_toolkit_style_files}/default-feedback-theme.json %{_datadir}/locale/*/LC_MESSAGES/* %files resources_720x1280 @@ -284,6 +288,7 @@ popd %{dali_toolkit_image_files}/* %{dali_toolkit_sound_files}/* %{dali_toolkit_style_files}/720x1280/* +%{dali_toolkit_style_files}/default-feedback-theme.json %{_datadir}/locale/*/LC_MESSAGES/* %files resources_1920x1080 @@ -292,4 +297,5 @@ popd %{dali_toolkit_image_files}/* %{dali_toolkit_sound_files}/* %{dali_toolkit_style_files}/1920x1080/* +%{dali_toolkit_style_files}/default-feedback-theme.json %{_datadir}/locale/*/LC_MESSAGES/*