well it needed to be done finallly - elm has config files and profiles - just
authorCarsten Haitzler <raster@rasterman.com>
Mon, 18 Jan 2010 09:38:52 +0000 (09:38 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Mon, 18 Jan 2010 09:38:52 +0000 (09:38 +0000)
like big brother e.

SVN revision: 45280

19 files changed:
Makefile.am
config/Makefile.am [new file with mode: 0644]
config/default/Makefile.am [new file with mode: 0644]
config/default/base.src [new file with mode: 0644]
config/default/icon.png [new file with mode: 0644]
config/default/profile.desktop [new file with mode: 0644]
config/illume/Makefile.am [new file with mode: 0644]
config/illume/base.src [new file with mode: 0644]
config/illume/icon.png [new file with mode: 0644]
config/illume/profile.desktop [new file with mode: 0644]
config/profile.src [new file with mode: 0644]
config/standard/Makefile.am [new file with mode: 0644]
config/standard/base.src [new file with mode: 0644]
config/standard/icon.png [new file with mode: 0644]
config/standard/profile.desktop [new file with mode: 0644]
configure.ac
src/lib/elm_main.c
src/lib/elm_priv.h
src/lib/els_scroller.h

index 01507a8..0c097d6 100644 (file)
@@ -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 (file)
index 0000000..cf52133
--- /dev/null
@@ -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 (file)
index 0000000..ba2bc96
--- /dev/null
@@ -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 (file)
index 0000000..9cd5c20
--- /dev/null
@@ -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
new file mode 100644 (file)
index 0000000..9c08ee2
Binary files /dev/null and b/config/default/icon.png differ
diff --git a/config/default/profile.desktop b/config/default/profile.desktop
new file mode 100644 (file)
index 0000000..e02dc43
--- /dev/null
@@ -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 (file)
index 0000000..fa13056
--- /dev/null
@@ -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 (file)
index 0000000..9cd5c20
--- /dev/null
@@ -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
new file mode 100644 (file)
index 0000000..9e0ed3d
Binary files /dev/null and b/config/illume/icon.png differ
diff --git a/config/illume/profile.desktop b/config/illume/profile.desktop
new file mode 100644 (file)
index 0000000..34308f6
--- /dev/null
@@ -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 (file)
index 0000000..331d858
--- /dev/null
@@ -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 (file)
index 0000000..88cae80
--- /dev/null
@@ -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 (file)
index 0000000..4df5eda
--- /dev/null
@@ -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
new file mode 100644 (file)
index 0000000..90b57af
Binary files /dev/null and b/config/standard/icon.png differ
diff --git a/config/standard/profile.desktop b/config/standard/profile.desktop
new file mode 100644 (file)
index 0000000..7c9ed30
--- /dev/null
@@ -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]=适用于大多数台式机和笔记本的设置主题,如果您不清楚如何选择则请使用这个。
index eb2bd40..8196567 100644 (file)
@@ -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
 ])
 
 #####################################################################
index e13b17c..8558744 100644 (file)
@@ -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();
index c2e34e0..0ca625d 100644 (file)
@@ -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;
index b138a41..ecfb95f 100644 (file)
@@ -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;