diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | config/Makefile.am | 19 | ||||
-rw-r--r-- | config/default/Makefile.am | 23 | ||||
-rw-r--r-- | config/default/base.src | 22 | ||||
-rw-r--r-- | config/default/icon.png | bin | 0 -> 9183 bytes | |||
-rw-r--r-- | config/default/profile.desktop | 19 | ||||
-rw-r--r-- | config/illume/Makefile.am | 23 | ||||
-rw-r--r-- | config/illume/base.src | 22 | ||||
-rw-r--r-- | config/illume/icon.png | bin | 0 -> 7555 bytes | |||
-rw-r--r-- | config/illume/profile.desktop | 16 | ||||
-rw-r--r-- | config/profile.src | 1 | ||||
-rw-r--r-- | config/standard/Makefile.am | 23 | ||||
-rw-r--r-- | config/standard/base.src | 22 | ||||
-rw-r--r-- | config/standard/icon.png | bin | 0 -> 12068 bytes | |||
-rw-r--r-- | config/standard/profile.desktop | 18 | ||||
-rw-r--r-- | configure.ac | 17 | ||||
-rw-r--r-- | src/lib/elm_main.c | 217 | ||||
-rw-r--r-- | src/lib/elm_priv.h | 4 | ||||
-rw-r--r-- | src/lib/els_scroller.h | 4 |
19 files changed, 416 insertions, 36 deletions
diff --git a/Makefile.am b/Makefile.am index 01507a823..0c097d616 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = src data doc +SUBDIRS = src data config doc ACLOCAL_AMFLAGS = -I m4 diff --git a/config/Makefile.am b/config/Makefile.am new file mode 100644 index 000000000..cf5213394 --- /dev/null +++ b/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/config/default/Makefile.am b/config/default/Makefile.am new file mode 100644 index 000000000..ba2bc9666 --- /dev/null +++ b/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/config/default/base.src b/config/default/base.src new file mode 100644 index 000000000..9cd5c2016 --- /dev/null +++ b/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/config/default/icon.png b/config/default/icon.png Binary files differnew file mode 100644 index 000000000..9c08ee2a5 --- /dev/null +++ b/config/default/icon.png diff --git a/config/default/profile.desktop b/config/default/profile.desktop new file mode 100644 index 000000000..e02dc4330 --- /dev/null +++ b/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<br>the initial setup again. +Comment[cs]=Vyberte pro znovuspuštění<br>tohoto průvodce. +Comment[it]=Selezionare questo per<br>riprendere la<br>configurazione iniziale. +Comment[hu]=Válaszd ezt az alap<br>beállítáok megismétléséhez. +Comment[fr]=Sélectionnez ceci pour recommencer<br>la configuration initiale. +Comment[el]=Επέλεξε αυτό για να <br>ξεκινήσεις την αρχική ρύθμιση ξανά. +Comment[eo]=Elektu tion por restartigi<br>la pravalorizan agordon. +Comment[zh_CN]=点击这里重新进行初始化设置主题。 diff --git a/config/illume/Makefile.am b/config/illume/Makefile.am new file mode 100644 index 000000000..fa1305609 --- /dev/null +++ b/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/config/illume/base.src b/config/illume/base.src new file mode 100644 index 000000000..9cd5c2016 --- /dev/null +++ b/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/config/illume/icon.png b/config/illume/icon.png Binary files differnew file mode 100644 index 000000000..9e0ed3dac --- /dev/null +++ b/config/illume/icon.png diff --git a/config/illume/profile.desktop b/config/illume/profile.desktop new file mode 100644 index 000000000..34308f68a --- /dev/null +++ b/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<br>embedded systems like<br>phones and web<br>tablets with tiny<br>touchscreen displays.<br>Only use this if<br>you really have<br>such a device. +Comment[cs]=Illume profil pro<br>přenosná zařízení<br>jako telefony<br>a webové tablety<br>s malými dotykovými displeji.<br>Použijte jen pokud<br>opravdu máte<br>takové zařízení. +Comment[it]=Profilo Illume per<br>sistemi embedded come<br>cellulari e webpad<br>con piccoli display<br>touchscreen.<br>Usatelo solo se<br>avete realmente un<br>dispositivo simile. +Comment[hu]=Illume profil <br>telefonokhoz, érintőképernyőkhöz.<br>Csak akkor használd ezt,<br>ha valóban ilyen eszközöd van. +Comment[fr]=Profil Illume pour les systèmes<br>embarqués comme les téléphones<br>et tablettes internet pourvus<br>d'un petit écran tactile.<br>À n'utiliser que si<br>vous disposez réellement<br>d'un tel matériel. +Comment[el]=Το προφίλ Illume είναι<br>για μικροσυσκευές όπως <br>κινητά τηλέφωνα ή internet<br>tablets με μικρές οθόνες αφής.<br>Επιλέξτε μόνο αν έχετε τέτοια<br>συσκευή. +Comment[eo]=Profilo Illume por la<br>enkorpigitaj sistemoj<br>kiel la telefonoj kaj<br>ttt-tabletoj kun etaj<br>tuŝekranoj. Nur uzu<br>tiun se vi vere havas<br>tian aparaton. +Comment[zh_CN]=为带有小型触屏的嵌入式系统如手机和上网本设计的 Illume 设置主题。 diff --git a/config/profile.src b/config/profile.src new file mode 100644 index 000000000..331d858ce --- /dev/null +++ b/config/profile.src @@ -0,0 +1 @@ +default
\ No newline at end of file diff --git a/config/standard/Makefile.am b/config/standard/Makefile.am new file mode 100644 index 000000000..88cae80e0 --- /dev/null +++ b/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/config/standard/base.src b/config/standard/base.src new file mode 100644 index 000000000..4df5eda96 --- /dev/null +++ b/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/config/standard/icon.png b/config/standard/icon.png Binary files differnew file mode 100644 index 000000000..90b57af47 --- /dev/null +++ b/config/standard/icon.png diff --git a/config/standard/profile.desktop b/config/standard/profile.desktop new file mode 100644 index 000000000..7c9ed30fe --- /dev/null +++ b/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<br>profile that is<br>universal for most<br>desktop and laptop<br>systems. Choose this<br>if you are not<br>sure what to choose. +Comment[cs]=Toto je standartní<br>univerzální<br>profil pro většinu<br>stolních a přenosných<br>počítačů. Vyberte pokud<br>si nejste jisti<br>co vybrat. +Comment[it]=Questo è il profilo<br>standard, universale<br>per la maggior<br>parte dei sistemi<br>desktop e portatili.<br>Scegliete questo se<br>non siete sicuri di<br>cosa scegliere. +Comment[hu]=Ez az általános,<br>alap beállítás,<br>amely megfelelő a<br>legtöbb laptop és<br>asztali gép számára. +Comment[fr]=C'est le profil standard<br>adapté à la quasi totalité<br>des systèmes de bureau<br>et ordinateurs portables.<br>Choisissez ce profil si<br>vous n'êtes pas sûr. +Comment[el]=Αυτό είναι το κανονικό <br>προφίλ που είναι κοινό<br>για τα περισσότερα συστήματα. Επιλέξτε αυτό<br>αν δεν είστε σίγουροι για <br>την επιλογή σας. +Comment[eo]=Tio estas la kutima profilo<br>taŭga por preskaŭ ĉiuj<br>oficejaj sistemoj kaj<br>porteblaj sistemoj.<br>Elektu ĝin se vi ne certas. +Comment[zh_CN]=适用于大多数台式机和笔记本的设置主题,如果您不清楚如何选择则请使用这个。 diff --git a/configure.ac b/configure.ac index eb2bd402e..8196567a9 100644 --- a/configure.ac +++ b/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/src/lib/elm_main.c b/src/lib/elm_main.c index e13b17c2a..8558744c5 100644 --- a/src/lib/elm_main.c +++ b/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/src/lib/elm_priv.h b/src/lib/elm_priv.h index c2e34e0dc..0ca625dee 100644 --- a/src/lib/elm_priv.h +++ b/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/src/lib/els_scroller.h b/src/lib/els_scroller.h index b138a41d2..ecfb95fc1 100644 --- a/src/lib/els_scroller.h +++ b/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; |