elm fileselector - make ok/cancel in selector configurable per os

so the theme build can order ok/cancel based on preference for an os,
so make configure have an option for this and build the theme
specifically based on that option. enable the option if you want mac
style cancel, ok or default ok, cancel as is common elsewhere.

  --enable-cancel-ok

is the option

@feature
This commit is contained in:
Carsten Haitzler 2016-06-02 18:37:06 +09:00
parent 80d0e4cb08
commit aec0cb9a67
3 changed files with 29 additions and 1 deletions

View File

@ -5516,6 +5516,17 @@ AC_SUBST([ELEMENTARYJS_CXXFLAGS])
EFL_LIB_END_OPTIONAL([ELEMENTARY_JS])
#### End of Efl_Js
ELM_EDJE_DEFINES=""
AC_ARG_ENABLE([cancel-ok],
[AS_HELP_STRING([--enable-cancel-ok],[Enable ordering of cancel and ok buttons to be cancel first, then ok instead of ok then cancel. @<:@default=disabled@:>@])],
[
if test "x${enableval}" = "xyes" ; then
ELM_EDJE_DEFINES="$ELM_EDJE_DEFINES -DELM_CANCEL_OK=1"
fi
],[])
AC_SUBST(ELM_EDJE_DEFINES)
## Disable warning for OS that have a specifc configuration
case "$host_os" in
mingw*|cygwin*)

View File

@ -1,4 +1,5 @@
EDJE_CC_ELM_FLAGS = \
@ELM_EDJE_DEFINES@ \
-id $(top_srcdir)/data/elementary/themes/img \
-id $(top_srcdir)/data/elementary/themes/fdo \
-fd $(top_srcdir)/data/elementary/themes/fnt \

View File

@ -54,8 +54,12 @@ group { name: "elm/fileselector/base/default";
}
}
}
#ifdef ELM_CANCEL_OK
swallow { "elm.swallow.ok";
description { state: "default" 0.0;
#else
swallow { "elm.swallow.cancel";
#endif
desc { "default";
align: 1.0 1.0;
fixed: 1 1;
rel1.relative: 1.0 1.0;
@ -64,17 +68,29 @@ group { name: "elm/fileselector/base/default";
rel2.offset: -4 -4;
}
}
#ifdef ELM_CANCEL_OK
swallow { "elm.swallow.cancel";
#else
swallow { "elm.swallow.ok";
#endif
desc { "default";
align: 1.0 0.5;
fixed: 1 0;
rel1 {
#ifdef ELM_CANCEL_OK
to: "elm.swallow.ok";
#else
to: "elm.swallow.cancel";
#endif
relative: 0.0 0.0;
offset: -4 0;
}
rel2 {
#ifdef ELM_CANCEL_OK
to: "elm.swallow.ok";
#else
to: "elm.swallow.cancel";
#endif
relative: 0.0 1.0;
offset: -4 -1;
}