From 689ff9abd5284f9286e79d7ae887f187787796b2 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 3 Feb 2011 15:52:49 +0000 Subject: [PATCH] Elementary: Added the infrastructure for ui-mirroring support. * Added elm_mirrored_get/set to set the system mirrored mode * Added elm_widget_mirrored/get/set to set each widget's mirrored mode. * Added code to set the system mirrored mode from translations to elementary and added translations for all the rtl languages. (a trick to load according to locale). * Future commits will include specific widgets mirrored mode handling. Work by Aharon Hillel and Tom Hacohen. SVN revision: 56673 --- legacy/elementary/AUTHORS | 2 ++ legacy/elementary/Makefile.am | 38 +++++++++++++++++++-- legacy/elementary/autogen.sh | 1 + legacy/elementary/configure.ac | 24 +++++++++++++ legacy/elementary/po/ChangeLog | 11 ++++++ legacy/elementary/po/LINGUAS | 1 + legacy/elementary/po/Makevars | 41 +++++++++++++++++++++++ legacy/elementary/po/POTFILES.in | 1 + legacy/elementary/po/ar.po | 21 ++++++++++++ legacy/elementary/po/az_IR.po | 20 +++++++++++ legacy/elementary/po/fa.po | 20 +++++++++++ legacy/elementary/po/he.po | 20 +++++++++++ legacy/elementary/po/ps.po | 19 +++++++++++ legacy/elementary/po/ur.po | 19 +++++++++++ legacy/elementary/po/yi.po | 19 +++++++++++ legacy/elementary/src/lib/Elementary.h.in | 5 +++ legacy/elementary/src/lib/Makefile.am | 1 + legacy/elementary/src/lib/elm_config.c | 34 +++++++++++++++++++ legacy/elementary/src/lib/elm_priv.h | 1 + legacy/elementary/src/lib/elm_widget.c | 41 +++++++++++++++++++++-- legacy/elementary/src/lib/elm_widget.h | 2 ++ 21 files changed, 337 insertions(+), 4 deletions(-) create mode 100644 legacy/elementary/po/ChangeLog create mode 100644 legacy/elementary/po/LINGUAS create mode 100644 legacy/elementary/po/Makevars create mode 100644 legacy/elementary/po/POTFILES.in create mode 100644 legacy/elementary/po/ar.po create mode 100644 legacy/elementary/po/az_IR.po create mode 100644 legacy/elementary/po/fa.po create mode 100644 legacy/elementary/po/he.po create mode 100644 legacy/elementary/po/ps.po create mode 100644 legacy/elementary/po/ur.po create mode 100644 legacy/elementary/po/yi.po diff --git a/legacy/elementary/AUTHORS b/legacy/elementary/AUTHORS index 52c3367399..027b43eea8 100644 --- a/legacy/elementary/AUTHORS +++ b/legacy/elementary/AUTHORS @@ -34,3 +34,5 @@ Seunggyun Kim Sohyun Kim Jihoon Kim Jeonghyun Yun (arosis) +Tom Hacohen +Aharon Hillel diff --git a/legacy/elementary/Makefile.am b/legacy/elementary/Makefile.am index f41c83e915..01a3598386 100644 --- a/legacy/elementary/Makefile.am +++ b/legacy/elementary/Makefile.am @@ -1,8 +1,15 @@ SUBDIRS = src data config doc +if HAVE_PO + +SUBDIRS += po + +endif + ACLOCAL_AMFLAGS = -I m4 MAINTAINERCLEANFILES = \ +ABOUT-NLS \ Makefile.in \ aclocal.m4 \ config.guess \ @@ -20,7 +27,33 @@ m4/libtool.m4 \ m4/lt~obsolete.m4 \ m4/ltoptions.m4 \ m4/ltsugar.m4 \ -m4/ltversion.m4 +m4/ltversion.m4 \ +m4/gettext.m4 \ +m4/iconv.m4 \ +m4/lcmessage.m4 \ +m4/lib-ld.m4 \ +m4/lib-link.m4 \ +m4/lib-prefix.m4 \ +m4/nls.m4 \ +m4/po.m4 \ +m4/progtest.m4 + +if HAVE_PO + +MAINTAINERCLEANFILES += \ +po/boldquot.sed \ +po/en@boldquot.header \ +po/en@quot.header \ +po/insert-header.sin \ +po/Makefile.in.in \ +po/Makevars.template \ +po/quot.sed \ +po/remove-potcdate.sin \ +po/Rules-quot + +endif + + EXTRA_DIST = \ @@ -33,7 +66,8 @@ elementary.spec \ elementary.spec.in \ m4/ac_attribute.m4 \ m4/efl_binary.m4 \ -m4/efl_doxygen.m4 +m4/efl_doxygen.m4 \ +config.rpath pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = elementary.pc diff --git a/legacy/elementary/autogen.sh b/legacy/elementary/autogen.sh index 995ff2fd31..0a59462686 100755 --- a/legacy/elementary/autogen.sh +++ b/legacy/elementary/autogen.sh @@ -5,6 +5,7 @@ rm -f aclocal.m4 ltmain.sh touch README +echo "Running autopoint..." ; autopoint -f || : echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1 echo "Running autoheader..." ; autoheader || exit 1 echo "Running autoconf..." ; autoconf || exit 1 diff --git a/legacy/elementary/configure.ac b/legacy/elementary/configure.ac index 05673ebc87..a9de6dc48b 100644 --- a/legacy/elementary/configure.ac +++ b/legacy/elementary/configure.ac @@ -108,6 +108,15 @@ else fi AC_SUBST(pkgconfig_requires_private) +#================================================ +if test "x${prefix}" = "xNONE"; then + LOCALE_DIR="${ac_default_prefix}/share/locale" +else + LOCALE_DIR="${prefix}/share/locale" +fi +AC_SUBST(LOCALE_DIR) +#================================================ + lt_enable_auto_import="" ELM_UNIX_DEF="#undef" ELM_WIN32_DEF="#undef" @@ -476,6 +485,20 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"]) EFL_ENABLE_BIN([elementary-test]) EFL_ENABLE_BIN([elementary-config]) +m4_ifdef([AM_GNU_GETTEXT_VERSION], [ +AM_GNU_GETTEXT_VERSION([0.12.1]) +]) + +m4_ifdef([AM_GNU_GETTEXT], [ +AM_GNU_GETTEXT([external]) +po_makefile_in=po/Makefile.in +AM_CONDITIONAL([HAVE_PO], [true]) +],[ +AM_CONDITIONAL([HAVE_PO], [false]) +]) +AC_SUBST(LTLIBINTL) + + AC_OUTPUT([ Makefile elementary.spec @@ -500,6 +523,7 @@ config/Makefile config/default/Makefile config/standard/Makefile config/illume/Makefile +$po_makefile_in ]) ##################################################################### diff --git a/legacy/elementary/po/ChangeLog b/legacy/elementary/po/ChangeLog new file mode 100644 index 0000000000..31234d35b5 --- /dev/null +++ b/legacy/elementary/po/ChangeLog @@ -0,0 +1,11 @@ +2010-12-26 gettextize + + * Makefile.in.in: New file, from gettext-0.17. + * Rules-quot: New file, from gettext-0.17. + * boldquot.sed: New file, from gettext-0.17. + * en@boldquot.header: New file, from gettext-0.17. + * en@quot.header: New file, from gettext-0.17. + * insert-header.sin: New file, from gettext-0.17. + * quot.sed: New file, from gettext-0.17. + * remove-potcdate.sin: New file, from gettext-0.17. + diff --git a/legacy/elementary/po/LINGUAS b/legacy/elementary/po/LINGUAS new file mode 100644 index 0000000000..1c079a19b6 --- /dev/null +++ b/legacy/elementary/po/LINGUAS @@ -0,0 +1 @@ +ar az_IR fa he ps ur yi diff --git a/legacy/elementary/po/Makevars b/legacy/elementary/po/Makevars new file mode 100644 index 0000000000..22837aba49 --- /dev/null +++ b/legacy/elementary/po/Makevars @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8 --foreign-user + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Enlightenment development team + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = enlightenment-devel@lists.sourceforge.net + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/legacy/elementary/po/POTFILES.in b/legacy/elementary/po/POTFILES.in new file mode 100644 index 0000000000..6322c828a5 --- /dev/null +++ b/legacy/elementary/po/POTFILES.in @@ -0,0 +1 @@ +src/lib/elm_config.c diff --git a/legacy/elementary/po/ar.po b/legacy/elementary/po/ar.po new file mode 100644 index 0000000000..23f64e6fc0 --- /dev/null +++ b/legacy/elementary/po/ar.po @@ -0,0 +1,21 @@ +# Elementary translation file for Left To Right languages. +# This file is distributed under the same license as the Elementary package. +# FIRST AUTHOR , 2010. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: elementary\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2011-01-31 15:28+0200\n" +"PO-Revision-Date: 2010-12-26 10:05+0200\n" +"Last-Translator: Tom Hacohen \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" + +#: src/lib/elm_config.c:1537 +msgid "default:LTR" +msgstr "default:RTL" diff --git a/legacy/elementary/po/az_IR.po b/legacy/elementary/po/az_IR.po new file mode 100644 index 0000000000..2bfa39b13f --- /dev/null +++ b/legacy/elementary/po/az_IR.po @@ -0,0 +1,20 @@ +# Elementary translation file for Left To Right languages. +# This file is distributed under the same license as the Elementary package. +# FIRST AUTHOR , 2010. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: elementary\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2011-01-31 15:28+0200\n" +"PO-Revision-Date: 2010-12-26 10:05+0200\n" +"Last-Translator: Tom Hacohen \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: src/lib/elm_config.c:1537 +msgid "default:LTR" +msgstr "default:RTL" diff --git a/legacy/elementary/po/fa.po b/legacy/elementary/po/fa.po new file mode 100644 index 0000000000..2bfa39b13f --- /dev/null +++ b/legacy/elementary/po/fa.po @@ -0,0 +1,20 @@ +# Elementary translation file for Left To Right languages. +# This file is distributed under the same license as the Elementary package. +# FIRST AUTHOR , 2010. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: elementary\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2011-01-31 15:28+0200\n" +"PO-Revision-Date: 2010-12-26 10:05+0200\n" +"Last-Translator: Tom Hacohen \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: src/lib/elm_config.c:1537 +msgid "default:LTR" +msgstr "default:RTL" diff --git a/legacy/elementary/po/he.po b/legacy/elementary/po/he.po new file mode 100644 index 0000000000..b49df2b3df --- /dev/null +++ b/legacy/elementary/po/he.po @@ -0,0 +1,20 @@ +# Elementary translation file for Left To Right languages. +# This file is distributed under the same license as the Elementary package. +# FIRST AUTHOR , 2010. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: elementary\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2011-01-31 15:28+0200\n" +"PO-Revision-Date: 2010-12-26 10:05+0200\n" +"Last-Translator: Aharon Hillel \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: src/lib/elm_config.c:1537 +msgid "default:LTR" +msgstr "default:RTL" diff --git a/legacy/elementary/po/ps.po b/legacy/elementary/po/ps.po new file mode 100644 index 0000000000..ec7d8cdfbd --- /dev/null +++ b/legacy/elementary/po/ps.po @@ -0,0 +1,19 @@ +# Elementary translation file for Left To Right languages. +# This file is distributed under the same license as the Elementary package. +# FIRST AUTHOR , 2010. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: elementary\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2011-01-31 15:28+0200\n" +"PO-Revision-Date: 2010-12-26 10:05+0200\n" +"Last-Translator: Tom Hacohen \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/lib/elm_config.c:1537 +msgid "default:LTR" +msgstr "default:RTL" diff --git a/legacy/elementary/po/ur.po b/legacy/elementary/po/ur.po new file mode 100644 index 0000000000..ec7d8cdfbd --- /dev/null +++ b/legacy/elementary/po/ur.po @@ -0,0 +1,19 @@ +# Elementary translation file for Left To Right languages. +# This file is distributed under the same license as the Elementary package. +# FIRST AUTHOR , 2010. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: elementary\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2011-01-31 15:28+0200\n" +"PO-Revision-Date: 2010-12-26 10:05+0200\n" +"Last-Translator: Tom Hacohen \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/lib/elm_config.c:1537 +msgid "default:LTR" +msgstr "default:RTL" diff --git a/legacy/elementary/po/yi.po b/legacy/elementary/po/yi.po new file mode 100644 index 0000000000..ec7d8cdfbd --- /dev/null +++ b/legacy/elementary/po/yi.po @@ -0,0 +1,19 @@ +# Elementary translation file for Left To Right languages. +# This file is distributed under the same license as the Elementary package. +# FIRST AUTHOR , 2010. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: elementary\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2011-01-31 15:28+0200\n" +"PO-Revision-Date: 2010-12-26 10:05+0200\n" +"Last-Translator: Tom Hacohen \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/lib/elm_config.c:1537 +msgid "default:LTR" +msgstr "default:RTL" diff --git a/legacy/elementary/src/lib/Elementary.h.in b/legacy/elementary/src/lib/Elementary.h.in index 0ae22f3767..74704ee57b 100644 --- a/legacy/elementary/src/lib/Elementary.h.in +++ b/legacy/elementary/src/lib/Elementary.h.in @@ -276,6 +276,8 @@ extern "C" { EAPI const char *elm_object_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); EAPI void elm_object_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1); EAPI Eina_Bool elm_object_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + EAPI Eina_Bool elm_widget_mirrored_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + EAPI void elm_widget_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) EINA_ARG_NONNULL(1); EAPI Eina_Bool elm_object_widget_check(const Evas_Object *obj) EINA_ARG_NONNULL(1); EAPI Evas_Object *elm_object_parent_widget_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); @@ -286,6 +288,9 @@ extern "C" { EAPI void elm_scale_set(double scale); EAPI void elm_scale_all_set(double scale); + EAPI Eina_Bool elm_mirrored_get(void); + EAPI void elm_mirrored_set(Eina_Bool mirrored); + EAPI Eina_Bool elm_config_save(void); EAPI void elm_config_reload(void); diff --git a/legacy/elementary/src/lib/Makefile.am b/legacy/elementary/src/lib/Makefile.am index ab9e24a6ac..af9bb49a72 100644 --- a/legacy/elementary/src/lib/Makefile.am +++ b/legacy/elementary/src/lib/Makefile.am @@ -9,6 +9,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ -I$(top_builddir)/src/lib \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +-DLOCALE_DIR=\"@LOCALE_DIR@\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ @ELEMENTARY_CFLAGS@ \ @ELEMENTARY_X_CFLAGS@ \ diff --git a/legacy/elementary/src/lib/elm_config.c b/legacy/elementary/src/lib/elm_config.c index 0371b18015..8836964748 100644 --- a/legacy/elementary/src/lib/elm_config.c +++ b/legacy/elementary/src/lib/elm_config.c @@ -9,6 +9,8 @@ #include #include "elm_priv.h" +#define _(string) gettext(string) + Elm_Config *_elm_config = NULL; char *_elm_profile = NULL; static Eet_Data_Descriptor *_config_edd = NULL; @@ -1131,6 +1133,7 @@ _config_load(void) _elm_config->fps = 60.0; _elm_config->theme = eina_stringshare_add("default"); _elm_config->modules = NULL; + _elm_config->is_mirrored = EINA_FALSE; /* Read sys value in env_get() */ _elm_config->tooltip_delay = 1.0; _elm_config->cursor_engine_only = EINA_TRUE; _elm_config->focus_highlight_enable = EINA_FALSE; @@ -1529,6 +1532,12 @@ _env_get(void) s = getenv("ELM_MODULES"); if (s) eina_stringshare_replace(&_elm_config->modules, s); + /* Get RTL orientation from system */ + setlocale(LC_ALL, ""); + bindtextdomain("elementary", LOCALE_DIR); + textdomain("elementary"); + _elm_config->is_mirrored = !strcmp(_("default:LTR"), "default:RTL"); + s = getenv("ELM_TOOLTIP_DELAY"); if (s) { @@ -1567,6 +1576,31 @@ _env_get(void) if (s) _elm_config->effect_enable = !!atoi(s); } +/** + * Get the system mirrored mode. This determines the default mirrored mode + * of widgets. + * + * @return EINA_TRUE if mirrored is set, EINA_FALSE otherwise + */ +EAPI Eina_Bool +elm_mirrored_get(void) +{ + return _elm_config->is_mirrored; +} + +/** + * Set the system mirrored mode. This determines the default mirrored mode + * of widgets. + * + * @param mirrored EINA_TRUE to set mirrored mode, EINA_FALSE to unset it. + */ +EAPI void +elm_mirrored_set(Eina_Bool mirrored) +{ + /* TODO: Should update all interface */ + _elm_config->is_mirrored = mirrored; +} + void _elm_config_init(void) { diff --git a/legacy/elementary/src/lib/elm_priv.h b/legacy/elementary/src/lib/elm_priv.h index 5e1133aca6..4217a270b2 100644 --- a/legacy/elementary/src/lib/elm_priv.h +++ b/legacy/elementary/src/lib/elm_priv.h @@ -111,6 +111,7 @@ struct _Elm_Config Eina_Bool inwin_dialogs_enable; int icon_size; double longpress_timeout; + Eina_Bool is_mirrored : 1; Eina_Bool effect_enable; }; diff --git a/legacy/elementary/src/lib/elm_widget.c b/legacy/elementary/src/lib/elm_widget.c index e3e1e5a64d..1ef0892a33 100644 --- a/legacy/elementary/src/lib/elm_widget.c +++ b/legacy/elementary/src/lib/elm_widget.c @@ -76,6 +76,7 @@ struct _Smart_Data Eina_Bool highlight_ignore : 1; Eina_Bool highlight_in_theme : 1; Eina_Bool disabled : 1; + Eina_Bool is_mirrored : 1; Eina_List *focus_chain; Eina_List *event_cb; @@ -374,8 +375,11 @@ elm_widget_api_check(int ver) EAPI Evas_Object * elm_widget_add(Evas *evas) { + Evas_Object *obj; _smart_init(); - return evas_object_smart_add(evas, _e_smart); + obj = evas_object_smart_add(evas, _e_smart); + elm_widget_mirrored_set(obj, elm_mirrored_get()); + return obj; } EAPI void @@ -527,6 +531,37 @@ elm_widget_focus_next_hook_set(Evas_Object *obj, Eina_Bool (*func) (const Evas_O sd->focus_next_func = func; } +/** + * Returns the widget's mirrored mode. + * + * @param obj The widget. + * @return mirrored mode of the object. + * + **/ +EAPI Eina_Bool +elm_widget_mirrored_get(const Evas_Object *obj) +{ + API_ENTRY return EINA_FALSE; + return sd->is_mirrored; +} + +/** + * Sets the widget's mirrored mode. + * + * @param obj The widget. + * @param mirrored EINA_TRUE to set mirrored mode. EINA_FALSE to unset. + */ +EAPI void +elm_widget_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) +{ + API_ENTRY return; + if (sd->is_mirrored != mirrored) + { + sd->is_mirrored = mirrored; + elm_widget_theme(obj); + } +} + EAPI void elm_widget_on_focus_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data) { @@ -615,6 +650,7 @@ elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj) API_ENTRY return; double scale, pscale = elm_widget_scale_get(sobj); Elm_Theme *th, *pth = elm_widget_theme_get(sobj); + Eina_Bool mirrored, pmirrored = elm_widget_mirrored_get(obj); if (_elm_widget_is(sobj)) { @@ -646,7 +682,8 @@ elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj) evas_object_smart_callback_call(obj, "sub-object-add", sobj); scale = elm_widget_scale_get(sobj); th = elm_widget_theme_get(sobj); - if ((scale != pscale) || (th != pth)) elm_widget_theme(sobj); + mirrored = elm_widget_mirrored_get(sobj); + if ((scale != pscale) || (th != pth) || (pmirrored != mirrored)) elm_widget_theme(sobj); if (elm_widget_focus_get(sobj)) _focus_parents(obj); } diff --git a/legacy/elementary/src/lib/elm_widget.h b/legacy/elementary/src/lib/elm_widget.h index bb25156a9e..ba381aef77 100644 --- a/legacy/elementary/src/lib/elm_widget.h +++ b/legacy/elementary/src/lib/elm_widget.h @@ -279,6 +279,8 @@ EAPI void elm_widget_scale_set(Evas_Object *obj, double scale); EAPI double elm_widget_scale_get(const Evas_Object *obj); EAPI void elm_widget_theme_set(Evas_Object *obj, Elm_Theme *th); EAPI Elm_Theme *elm_widget_theme_get(const Evas_Object *obj); +EAPI Eina_Bool elm_widget_mirrored_get(const Evas_Object *obj); +EAPI void elm_widget_mirrored_set(Evas_Object *obj, Eina_Bool mirrored); EAPI void elm_widget_style_set(Evas_Object *obj, const char *style); EAPI const char *elm_widget_style_get(const Evas_Object *obj); EAPI void elm_widget_type_set(Evas_Object *obj, const char *type);