diff --git a/legacy/elementary/Makefile.am b/legacy/elementary/Makefile.am
index 01507a823f..0c097d6164 100644
--- a/legacy/elementary/Makefile.am
+++ b/legacy/elementary/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = src data doc
+SUBDIRS = src data config doc
ACLOCAL_AMFLAGS = -I m4
diff --git a/legacy/elementary/config/Makefile.am b/legacy/elementary/config/Makefile.am
new file mode 100644
index 0000000000..cf5213394a
--- /dev/null
+++ b/legacy/elementary/config/Makefile.am
@@ -0,0 +1,19 @@
+MAINTAINERCLEANFILES = Makefile.in
+SUBDIRS = default standard illume
+
+EET_EET = @eet_eet@
+
+EXTRA_DIST = profile.src
+
+filesdir = $(datadir)/elementary/config
+
+files_DATA = profile.cfg
+
+%.cfg: %.src
+ $(EET_EET) -i \
+ $(top_builddir)/config/$@ config \
+ $< 0
+
+clean-local:
+ rm -rf *.cfg *~
+
diff --git a/legacy/elementary/config/default/Makefile.am b/legacy/elementary/config/default/Makefile.am
new file mode 100644
index 0000000000..ba2bc9666a
--- /dev/null
+++ b/legacy/elementary/config/default/Makefile.am
@@ -0,0 +1,23 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+EET_EET = @eet_eet@
+
+EXTRA_DIST = \
+ profile.desktop \
+ icon.png \
+ base.src
+
+filesdir = $(datadir)/elementary/config/default
+files_DATA = \
+ profile.desktop \
+ icon.png \
+ base.cfg
+
+%.cfg: %.src
+ $(EET_EET) -e \
+ $(top_builddir)/config/default/$@ config \
+ $< 1
+
+clean-local:
+ rm -rf *.cfg *~
+
diff --git a/legacy/elementary/config/default/base.src b/legacy/elementary/config/default/base.src
new file mode 100644
index 0000000000..9cd5c20160
--- /dev/null
+++ b/legacy/elementary/config/default/base.src
@@ -0,0 +1,22 @@
+group "Elm_Config" struct {
+ value "engine" int: 0;
+ value "thumbscroll_enable" int: 1;
+ value "thumbscroll_threshhold" int: 24;
+ value "thumbscroll_momentum_threshhold" double: 100.0;
+ value "thumbscroll_friction" double: 1.0;
+ value "thumbscroll_bounce_friction" double: 0.5;
+ value "page_scroll_friction" double: 0.5;
+ value "bring_in_scroll_friction" double: 0.5;
+ value "zoom_friction" double: 0.5;
+ value "thumbscroll_bounce_enable" int: 1;
+ value "scale" double: 1.0;
+ value "bgpixmap" int: 0;
+ value "compositing" int: 1;
+ value "font_hinting" int: 2;
+ value "image_cache" int: 4096;
+ value "font_cache" int: 512;
+ value "finger_size" int: 40;
+ value "fps" double: 60.0;
+ value "theme" string: "default";
+ value "modules" string: "";
+}
diff --git a/legacy/elementary/config/default/icon.png b/legacy/elementary/config/default/icon.png
new file mode 100644
index 0000000000..9c08ee2a58
Binary files /dev/null and b/legacy/elementary/config/default/icon.png differ
diff --git a/legacy/elementary/config/default/profile.desktop b/legacy/elementary/config/default/profile.desktop
new file mode 100644
index 0000000000..e02dc43300
--- /dev/null
+++ b/legacy/elementary/config/default/profile.desktop
@@ -0,0 +1,19 @@
+[Desktop Entry]
+Type=Link
+Name=Default
+Name[cs]=Výchozí
+Name[it]=Predefinito
+Name[hu]=Alapértelmezett
+Name[fr]=Prédéfini
+Name[el]=Προκαθορισμένο
+Name[eo]=Pravaloroj
+Name[zh_CN]=默认
+Icon=icon.png
+Comment=Select this to begin
the initial setup again.
+Comment[cs]=Vyberte pro znovuspuštění
tohoto průvodce.
+Comment[it]=Selezionare questo per
riprendere la
configurazione iniziale.
+Comment[hu]=Válaszd ezt az alap
beállítáok megismétléséhez.
+Comment[fr]=Sélectionnez ceci pour recommencer
la configuration initiale.
+Comment[el]=Επέλεξε αυτό για να
ξεκινήσεις την αρχική ρύθμιση ξανά.
+Comment[eo]=Elektu tion por restartigi
la pravalorizan agordon.
+Comment[zh_CN]=点击这里重新进行初始化设置主题。
diff --git a/legacy/elementary/config/illume/Makefile.am b/legacy/elementary/config/illume/Makefile.am
new file mode 100644
index 0000000000..fa13056090
--- /dev/null
+++ b/legacy/elementary/config/illume/Makefile.am
@@ -0,0 +1,23 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+EET_EET = @eet_eet@
+
+EXTRA_DIST = \
+ profile.desktop \
+ icon.png \
+ base.src
+
+filesdir = $(datadir)/elementary/config/illume
+files_DATA = \
+ profile.desktop \
+ icon.png \
+ base.cfg
+
+%.cfg: %.src
+ $(EET_EET) -e \
+ $(top_builddir)/config/illume/$@ config \
+ $< 1
+
+clean-local:
+ rm -rf *.cfg *~
+
diff --git a/legacy/elementary/config/illume/base.src b/legacy/elementary/config/illume/base.src
new file mode 100644
index 0000000000..9cd5c20160
--- /dev/null
+++ b/legacy/elementary/config/illume/base.src
@@ -0,0 +1,22 @@
+group "Elm_Config" struct {
+ value "engine" int: 0;
+ value "thumbscroll_enable" int: 1;
+ value "thumbscroll_threshhold" int: 24;
+ value "thumbscroll_momentum_threshhold" double: 100.0;
+ value "thumbscroll_friction" double: 1.0;
+ value "thumbscroll_bounce_friction" double: 0.5;
+ value "page_scroll_friction" double: 0.5;
+ value "bring_in_scroll_friction" double: 0.5;
+ value "zoom_friction" double: 0.5;
+ value "thumbscroll_bounce_enable" int: 1;
+ value "scale" double: 1.0;
+ value "bgpixmap" int: 0;
+ value "compositing" int: 1;
+ value "font_hinting" int: 2;
+ value "image_cache" int: 4096;
+ value "font_cache" int: 512;
+ value "finger_size" int: 40;
+ value "fps" double: 60.0;
+ value "theme" string: "default";
+ value "modules" string: "";
+}
diff --git a/legacy/elementary/config/illume/icon.png b/legacy/elementary/config/illume/icon.png
new file mode 100644
index 0000000000..9e0ed3dac8
Binary files /dev/null and b/legacy/elementary/config/illume/icon.png differ
diff --git a/legacy/elementary/config/illume/profile.desktop b/legacy/elementary/config/illume/profile.desktop
new file mode 100644
index 0000000000..34308f68a7
--- /dev/null
+++ b/legacy/elementary/config/illume/profile.desktop
@@ -0,0 +1,16 @@
+[Desktop Entry]
+Type=Link
+Name=Illume
+Name[fr]=Illume
+Name[el]=Illume
+Name[eo]=Illume
+Name[zh_CN]=Illume
+Icon=icon.png
+Comment=Illume profile for
embedded systems like
phones and web
tablets with tiny
touchscreen displays.
Only use this if
you really have
such a device.
+Comment[cs]=Illume profil pro
přenosná zařízení
jako telefony
a webové tablety
s malými dotykovými displeji.
Použijte jen pokud
opravdu máte
takové zařízení.
+Comment[it]=Profilo Illume per
sistemi embedded come
cellulari e webpad
con piccoli display
touchscreen.
Usatelo solo se
avete realmente un
dispositivo simile.
+Comment[hu]=Illume profil
telefonokhoz, érintőképernyőkhöz.
Csak akkor használd ezt,
ha valóban ilyen eszközöd van.
+Comment[fr]=Profil Illume pour les systèmes
embarqués comme les téléphones
et tablettes internet pourvus
d'un petit écran tactile.
À n'utiliser que si
vous disposez réellement
d'un tel matériel.
+Comment[el]=Το προφίλ Illume είναι
για μικροσυσκευές όπως
κινητά τηλέφωνα ή internet
tablets με μικρές οθόνες αφής.
Επιλέξτε μόνο αν έχετε τέτοια
συσκευή.
+Comment[eo]=Profilo Illume por la
enkorpigitaj sistemoj
kiel la telefonoj kaj
ttt-tabletoj kun etaj
tuŝekranoj. Nur uzu
tiun se vi vere havas
tian aparaton.
+Comment[zh_CN]=为带有小型触屏的嵌入式系统如手机和上网本设计的 Illume 设置主题。
diff --git a/legacy/elementary/config/profile.src b/legacy/elementary/config/profile.src
new file mode 100644
index 0000000000..331d858ce9
--- /dev/null
+++ b/legacy/elementary/config/profile.src
@@ -0,0 +1 @@
+default
\ No newline at end of file
diff --git a/legacy/elementary/config/standard/Makefile.am b/legacy/elementary/config/standard/Makefile.am
new file mode 100644
index 0000000000..88cae80e0b
--- /dev/null
+++ b/legacy/elementary/config/standard/Makefile.am
@@ -0,0 +1,23 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+EET_EET = @eet_eet@
+
+EXTRA_DIST = \
+ profile.desktop \
+ icon.png \
+ base.src
+
+filesdir = $(datadir)/elementary/config/standard
+files_DATA = \
+ profile.desktop \
+ icon.png \
+ base.cfg
+
+%.cfg: %.src
+ $(EET_EET) -e \
+ $(top_builddir)/config/standard/$@ config \
+ $< 1
+
+clean-local:
+ rm -rf *.cfg *~
+
diff --git a/legacy/elementary/config/standard/base.src b/legacy/elementary/config/standard/base.src
new file mode 100644
index 0000000000..4df5eda966
--- /dev/null
+++ b/legacy/elementary/config/standard/base.src
@@ -0,0 +1,22 @@
+group "Elm_Config" struct {
+ value "engine" int: 0;
+ value "thumbscroll_enable" int: 1;
+ value "thumbscroll_threshhold" int: 4;
+ value "thumbscroll_momentum_threshhold" double: 100.0;
+ value "thumbscroll_friction" double: 1.0;
+ value "thumbscroll_bounce_friction" double: 0.5;
+ value "page_scroll_friction" double: 0.5;
+ value "bring_in_scroll_friction" double: 0.5;
+ value "zoom_friction" double: 0.5;
+ value "thumbscroll_bounce_enable" int: 1;
+ value "scale" double: 1.0;
+ value "bgpixmap" int: 0;
+ value "compositing" int: 1;
+ value "font_hinting" int: 2;
+ value "image_cache" int: 4096;
+ value "font_cache" int: 512;
+ value "finger_size" int: 5;
+ value "fps" double: 60.0;
+ value "theme" string: "default";
+ value "modules" string: "";
+}
diff --git a/legacy/elementary/config/standard/icon.png b/legacy/elementary/config/standard/icon.png
new file mode 100644
index 0000000000..90b57af47d
Binary files /dev/null and b/legacy/elementary/config/standard/icon.png differ
diff --git a/legacy/elementary/config/standard/profile.desktop b/legacy/elementary/config/standard/profile.desktop
new file mode 100644
index 0000000000..7c9ed30fe7
--- /dev/null
+++ b/legacy/elementary/config/standard/profile.desktop
@@ -0,0 +1,18 @@
+[Desktop Entry]
+Type=Link
+Name=Standard
+Name[cs]=Standartní
+Name[hu]=Általános
+Name[fr]=Standard
+Name[el]=Κανονικό
+Name[eo]=Kutima
+Name[zh_CN]=标准
+Icon=icon.png
+Comment=This is the standard
profile that is
universal for most
desktop and laptop
systems. Choose this
if you are not
sure what to choose.
+Comment[cs]=Toto je standartní
univerzální
profil pro většinu
stolních a přenosných
počítačů. Vyberte pokud
si nejste jisti
co vybrat.
+Comment[it]=Questo è il profilo
standard, universale
per la maggior
parte dei sistemi
desktop e portatili.
Scegliete questo se
non siete sicuri di
cosa scegliere.
+Comment[hu]=Ez az általános,
alap beállítás,
amely megfelelő a
legtöbb laptop és
asztali gép számára.
+Comment[fr]=C'est le profil standard
adapté à la quasi totalité
des systèmes de bureau
et ordinateurs portables.
Choisissez ce profil si
vous n'êtes pas sûr.
+Comment[el]=Αυτό είναι το κανονικό
προφίλ που είναι κοινό
για τα περισσότερα συστήματα. Επιλέξτε αυτό
αν δεν είστε σίγουροι για
την επιλογή σας.
+Comment[eo]=Tio estas la kutima profilo
taŭga por preskaŭ ĉiuj
oficejaj sistemoj kaj
porteblaj sistemoj.
Elektu ĝin se vi ne certas.
+Comment[zh_CN]=适用于大多数台式机和笔记本的设置主题,如果您不清楚如何选择则请使用这个。
diff --git a/legacy/elementary/configure.ac b/legacy/elementary/configure.ac
index eb2bd402ee..8196567a94 100644
--- a/legacy/elementary/configure.ac
+++ b/legacy/elementary/configure.ac
@@ -131,7 +131,7 @@ AM_CONDITIONAL([ELEMENTARY_WINDOWS_BUILD], [test "x${have_windows}" = "xyes"])
PKG_CHECK_MODULES([ELEMENTARY],
[
eina-0 >= 0.0.1
- eet >= 1.1.0
+ eet >= 1.2.3
evas >= 0.9.9
ecore >= 0.9.9
ecore-evas >= 0.9.9
@@ -142,6 +142,17 @@ PKG_CHECK_MODULES([ELEMENTARY],
]
)
+AC_ARG_WITH(eet-eet,
+[ --with-eet-eet=PATH specify a specific path to eet utility],
+[
+ v=$withval;
+ eet_eet=$v
+ echo " Elementary eet explicitly set to "$eet_eet;
+],[
+ eet_eet=$(pkg-config --variable=prefix eet)/bin/eet
+])
+AC_SUBST(eet_eet)
+
requirement_elm="edje ecore-file ecore-txt ecore-job ecore-evas ecore evas eet eina-0 ${requirement_elm}"
have_elementary_x="no"
@@ -292,6 +303,10 @@ data/themes/Makefile
data/images/Makefile
data/objects/Makefile
data/desktop/Makefile
+config/Makefile
+config/default/Makefile
+config/standard/Makefile
+config/illume/Makefile
])
#####################################################################
diff --git a/legacy/elementary/src/lib/elm_main.c b/legacy/elementary/src/lib/elm_main.c
index e13b17c2a1..8558744c5f 100644
--- a/legacy/elementary/src/lib/elm_main.c
+++ b/legacy/elementary/src/lib/elm_main.c
@@ -329,8 +329,14 @@ _elm_window_property_change(void *data, int ev_type, void *ev)
val = ecore_x_window_prop_string_get(event->win,
event->atom);
+ if (_elm_config->theme)
+ {
+ eina_stringshare_del(_elm_config->theme);
+ _elm_config->theme = NULL;
+ }
if (val)
{
+ _elm_config->theme = eina_stringshare_add(val);
_elm_theme_parse(val);
free(val);
_elm_rescale();
@@ -459,7 +465,7 @@ elm_quicklaunch_init(int argc, char **argv)
{
int i;
char buf[PATH_MAX], *s;
-
+
eina_init();
_elm_log_dom = eina_log_domain_register("elementary", EINA_COLOR_LIGHTBLUE);
if (!_elm_log_dom)
@@ -549,35 +555,151 @@ elm_quicklaunch_init(int argc, char **argv)
#endif
if (!_elm_data_dir)
_elm_data_dir = eina_stringshare_add(PACKAGE_DATA_DIR);
- if (!_elm_data_dir)
+ if (!_elm_data_dir)
_elm_data_dir = eina_stringshare_add("/");
if (!_elm_lib_dir)
_elm_lib_dir = eina_stringshare_add(PACKAGE_LIB_DIR);
if (!_elm_lib_dir)
_elm_lib_dir = eina_stringshare_add("/");
- // FIXME: actually load config from file - use eet. also for X properties,
- // reduce to single x property with eet data encoded in it.
- _elm_config = ELM_NEW(Elm_Config);
- _elm_config->engine = ELM_SOFTWARE_X11;
- _elm_config->thumbscroll_enable = 1;
- _elm_config->thumbscroll_threshhold = 24;
- _elm_config->thumbscroll_momentum_threshhold = 100.0;
- _elm_config->thumbscroll_friction = 1.0;
- _elm_config->thumbscroll_bounce_friction = 0.5;
- _elm_config->thumbscroll_bounce_enable = 1;
- _elm_config->page_scroll_friction = 0.5;
- _elm_config->bring_in_scroll_friction = 0.5;
- _elm_config->zoom_friction = 0.5;
- _elm_config->scale = 1.0;
- _elm_config->font_hinting = 2;
- _elm_config->font_dirs = NULL;
- _elm_config->image_cache = 4096;
- _elm_config->font_cache = 512;
- _elm_config->finger_size = 40;
- _elm_config->bgpixmap = 0;
- _elm_config->compositing = 1;
- _elm_config->fps = 60.0;
+
+ // yes - this should be a function. do it later
+ {
+ Eet_Data_Descriptor_Class eddc;
+ Eet_Data_Descriptor *edd = NULL;
+ Eet_File *ef = NULL;
+ int len = 0;
+ char buf[PATH_MAX], *p;
+ const char *home = NULL;
+ char *profile = strdup("default");
+
+ EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Elm_Config);
+
+ eddc.func.str_direct_alloc = NULL;
+ eddc.func.str_direct_free = NULL;
+
+ edd = eet_data_descriptor_file_new(&eddc);
+ if (edd)
+ {
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "engine", engine, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "thumbscroll_enable", thumbscroll_enable, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "thumbscroll_threshhold", thumbscroll_threshhold, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "thumbscroll_momentum_threshhold", thumbscroll_momentum_threshhold, EET_T_DOUBLE);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "thumbscroll_friction", thumbscroll_friction, EET_T_DOUBLE);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "thumbscroll_bounce_friction", thumbscroll_bounce_friction, EET_T_DOUBLE);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "page_scroll_friction", page_scroll_friction, EET_T_DOUBLE);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "bring_in_scroll_friction", bring_in_scroll_friction, EET_T_DOUBLE);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "zoom_friction", zoom_friction, EET_T_DOUBLE);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "thumbscroll_bounce_enable", thumbscroll_bounce_enable, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "scale", scale, EET_T_DOUBLE);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "bgpixmap", bgpixmap, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "compositing", compositing, EET_T_INT);
+ // EET_DATA_DESCRIPTOR_ADD_LIST(edd, Elm_Config, "font_dirs", font_dirs, sub_edd);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "font_hinting", font_hinting, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "image_cache", image_cache, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "font_cache", font_cache, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "finger_size", finger_size, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "fps", fps, EET_T_DOUBLE);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "theme", theme, EET_T_STRING);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "modules", modules, EET_T_STRING);
+ }
+ else
+ {
+ printf("EEEK! eet_data_descriptor_file_new() failed\n");
+ }
+
+ home = getenv("HOME");
+ if (!home) home = "/";
+
+ snprintf(buf, sizeof(buf), "%s/.elementary/config/profile.cfg", home);
+ ef = eet_open(buf, EET_FILE_MODE_READ);
+ if (ef)
+ {
+ p = eet_read(ef, "config", &len);
+ if (p)
+ {
+ free(profile);
+ profile = malloc(len + 1);
+ memcpy(profile, p, len);
+ profile[len] = 0;
+ free(p);
+ }
+ eet_close(ef);
+ if (!p) ef = NULL;
+ }
+ if (!ef)
+ {
+ snprintf(buf, sizeof(buf), "%s/config/profile.cfg", _elm_data_dir);
+ ef = eet_open(buf, EET_FILE_MODE_READ);
+ if (ef)
+ {
+ p = eet_read(ef, "config", &len);
+ if (p)
+ {
+ free(profile);
+ profile = malloc(len + 1);
+ memcpy(profile, p, len);
+ profile[len] = 0;
+ free(p);
+ }
+ eet_close(ef);
+ }
+ }
+
+ s = getenv("ELM_PROFILE");
+ if (s)
+ {
+ free(profile);
+ profile = strdup(s);
+ }
+
+ snprintf(buf, sizeof(buf), "%s/.elementary/config/%s/base.cfg", home, profile);
+ ef = eet_open(buf, EET_FILE_MODE_READ);
+ if (ef)
+ {
+ _elm_config = eet_data_read(ef, edd, "config");
+ eet_close(ef);
+ }
+ if (!_elm_config)
+ {
+ snprintf(buf, sizeof(buf), "%s/config/%s/base.cfg", _elm_data_dir, profile);
+ ef = eet_open(buf, EET_FILE_MODE_READ);
+ if (ef)
+ {
+ _elm_config = eet_data_read(ef, edd, "config");
+ eet_close(ef);
+ }
+ }
+
+ if (edd) eet_data_descriptor_free(edd);
+ if (profile) free(profile);
+ }
+
+ if (!_elm_config)
+ {
+ _elm_config = ELM_NEW(Elm_Config);
+ _elm_config->engine = ELM_SOFTWARE_X11;
+ _elm_config->thumbscroll_enable = 1;
+ _elm_config->thumbscroll_threshhold = 24;
+ _elm_config->thumbscroll_momentum_threshhold = 100.0;
+ _elm_config->thumbscroll_friction = 1.0;
+ _elm_config->thumbscroll_bounce_friction = 0.5;
+ _elm_config->page_scroll_friction = 0.5;
+ _elm_config->bring_in_scroll_friction = 0.5;
+ _elm_config->zoom_friction = 0.5;
+ _elm_config->thumbscroll_bounce_enable = 1;
+ _elm_config->scale = 1.0;
+ _elm_config->bgpixmap = 0;
+ _elm_config->font_hinting = 2;
+ _elm_config->font_dirs = NULL;
+ _elm_config->image_cache = 4096;
+ _elm_config->font_cache = 512;
+ _elm_config->finger_size = 40;
+ _elm_config->compositing = 1;
+ _elm_config->fps = 60.0;
+ _elm_config->theme = eina_stringshare_add("default");
+ _elm_config->modules = NULL;
+ }
s = getenv("ELM_ENGINE");
if (s)
@@ -641,8 +763,17 @@ elm_quicklaunch_init(int argc, char **argv)
if (s) _elm_config->zoom_friction = atof(s);
s = getenv("ELM_THEME");
- if (s) _elm_theme_parse(s);
- else _elm_theme_parse("default");
+ if (s)
+ {
+ if (_elm_config->theme)
+ {
+ eina_stringshare_del(_elm_config->theme);
+ _elm_config->theme = NULL;
+ }
+ _elm_config->theme = eina_stringshare_add(s);
+ }
+
+ _elm_theme_parse(_elm_config->theme);
_elm_config->font_hinting = 2;
s = getenv("ELM_FONT_HINTING");
@@ -659,6 +790,11 @@ elm_quicklaunch_init(int argc, char **argv)
const char *p, *pp;
char *buf;
+ EINA_LIST_FREE(_elm_config->font_dirs, p)
+ {
+ eina_stringshare_del(p);
+ }
+
buf = alloca(strlen(s) + 1);
p = s;
pp = p;
@@ -705,11 +841,20 @@ elm_quicklaunch_init(int argc, char **argv)
if (_elm_config->fps < 1.0) _elm_config->fps = 1.0;
ecore_animator_frametime_set(1.0 / _elm_config->fps);
- edje_frametime_set(1.0 / 60.0);
+ edje_frametime_set(1.0 / _elm_config->fps);
edje_scale_set(_elm_config->scale);
s = getenv("ELM_MODULES");
- if (s) _elm_module_parse(s);
+ if (s)
+ {
+ if (_elm_config->modules)
+ {
+ eina_stringshare_del(_elm_config->modules);
+ _elm_config->modules = NULL;
+ }
+ _elm_config->modules = eina_stringshare_add(s);
+ }
+ if (_elm_config->modules) _elm_module_parse(_elm_config->modules);
}
EAPI void
@@ -775,6 +920,12 @@ elm_quicklaunch_sub_init(int argc, char **argv)
_elm_atom_enlightenment_theme);
if (s)
{
+ if (_elm_config->theme)
+ {
+ eina_stringshare_del(_elm_config->theme);
+ _elm_config->theme = NULL;
+ }
+ _elm_config->theme = eina_stringshare_add(s);
_elm_theme_parse(s);
free(s);
}
@@ -817,12 +968,16 @@ elm_quicklaunch_shutdown(void)
{
eina_stringshare_del(fontdir);
}
-
+
+ if (_elm_config->theme) eina_stringshare_del(_elm_config->theme);
+ if (_elm_config->modules) eina_stringshare_del(_elm_config->modules);
+
+ free(_elm_config);
+ free(_elm_appname);
+
ecore_event_handler_del(_elm_exit_handler);
_elm_exit_handler = NULL;
- free(_elm_config);
- free(_elm_appname);
_elm_unneed_efreet();
_elm_unneed_e_dbus();
_elm_module_shutdown();
diff --git a/legacy/elementary/src/lib/elm_priv.h b/legacy/elementary/src/lib/elm_priv.h
index c2e34e0dcc..0ca625dee5 100644
--- a/legacy/elementary/src/lib/elm_priv.h
+++ b/legacy/elementary/src/lib/elm_priv.h
@@ -57,8 +57,10 @@ struct _Elm_Config
int font_hinting;
int image_cache;
int font_cache;
- Evas_Coord finger_size;
+ int finger_size;
double fps;
+ const char *theme;
+ const char *modules;
};
typedef struct _Elm_Module Elm_Module;
diff --git a/legacy/elementary/src/lib/els_scroller.h b/legacy/elementary/src/lib/els_scroller.h
index b138a41d20..ecfb95fc1d 100644
--- a/legacy/elementary/src/lib/els_scroller.h
+++ b/legacy/elementary/src/lib/els_scroller.h
@@ -1,8 +1,8 @@
typedef enum _Elm_Smart_Scroller_Policy
{
- ELM_SMART_SCROLLER_POLICY_OFF,
+ ELM_SMART_SCROLLER_POLICY_AUTO,
ELM_SMART_SCROLLER_POLICY_ON,
- ELM_SMART_SCROLLER_POLICY_AUTO
+ ELM_SMART_SCROLLER_POLICY_OFF
}
Elm_Smart_Scroller_Policy;