Sohyun Kim <anna1014.kim@samsung.com> <sohyun.anna@gmail.com>
Jihoon Kim <jihoon48.kim@samsung.com>
Jeonghyun Yun (arosis) <jh0506.yun@samsung.com>
+Tom Hacohen <tom@stosb.com>
+Aharon Hillel <a.hillel@partner.samsung.com>
SUBDIRS = src data config doc
+if HAVE_PO
+
+SUBDIRS += po
+
+endif
+
ACLOCAL_AMFLAGS = -I m4
MAINTAINERCLEANFILES = \
+ABOUT-NLS \
Makefile.in \
aclocal.m4 \
config.guess \
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 = \
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
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
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"
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
config/default/Makefile
config/standard/Makefile
config/illume/Makefile
+$po_makefile_in
])
#####################################################################
--- /dev/null
+2010-12-26 gettextize <bug-gnu-gettext@gnu.org>
+
+ * 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.
+
--- /dev/null
+ar az_IR fa he ps ur yi
--- /dev/null
+# 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 =
--- /dev/null
+src/lib/elm_config.c
--- /dev/null
+# Elementary translation file for Left To Right languages.
+# This file is distributed under the same license as the Elementary package.
+# FIRST AUTHOR <tom.hacohen@partner.samsung.com>, 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 <tom.hacohen@partner.samsung.com>\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"
--- /dev/null
+# Elementary translation file for Left To Right languages.
+# This file is distributed under the same license as the Elementary package.
+# FIRST AUTHOR <tom.hacohen@partner.samsung.com>, 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 <tom.hacohen@partner.samsung.com>\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"
--- /dev/null
+# Elementary translation file for Left To Right languages.
+# This file is distributed under the same license as the Elementary package.
+# FIRST AUTHOR <tom.hacohen@partner.samsung.com>, 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 <tom.hacohen@partner.samsung.com>\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"
--- /dev/null
+# Elementary translation file for Left To Right languages.
+# This file is distributed under the same license as the Elementary package.
+# FIRST AUTHOR <a.hillel@partner.samsung.com>, 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 <a.hillel@partner.samsung.com>\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"
--- /dev/null
+# Elementary translation file for Left To Right languages.
+# This file is distributed under the same license as the Elementary package.
+# FIRST AUTHOR <tom.hacohen@partner.samsung.com>, 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 <tom.hacohen@partner.samsung.com>\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"
--- /dev/null
+# Elementary translation file for Left To Right languages.
+# This file is distributed under the same license as the Elementary package.
+# FIRST AUTHOR <tom.hacohen@partner.samsung.com>, 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 <tom.hacohen@partner.samsung.com>\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"
--- /dev/null
+# Elementary translation file for Left To Right languages.
+# This file is distributed under the same license as the Elementary package.
+# FIRST AUTHOR <tom.hacohen@partner.samsung.com>, 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 <tom.hacohen@partner.samsung.com>\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"
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);
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);
-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@ \
#include <Elementary.h>
#include "elm_priv.h"
+#define _(string) gettext(string)
+
Elm_Config *_elm_config = NULL;
char *_elm_profile = NULL;
static Eet_Data_Descriptor *_config_edd = NULL;
_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;
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)
{
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)
{
Eina_Bool inwin_dialogs_enable;
int icon_size;
double longpress_timeout;
+ Eina_Bool is_mirrored : 1;
Eina_Bool effect_enable;
};
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;
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
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)
{
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))
{
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);
}
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);