summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2011-02-03 15:52:49 +0000
committerTom Hacohen <tom@stosb.com>2011-02-03 15:52:49 +0000
commit689ff9abd5284f9286e79d7ae887f187787796b2 (patch)
tree882990801599faa9ecf36f2b5758f31ffa1d3b48
parenta22d8668a5c8a62a6f951a0fa1502e3e36445283 (diff)
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
-rw-r--r--legacy/elementary/AUTHORS2
-rw-r--r--legacy/elementary/Makefile.am38
-rwxr-xr-xlegacy/elementary/autogen.sh1
-rw-r--r--legacy/elementary/configure.ac24
-rw-r--r--legacy/elementary/po/ChangeLog11
-rw-r--r--legacy/elementary/po/LINGUAS1
-rw-r--r--legacy/elementary/po/Makevars41
-rw-r--r--legacy/elementary/po/POTFILES.in1
-rw-r--r--legacy/elementary/po/ar.po21
-rw-r--r--legacy/elementary/po/az_IR.po20
-rw-r--r--legacy/elementary/po/fa.po20
-rw-r--r--legacy/elementary/po/he.po20
-rw-r--r--legacy/elementary/po/ps.po19
-rw-r--r--legacy/elementary/po/ur.po19
-rw-r--r--legacy/elementary/po/yi.po19
-rw-r--r--legacy/elementary/src/lib/Elementary.h.in5
-rw-r--r--legacy/elementary/src/lib/Makefile.am1
-rw-r--r--legacy/elementary/src/lib/elm_config.c34
-rw-r--r--legacy/elementary/src/lib/elm_priv.h1
-rw-r--r--legacy/elementary/src/lib/elm_widget.c41
-rw-r--r--legacy/elementary/src/lib/elm_widget.h2
21 files changed, 337 insertions, 4 deletions
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 <sgyun.kim@samsung.com> <tmdrbs@gmail.com>
34Sohyun Kim <anna1014.kim@samsung.com> <sohyun.anna@gmail.com> 34Sohyun Kim <anna1014.kim@samsung.com> <sohyun.anna@gmail.com>
35Jihoon Kim <jihoon48.kim@samsung.com> 35Jihoon Kim <jihoon48.kim@samsung.com>
36Jeonghyun Yun (arosis) <jh0506.yun@samsung.com> 36Jeonghyun Yun (arosis) <jh0506.yun@samsung.com>
37Tom Hacohen <tom@stosb.com>
38Aharon Hillel <a.hillel@partner.samsung.com>
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 @@
1SUBDIRS = src data config doc 1SUBDIRS = src data config doc
2 2
3if HAVE_PO
4
5SUBDIRS += po
6
7endif
8
3ACLOCAL_AMFLAGS = -I m4 9ACLOCAL_AMFLAGS = -I m4
4 10
5MAINTAINERCLEANFILES = \ 11MAINTAINERCLEANFILES = \
12ABOUT-NLS \
6Makefile.in \ 13Makefile.in \
7aclocal.m4 \ 14aclocal.m4 \
8config.guess \ 15config.guess \
@@ -20,7 +27,33 @@ m4/libtool.m4 \
20m4/lt~obsolete.m4 \ 27m4/lt~obsolete.m4 \
21m4/ltoptions.m4 \ 28m4/ltoptions.m4 \
22m4/ltsugar.m4 \ 29m4/ltsugar.m4 \
23m4/ltversion.m4 30m4/ltversion.m4 \
31m4/gettext.m4 \
32m4/iconv.m4 \
33m4/lcmessage.m4 \
34m4/lib-ld.m4 \
35m4/lib-link.m4 \
36m4/lib-prefix.m4 \
37m4/nls.m4 \
38m4/po.m4 \
39m4/progtest.m4
40
41if HAVE_PO
42
43MAINTAINERCLEANFILES += \
44po/boldquot.sed \
45po/en@boldquot.header \
46po/en@quot.header \
47po/insert-header.sin \
48po/Makefile.in.in \
49po/Makevars.template \
50po/quot.sed \
51po/remove-potcdate.sin \
52po/Rules-quot
53
54endif
55
56
24 57
25 58
26EXTRA_DIST = \ 59EXTRA_DIST = \
@@ -33,7 +66,8 @@ elementary.spec \
33elementary.spec.in \ 66elementary.spec.in \
34m4/ac_attribute.m4 \ 67m4/ac_attribute.m4 \
35m4/efl_binary.m4 \ 68m4/efl_binary.m4 \
36m4/efl_doxygen.m4 69m4/efl_doxygen.m4 \
70config.rpath
37 71
38pkgconfigdir = $(libdir)/pkgconfig 72pkgconfigdir = $(libdir)/pkgconfig
39pkgconfig_DATA = elementary.pc 73pkgconfig_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
5 5
6touch README 6touch README
7 7
8echo "Running autopoint..." ; autopoint -f || :
8echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1 9echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
9echo "Running autoheader..." ; autoheader || exit 1 10echo "Running autoheader..." ; autoheader || exit 1
10echo "Running autoconf..." ; autoconf || exit 1 11echo "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
108fi 108fi
109AC_SUBST(pkgconfig_requires_private) 109AC_SUBST(pkgconfig_requires_private)
110 110
111#================================================
112if test "x${prefix}" = "xNONE"; then
113 LOCALE_DIR="${ac_default_prefix}/share/locale"
114else
115 LOCALE_DIR="${prefix}/share/locale"
116fi
117AC_SUBST(LOCALE_DIR)
118#================================================
119
111lt_enable_auto_import="" 120lt_enable_auto_import=""
112ELM_UNIX_DEF="#undef" 121ELM_UNIX_DEF="#undef"
113ELM_WIN32_DEF="#undef" 122ELM_WIN32_DEF="#undef"
@@ -476,6 +485,20 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
476EFL_ENABLE_BIN([elementary-test]) 485EFL_ENABLE_BIN([elementary-test])
477EFL_ENABLE_BIN([elementary-config]) 486EFL_ENABLE_BIN([elementary-config])
478 487
488m4_ifdef([AM_GNU_GETTEXT_VERSION], [
489AM_GNU_GETTEXT_VERSION([0.12.1])
490])
491
492m4_ifdef([AM_GNU_GETTEXT], [
493AM_GNU_GETTEXT([external])
494po_makefile_in=po/Makefile.in
495AM_CONDITIONAL([HAVE_PO], [true])
496],[
497AM_CONDITIONAL([HAVE_PO], [false])
498])
499AC_SUBST(LTLIBINTL)
500
501
479AC_OUTPUT([ 502AC_OUTPUT([
480Makefile 503Makefile
481elementary.spec 504elementary.spec
@@ -500,6 +523,7 @@ config/Makefile
500config/default/Makefile 523config/default/Makefile
501config/standard/Makefile 524config/standard/Makefile
502config/illume/Makefile 525config/illume/Makefile
526$po_makefile_in
503]) 527])
504 528
505##################################################################### 529#####################################################################
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 @@
12010-12-26 gettextize <bug-gnu-gettext@gnu.org>
2
3 * Makefile.in.in: New file, from gettext-0.17.
4 * Rules-quot: New file, from gettext-0.17.
5 * boldquot.sed: New file, from gettext-0.17.
6 * en@boldquot.header: New file, from gettext-0.17.
7 * en@quot.header: New file, from gettext-0.17.
8 * insert-header.sin: New file, from gettext-0.17.
9 * quot.sed: New file, from gettext-0.17.
10 * remove-potcdate.sin: New file, from gettext-0.17.
11
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 @@
1# Makefile variables for PO directory in any package using GNU gettext.
2
3# Usually the message domain is the same as the package name.
4DOMAIN = $(PACKAGE)
5
6# These two variables depend on the location of this directory.
7subdir = po
8top_builddir = ..
9
10# These options get passed to xgettext.
11XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8 --foreign-user
12
13# This is the copyright holder that gets inserted into the header of the
14# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
15# package. (Note that the msgstr strings, extracted from the package's
16# sources, belong to the copyright holder of the package.) Translators are
17# expected to transfer the copyright for their translations to this person
18# or entity, or to disclaim their copyright. The empty string stands for
19# the public domain; in this case the translators are expected to disclaim
20# their copyright.
21COPYRIGHT_HOLDER = Enlightenment development team
22
23# This is the email address or URL to which the translators shall report
24# bugs in the untranslated strings:
25# - Strings which are not entire sentences, see the maintainer guidelines
26# in the GNU gettext documentation, section 'Preparing Strings'.
27# - Strings which use unclear terms or require additional context to be
28# understood.
29# - Strings which make invalid assumptions about notation of date, time or
30# money.
31# - Pluralisation problems.
32# - Incorrect English spelling.
33# - Incorrect formatting.
34# It can be your email address, or a mailing list address where translators
35# can write to without being subscribed, or the URL of a web page through
36# which the translators can contact you.
37MSGID_BUGS_ADDRESS = enlightenment-devel@lists.sourceforge.net
38
39# This is the list of locale categories, beyond LC_MESSAGES, for which the
40# message catalogs shall be used. It is usually empty.
41EXTRA_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 @@
1# Elementary translation file for Left To Right languages.
2# This file is distributed under the same license as the Elementary package.
3# FIRST AUTHOR <tom.hacohen@partner.samsung.com>, 2010.
4#
5#, fuzzy
6msgid ""
7msgstr ""
8"Project-Id-Version: elementary\n"
9"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
10"POT-Creation-Date: 2011-01-31 15:28+0200\n"
11"PO-Revision-Date: 2010-12-26 10:05+0200\n"
12"Last-Translator: Tom Hacohen <tom.hacohen@partner.samsung.com>\n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
17"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
18
19#: src/lib/elm_config.c:1537
20msgid "default:LTR"
21msgstr "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 @@
1# Elementary translation file for Left To Right languages.
2# This file is distributed under the same license as the Elementary package.
3# FIRST AUTHOR <tom.hacohen@partner.samsung.com>, 2010.
4#
5#, fuzzy
6msgid ""
7msgstr ""
8"Project-Id-Version: elementary\n"
9"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
10"POT-Creation-Date: 2011-01-31 15:28+0200\n"
11"PO-Revision-Date: 2010-12-26 10:05+0200\n"
12"Last-Translator: Tom Hacohen <tom.hacohen@partner.samsung.com>\n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"Plural-Forms: nplurals=1; plural=0;\n"
17
18#: src/lib/elm_config.c:1537
19msgid "default:LTR"
20msgstr "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 @@
1# Elementary translation file for Left To Right languages.
2# This file is distributed under the same license as the Elementary package.
3# FIRST AUTHOR <tom.hacohen@partner.samsung.com>, 2010.
4#
5#, fuzzy
6msgid ""
7msgstr ""
8"Project-Id-Version: elementary\n"
9"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
10"POT-Creation-Date: 2011-01-31 15:28+0200\n"
11"PO-Revision-Date: 2010-12-26 10:05+0200\n"
12"Last-Translator: Tom Hacohen <tom.hacohen@partner.samsung.com>\n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"Plural-Forms: nplurals=1; plural=0;\n"
17
18#: src/lib/elm_config.c:1537
19msgid "default:LTR"
20msgstr "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 @@
1# Elementary translation file for Left To Right languages.
2# This file is distributed under the same license as the Elementary package.
3# FIRST AUTHOR <a.hillel@partner.samsung.com>, 2010.
4#
5#, fuzzy
6msgid ""
7msgstr ""
8"Project-Id-Version: elementary\n"
9"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
10"POT-Creation-Date: 2011-01-31 15:28+0200\n"
11"PO-Revision-Date: 2010-12-26 10:05+0200\n"
12"Last-Translator: Aharon Hillel <a.hillel@partner.samsung.com>\n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
18#: src/lib/elm_config.c:1537
19msgid "default:LTR"
20msgstr "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 @@
1# Elementary translation file for Left To Right languages.
2# This file is distributed under the same license as the Elementary package.
3# FIRST AUTHOR <tom.hacohen@partner.samsung.com>, 2010.
4#
5#, fuzzy
6msgid ""
7msgstr ""
8"Project-Id-Version: elementary\n"
9"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
10"POT-Creation-Date: 2011-01-31 15:28+0200\n"
11"PO-Revision-Date: 2010-12-26 10:05+0200\n"
12"Last-Translator: Tom Hacohen <tom.hacohen@partner.samsung.com>\n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16
17#: src/lib/elm_config.c:1537
18msgid "default:LTR"
19msgstr "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 @@
1# Elementary translation file for Left To Right languages.
2# This file is distributed under the same license as the Elementary package.
3# FIRST AUTHOR <tom.hacohen@partner.samsung.com>, 2010.
4#
5#, fuzzy
6msgid ""
7msgstr ""
8"Project-Id-Version: elementary\n"
9"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
10"POT-Creation-Date: 2011-01-31 15:28+0200\n"
11"PO-Revision-Date: 2010-12-26 10:05+0200\n"
12"Last-Translator: Tom Hacohen <tom.hacohen@partner.samsung.com>\n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16
17#: src/lib/elm_config.c:1537
18msgid "default:LTR"
19msgstr "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 @@
1# Elementary translation file for Left To Right languages.
2# This file is distributed under the same license as the Elementary package.
3# FIRST AUTHOR <tom.hacohen@partner.samsung.com>, 2010.
4#
5#, fuzzy
6msgid ""
7msgstr ""
8"Project-Id-Version: elementary\n"
9"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
10"POT-Creation-Date: 2011-01-31 15:28+0200\n"
11"PO-Revision-Date: 2010-12-26 10:05+0200\n"
12"Last-Translator: Tom Hacohen <tom.hacohen@partner.samsung.com>\n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16
17#: src/lib/elm_config.c:1537
18msgid "default:LTR"
19msgstr "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" {
276 EAPI const char *elm_object_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); 276 EAPI const char *elm_object_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
277 EAPI void elm_object_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1); 277 EAPI void elm_object_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1);
278 EAPI Eina_Bool elm_object_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); 278 EAPI Eina_Bool elm_object_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
279 EAPI Eina_Bool elm_widget_mirrored_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
280 EAPI void elm_widget_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) EINA_ARG_NONNULL(1);
279 281
280 EAPI Eina_Bool elm_object_widget_check(const Evas_Object *obj) EINA_ARG_NONNULL(1); 282 EAPI Eina_Bool elm_object_widget_check(const Evas_Object *obj) EINA_ARG_NONNULL(1);
281 EAPI Evas_Object *elm_object_parent_widget_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); 283 EAPI Evas_Object *elm_object_parent_widget_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
@@ -286,6 +288,9 @@ extern "C" {
286 EAPI void elm_scale_set(double scale); 288 EAPI void elm_scale_set(double scale);
287 EAPI void elm_scale_all_set(double scale); 289 EAPI void elm_scale_all_set(double scale);
288 290
291 EAPI Eina_Bool elm_mirrored_get(void);
292 EAPI void elm_mirrored_set(Eina_Bool mirrored);
293
289 EAPI Eina_Bool elm_config_save(void); 294 EAPI Eina_Bool elm_config_save(void);
290 EAPI void elm_config_reload(void); 295 EAPI void elm_config_reload(void);
291 296
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 = \
9-I$(top_srcdir)/src/lib \ 9-I$(top_srcdir)/src/lib \
10-I$(top_builddir)/src/lib \ 10-I$(top_builddir)/src/lib \
11-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ 11-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
12-DLOCALE_DIR=\"@LOCALE_DIR@\" \
12-DPACKAGE_LIB_DIR=\"$(libdir)\" \ 13-DPACKAGE_LIB_DIR=\"$(libdir)\" \
13@ELEMENTARY_CFLAGS@ \ 14@ELEMENTARY_CFLAGS@ \
14@ELEMENTARY_X_CFLAGS@ \ 15@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 @@
9#include <Elementary.h> 9#include <Elementary.h>
10#include "elm_priv.h" 10#include "elm_priv.h"
11 11
12#define _(string) gettext(string)
13
12Elm_Config *_elm_config = NULL; 14Elm_Config *_elm_config = NULL;
13char *_elm_profile = NULL; 15char *_elm_profile = NULL;
14static Eet_Data_Descriptor *_config_edd = NULL; 16static Eet_Data_Descriptor *_config_edd = NULL;
@@ -1131,6 +1133,7 @@ _config_load(void)
1131 _elm_config->fps = 60.0; 1133 _elm_config->fps = 60.0;
1132 _elm_config->theme = eina_stringshare_add("default"); 1134 _elm_config->theme = eina_stringshare_add("default");
1133 _elm_config->modules = NULL; 1135 _elm_config->modules = NULL;
1136 _elm_config->is_mirrored = EINA_FALSE; /* Read sys value in env_get() */
1134 _elm_config->tooltip_delay = 1.0; 1137 _elm_config->tooltip_delay = 1.0;
1135 _elm_config->cursor_engine_only = EINA_TRUE; 1138 _elm_config->cursor_engine_only = EINA_TRUE;
1136 _elm_config->focus_highlight_enable = EINA_FALSE; 1139 _elm_config->focus_highlight_enable = EINA_FALSE;
@@ -1529,6 +1532,12 @@ _env_get(void)
1529 s = getenv("ELM_MODULES"); 1532 s = getenv("ELM_MODULES");
1530 if (s) eina_stringshare_replace(&_elm_config->modules, s); 1533 if (s) eina_stringshare_replace(&_elm_config->modules, s);
1531 1534
1535 /* Get RTL orientation from system */
1536 setlocale(LC_ALL, "");
1537 bindtextdomain("elementary", LOCALE_DIR);
1538 textdomain("elementary");
1539 _elm_config->is_mirrored = !strcmp(_("default:LTR"), "default:RTL");
1540
1532 s = getenv("ELM_TOOLTIP_DELAY"); 1541 s = getenv("ELM_TOOLTIP_DELAY");
1533 if (s) 1542 if (s)
1534 { 1543 {
@@ -1567,6 +1576,31 @@ _env_get(void)
1567 if (s) _elm_config->effect_enable = !!atoi(s); 1576 if (s) _elm_config->effect_enable = !!atoi(s);
1568} 1577}
1569 1578
1579/**
1580 * Get the system mirrored mode. This determines the default mirrored mode
1581 * of widgets.
1582 *
1583 * @return EINA_TRUE if mirrored is set, EINA_FALSE otherwise
1584 */
1585EAPI Eina_Bool
1586elm_mirrored_get(void)
1587{
1588 return _elm_config->is_mirrored;
1589}
1590
1591/**
1592 * Set the system mirrored mode. This determines the default mirrored mode
1593 * of widgets.
1594 *
1595 * @param mirrored EINA_TRUE to set mirrored mode, EINA_FALSE to unset it.
1596 */
1597EAPI void
1598elm_mirrored_set(Eina_Bool mirrored)
1599{
1600 /* TODO: Should update all interface */
1601 _elm_config->is_mirrored = mirrored;
1602}
1603
1570void 1604void
1571_elm_config_init(void) 1605_elm_config_init(void)
1572{ 1606{
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
111 Eina_Bool inwin_dialogs_enable; 111 Eina_Bool inwin_dialogs_enable;
112 int icon_size; 112 int icon_size;
113 double longpress_timeout; 113 double longpress_timeout;
114 Eina_Bool is_mirrored : 1;
114 Eina_Bool effect_enable; 115 Eina_Bool effect_enable;
115}; 116};
116 117
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
76 Eina_Bool highlight_ignore : 1; 76 Eina_Bool highlight_ignore : 1;
77 Eina_Bool highlight_in_theme : 1; 77 Eina_Bool highlight_in_theme : 1;
78 Eina_Bool disabled : 1; 78 Eina_Bool disabled : 1;
79 Eina_Bool is_mirrored : 1;
79 80
80 Eina_List *focus_chain; 81 Eina_List *focus_chain;
81 Eina_List *event_cb; 82 Eina_List *event_cb;
@@ -374,8 +375,11 @@ elm_widget_api_check(int ver)
374EAPI Evas_Object * 375EAPI Evas_Object *
375elm_widget_add(Evas *evas) 376elm_widget_add(Evas *evas)
376{ 377{
378 Evas_Object *obj;
377 _smart_init(); 379 _smart_init();
378 return evas_object_smart_add(evas, _e_smart); 380 obj = evas_object_smart_add(evas, _e_smart);
381 elm_widget_mirrored_set(obj, elm_mirrored_get());
382 return obj;
379} 383}
380 384
381EAPI void 385EAPI void
@@ -527,6 +531,37 @@ elm_widget_focus_next_hook_set(Evas_Object *obj, Eina_Bool (*func) (const Evas_O
527 sd->focus_next_func = func; 531 sd->focus_next_func = func;
528} 532}
529 533
534/**
535 * Returns the widget's mirrored mode.
536 *
537 * @param obj The widget.
538 * @return mirrored mode of the object.
539 *
540 **/
541EAPI Eina_Bool
542elm_widget_mirrored_get(const Evas_Object *obj)
543{
544 API_ENTRY return EINA_FALSE;
545 return sd->is_mirrored;
546}
547
548/**
549 * Sets the widget's mirrored mode.
550 *
551 * @param obj The widget.
552 * @param mirrored EINA_TRUE to set mirrored mode. EINA_FALSE to unset.
553 */
554EAPI void
555elm_widget_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
556{
557 API_ENTRY return;
558 if (sd->is_mirrored != mirrored)
559 {
560 sd->is_mirrored = mirrored;
561 elm_widget_theme(obj);
562 }
563}
564
530EAPI void 565EAPI void
531elm_widget_on_focus_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data) 566elm_widget_on_focus_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data)
532{ 567{
@@ -615,6 +650,7 @@ elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj)
615 API_ENTRY return; 650 API_ENTRY return;
616 double scale, pscale = elm_widget_scale_get(sobj); 651 double scale, pscale = elm_widget_scale_get(sobj);
617 Elm_Theme *th, *pth = elm_widget_theme_get(sobj); 652 Elm_Theme *th, *pth = elm_widget_theme_get(sobj);
653 Eina_Bool mirrored, pmirrored = elm_widget_mirrored_get(obj);
618 654
619 if (_elm_widget_is(sobj)) 655 if (_elm_widget_is(sobj))
620 { 656 {
@@ -646,7 +682,8 @@ elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj)
646 evas_object_smart_callback_call(obj, "sub-object-add", sobj); 682 evas_object_smart_callback_call(obj, "sub-object-add", sobj);
647 scale = elm_widget_scale_get(sobj); 683 scale = elm_widget_scale_get(sobj);
648 th = elm_widget_theme_get(sobj); 684 th = elm_widget_theme_get(sobj);
649 if ((scale != pscale) || (th != pth)) elm_widget_theme(sobj); 685 mirrored = elm_widget_mirrored_get(sobj);
686 if ((scale != pscale) || (th != pth) || (pmirrored != mirrored)) elm_widget_theme(sobj);
650 if (elm_widget_focus_get(sobj)) _focus_parents(obj); 687 if (elm_widget_focus_get(sobj)) _focus_parents(obj);
651} 688}
652 689
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);
279EAPI double elm_widget_scale_get(const Evas_Object *obj); 279EAPI double elm_widget_scale_get(const Evas_Object *obj);
280EAPI void elm_widget_theme_set(Evas_Object *obj, Elm_Theme *th); 280EAPI void elm_widget_theme_set(Evas_Object *obj, Elm_Theme *th);
281EAPI Elm_Theme *elm_widget_theme_get(const Evas_Object *obj); 281EAPI Elm_Theme *elm_widget_theme_get(const Evas_Object *obj);
282EAPI Eina_Bool elm_widget_mirrored_get(const Evas_Object *obj);
283EAPI void elm_widget_mirrored_set(Evas_Object *obj, Eina_Bool mirrored);
282EAPI void elm_widget_style_set(Evas_Object *obj, const char *style); 284EAPI void elm_widget_style_set(Evas_Object *obj, const char *style);
283EAPI const char *elm_widget_style_get(const Evas_Object *obj); 285EAPI const char *elm_widget_style_get(const Evas_Object *obj);
284EAPI void elm_widget_type_set(Evas_Object *obj, const char *type); 286EAPI void elm_widget_type_set(Evas_Object *obj, const char *type);