summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-01-18 09:38:52 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-01-18 09:38:52 +0000
commit06d2876bafd4d2b10b3c6e48591d2423791a7937 (patch)
tree3c34155257ed80468734e9af81737f1848ecab70
parent5da6adb481408605f1d7ed23e53ecbdfd0cabc64 (diff)
well it needed to be done finallly - elm has config files and profiles - just
like big brother e. SVN revision: 45280
-rw-r--r--legacy/elementary/Makefile.am2
-rw-r--r--legacy/elementary/config/Makefile.am19
-rw-r--r--legacy/elementary/config/default/Makefile.am23
-rw-r--r--legacy/elementary/config/default/base.src22
-rw-r--r--legacy/elementary/config/default/icon.pngbin0 -> 9183 bytes
-rw-r--r--legacy/elementary/config/default/profile.desktop19
-rw-r--r--legacy/elementary/config/illume/Makefile.am23
-rw-r--r--legacy/elementary/config/illume/base.src22
-rw-r--r--legacy/elementary/config/illume/icon.pngbin0 -> 7555 bytes
-rw-r--r--legacy/elementary/config/illume/profile.desktop16
-rw-r--r--legacy/elementary/config/profile.src1
-rw-r--r--legacy/elementary/config/standard/Makefile.am23
-rw-r--r--legacy/elementary/config/standard/base.src22
-rw-r--r--legacy/elementary/config/standard/icon.pngbin0 -> 12068 bytes
-rw-r--r--legacy/elementary/config/standard/profile.desktop18
-rw-r--r--legacy/elementary/configure.ac17
-rw-r--r--legacy/elementary/src/lib/elm_main.c217
-rw-r--r--legacy/elementary/src/lib/elm_priv.h4
-rw-r--r--legacy/elementary/src/lib/els_scroller.h4
19 files changed, 416 insertions, 36 deletions
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 @@
1SUBDIRS = src data doc 1SUBDIRS = src data config doc
2 2
3ACLOCAL_AMFLAGS = -I m4 3ACLOCAL_AMFLAGS = -I m4
4 4
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 @@
1MAINTAINERCLEANFILES = Makefile.in
2SUBDIRS = default standard illume
3
4EET_EET = @eet_eet@
5
6EXTRA_DIST = profile.src
7
8filesdir = $(datadir)/elementary/config
9
10files_DATA = profile.cfg
11
12%.cfg: %.src
13 $(EET_EET) -i \
14 $(top_builddir)/config/$@ config \
15 $< 0
16
17clean-local:
18 rm -rf *.cfg *~
19
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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EET_EET = @eet_eet@
4
5EXTRA_DIST = \
6 profile.desktop \
7 icon.png \
8 base.src
9
10filesdir = $(datadir)/elementary/config/default
11files_DATA = \
12 profile.desktop \
13 icon.png \
14 base.cfg
15
16%.cfg: %.src
17 $(EET_EET) -e \
18 $(top_builddir)/config/default/$@ config \
19 $< 1
20
21clean-local:
22 rm -rf *.cfg *~
23
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 @@
1group "Elm_Config" struct {
2 value "engine" int: 0;
3 value "thumbscroll_enable" int: 1;
4 value "thumbscroll_threshhold" int: 24;
5 value "thumbscroll_momentum_threshhold" double: 100.0;
6 value "thumbscroll_friction" double: 1.0;
7 value "thumbscroll_bounce_friction" double: 0.5;
8 value "page_scroll_friction" double: 0.5;
9 value "bring_in_scroll_friction" double: 0.5;
10 value "zoom_friction" double: 0.5;
11 value "thumbscroll_bounce_enable" int: 1;
12 value "scale" double: 1.0;
13 value "bgpixmap" int: 0;
14 value "compositing" int: 1;
15 value "font_hinting" int: 2;
16 value "image_cache" int: 4096;
17 value "font_cache" int: 512;
18 value "finger_size" int: 40;
19 value "fps" double: 60.0;
20 value "theme" string: "default";
21 value "modules" string: "";
22}
diff --git a/legacy/elementary/config/default/icon.png b/legacy/elementary/config/default/icon.png
new file mode 100644
index 0000000000..9c08ee2a58
--- /dev/null
+++ b/legacy/elementary/config/default/icon.png
Binary files 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 @@
1[Desktop Entry]
2Type=Link
3Name=Default
4Name[cs]=Výchozí
5Name[it]=Predefinito
6Name[hu]=Alapértelmezett
7Name[fr]=Prédéfini
8Name[el]=Προκαθορισμένο
9Name[eo]=Pravaloroj
10Name[zh_CN]=默认
11Icon=icon.png
12Comment=Select this to begin<br>the initial setup again.
13Comment[cs]=Vyberte pro znovuspuštění<br>tohoto průvodce.
14Comment[it]=Selezionare questo per<br>riprendere la<br>configurazione iniziale.
15Comment[hu]=Válaszd ezt az alap<br>beállítáok megismétléséhez.
16Comment[fr]=Sélectionnez ceci pour recommencer<br>la configuration initiale.
17Comment[el]=Επέλεξε αυτό για να <br>ξεκινήσεις την αρχική ρύθμιση ξανά.
18Comment[eo]=Elektu tion por restartigi<br>la pravalorizan agordon.
19Comment[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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EET_EET = @eet_eet@
4
5EXTRA_DIST = \
6 profile.desktop \
7 icon.png \
8 base.src
9
10filesdir = $(datadir)/elementary/config/illume
11files_DATA = \
12 profile.desktop \
13 icon.png \
14 base.cfg
15
16%.cfg: %.src
17 $(EET_EET) -e \
18 $(top_builddir)/config/illume/$@ config \
19 $< 1
20
21clean-local:
22 rm -rf *.cfg *~
23
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 @@
1group "Elm_Config" struct {
2 value "engine" int: 0;
3 value "thumbscroll_enable" int: 1;
4 value "thumbscroll_threshhold" int: 24;
5 value "thumbscroll_momentum_threshhold" double: 100.0;
6 value "thumbscroll_friction" double: 1.0;
7 value "thumbscroll_bounce_friction" double: 0.5;
8 value "page_scroll_friction" double: 0.5;
9 value "bring_in_scroll_friction" double: 0.5;
10 value "zoom_friction" double: 0.5;
11 value "thumbscroll_bounce_enable" int: 1;
12 value "scale" double: 1.0;
13 value "bgpixmap" int: 0;
14 value "compositing" int: 1;
15 value "font_hinting" int: 2;
16 value "image_cache" int: 4096;
17 value "font_cache" int: 512;
18 value "finger_size" int: 40;
19 value "fps" double: 60.0;
20 value "theme" string: "default";
21 value "modules" string: "";
22}
diff --git a/legacy/elementary/config/illume/icon.png b/legacy/elementary/config/illume/icon.png
new file mode 100644
index 0000000000..9e0ed3dac8
--- /dev/null
+++ b/legacy/elementary/config/illume/icon.png
Binary files 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 @@
1[Desktop Entry]
2Type=Link
3Name=Illume
4Name[fr]=Illume
5Name[el]=Illume
6Name[eo]=Illume
7Name[zh_CN]=Illume
8Icon=icon.png
9Comment=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.
10Comment[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í.
11Comment[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.
12Comment[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.
13Comment[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.
14Comment[el]=Το προφίλ Illume είναι<br>για μικροσυσκευές όπως <br>κινητά τηλέφωνα ή internet<br>tablets με μικρές οθόνες αφής.<br>Επιλέξτε μόνο αν έχετε τέτοια<br>συσκευή.
15Comment[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.
16Comment[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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EET_EET = @eet_eet@
4
5EXTRA_DIST = \
6 profile.desktop \
7 icon.png \
8 base.src
9
10filesdir = $(datadir)/elementary/config/standard
11files_DATA = \
12 profile.desktop \
13 icon.png \
14 base.cfg
15
16%.cfg: %.src
17 $(EET_EET) -e \
18 $(top_builddir)/config/standard/$@ config \
19 $< 1
20
21clean-local:
22 rm -rf *.cfg *~
23
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 @@
1group "Elm_Config" struct {
2 value "engine" int: 0;
3 value "thumbscroll_enable" int: 1;
4 value "thumbscroll_threshhold" int: 4;
5 value "thumbscroll_momentum_threshhold" double: 100.0;
6 value "thumbscroll_friction" double: 1.0;
7 value "thumbscroll_bounce_friction" double: 0.5;
8 value "page_scroll_friction" double: 0.5;
9 value "bring_in_scroll_friction" double: 0.5;
10 value "zoom_friction" double: 0.5;
11 value "thumbscroll_bounce_enable" int: 1;
12 value "scale" double: 1.0;
13 value "bgpixmap" int: 0;
14 value "compositing" int: 1;
15 value "font_hinting" int: 2;
16 value "image_cache" int: 4096;
17 value "font_cache" int: 512;
18 value "finger_size" int: 5;
19 value "fps" double: 60.0;
20 value "theme" string: "default";
21 value "modules" string: "";
22}
diff --git a/legacy/elementary/config/standard/icon.png b/legacy/elementary/config/standard/icon.png
new file mode 100644
index 0000000000..90b57af47d
--- /dev/null
+++ b/legacy/elementary/config/standard/icon.png
Binary files 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 @@
1[Desktop Entry]
2Type=Link
3Name=Standard
4Name[cs]=Standartní
5Name[hu]=Általános
6Name[fr]=Standard
7Name[el]=Κανονικό
8Name[eo]=Kutima
9Name[zh_CN]=标准
10Icon=icon.png
11Comment=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.
12Comment[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.
13Comment[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.
14Comment[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.
15Comment[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.
16Comment[el]=Αυτό είναι το κανονικό <br>προφίλ που είναι κοινό<br>για τα περισσότερα συστήματα. Επιλέξτε αυτό<br>αν δεν είστε σίγουροι για <br>την επιλογή σας.
17Comment[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.
18Comment[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"])
131PKG_CHECK_MODULES([ELEMENTARY], 131PKG_CHECK_MODULES([ELEMENTARY],
132 [ 132 [
133 eina-0 >= 0.0.1 133 eina-0 >= 0.0.1
134 eet >= 1.1.0 134 eet >= 1.2.3
135 evas >= 0.9.9 135 evas >= 0.9.9
136 ecore >= 0.9.9 136 ecore >= 0.9.9
137 ecore-evas >= 0.9.9 137 ecore-evas >= 0.9.9
@@ -142,6 +142,17 @@ PKG_CHECK_MODULES([ELEMENTARY],
142 ] 142 ]
143) 143)
144 144
145AC_ARG_WITH(eet-eet,
146[ --with-eet-eet=PATH specify a specific path to eet utility],
147[
148 v=$withval;
149 eet_eet=$v
150 echo " Elementary eet explicitly set to "$eet_eet;
151],[
152 eet_eet=$(pkg-config --variable=prefix eet)/bin/eet
153])
154AC_SUBST(eet_eet)
155
145requirement_elm="edje ecore-file ecore-txt ecore-job ecore-evas ecore evas eet eina-0 ${requirement_elm}" 156requirement_elm="edje ecore-file ecore-txt ecore-job ecore-evas ecore evas eet eina-0 ${requirement_elm}"
146 157
147have_elementary_x="no" 158have_elementary_x="no"
@@ -292,6 +303,10 @@ data/themes/Makefile
292data/images/Makefile 303data/images/Makefile
293data/objects/Makefile 304data/objects/Makefile
294data/desktop/Makefile 305data/desktop/Makefile
306config/Makefile
307config/default/Makefile
308config/standard/Makefile
309config/illume/Makefile
295]) 310])
296 311
297##################################################################### 312#####################################################################
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)
329 329
330 val = ecore_x_window_prop_string_get(event->win, 330 val = ecore_x_window_prop_string_get(event->win,
331 event->atom); 331 event->atom);
332 if (_elm_config->theme)
333 {
334 eina_stringshare_del(_elm_config->theme);
335 _elm_config->theme = NULL;
336 }
332 if (val) 337 if (val)
333 { 338 {
339 _elm_config->theme = eina_stringshare_add(val);
334 _elm_theme_parse(val); 340 _elm_theme_parse(val);
335 free(val); 341 free(val);
336 _elm_rescale(); 342 _elm_rescale();
@@ -459,7 +465,7 @@ elm_quicklaunch_init(int argc, char **argv)
459{ 465{
460 int i; 466 int i;
461 char buf[PATH_MAX], *s; 467 char buf[PATH_MAX], *s;
462 468
463 eina_init(); 469 eina_init();
464 _elm_log_dom = eina_log_domain_register("elementary", EINA_COLOR_LIGHTBLUE); 470 _elm_log_dom = eina_log_domain_register("elementary", EINA_COLOR_LIGHTBLUE);
465 if (!_elm_log_dom) 471 if (!_elm_log_dom)
@@ -549,35 +555,151 @@ elm_quicklaunch_init(int argc, char **argv)
549#endif 555#endif
550 if (!_elm_data_dir) 556 if (!_elm_data_dir)
551 _elm_data_dir = eina_stringshare_add(PACKAGE_DATA_DIR); 557 _elm_data_dir = eina_stringshare_add(PACKAGE_DATA_DIR);
552 if (!_elm_data_dir) 558 if (!_elm_data_dir)
553 _elm_data_dir = eina_stringshare_add("/"); 559 _elm_data_dir = eina_stringshare_add("/");
554 if (!_elm_lib_dir) 560 if (!_elm_lib_dir)
555 _elm_lib_dir = eina_stringshare_add(PACKAGE_LIB_DIR); 561 _elm_lib_dir = eina_stringshare_add(PACKAGE_LIB_DIR);
556 if (!_elm_lib_dir) 562 if (!_elm_lib_dir)
557 _elm_lib_dir = eina_stringshare_add("/"); 563 _elm_lib_dir = eina_stringshare_add("/");
558 564
559 // FIXME: actually load config from file - use eet. also for X properties, 565
560 // reduce to single x property with eet data encoded in it. 566 // yes - this should be a function. do it later
561 _elm_config = ELM_NEW(Elm_Config); 567 {
562 _elm_config->engine = ELM_SOFTWARE_X11; 568 Eet_Data_Descriptor_Class eddc;
563 _elm_config->thumbscroll_enable = 1; 569 Eet_Data_Descriptor *edd = NULL;
564 _elm_config->thumbscroll_threshhold = 24; 570 Eet_File *ef = NULL;
565 _elm_config->thumbscroll_momentum_threshhold = 100.0; 571 int len = 0;
566 _elm_config->thumbscroll_friction = 1.0; 572 char buf[PATH_MAX], *p;
567 _elm_config->thumbscroll_bounce_friction = 0.5; 573 const char *home = NULL;
568 _elm_config->thumbscroll_bounce_enable = 1; 574 char *profile = strdup("default");
569 _elm_config->page_scroll_friction = 0.5; 575
570 _elm_config->bring_in_scroll_friction = 0.5; 576 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Elm_Config);
571 _elm_config->zoom_friction = 0.5; 577
572 _elm_config->scale = 1.0; 578 eddc.func.str_direct_alloc = NULL;
573 _elm_config->font_hinting = 2; 579 eddc.func.str_direct_free = NULL;
574 _elm_config->font_dirs = NULL; 580
575 _elm_config->image_cache = 4096; 581 edd = eet_data_descriptor_file_new(&eddc);
576 _elm_config->font_cache = 512; 582 if (edd)
577 _elm_config->finger_size = 40; 583 {
578 _elm_config->bgpixmap = 0; 584 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "engine", engine, EET_T_INT);
579 _elm_config->compositing = 1; 585 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "thumbscroll_enable", thumbscroll_enable, EET_T_INT);
580 _elm_config->fps = 60.0; 586 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "thumbscroll_threshhold", thumbscroll_threshhold, EET_T_INT);
587 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "thumbscroll_momentum_threshhold", thumbscroll_momentum_threshhold, EET_T_DOUBLE);
588 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "thumbscroll_friction", thumbscroll_friction, EET_T_DOUBLE);
589 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "thumbscroll_bounce_friction", thumbscroll_bounce_friction, EET_T_DOUBLE);
590 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "page_scroll_friction", page_scroll_friction, EET_T_DOUBLE);
591 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "bring_in_scroll_friction", bring_in_scroll_friction, EET_T_DOUBLE);
592 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "zoom_friction", zoom_friction, EET_T_DOUBLE);
593 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "thumbscroll_bounce_enable", thumbscroll_bounce_enable, EET_T_INT);
594 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "scale", scale, EET_T_DOUBLE);
595 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "bgpixmap", bgpixmap, EET_T_INT);
596 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "compositing", compositing, EET_T_INT);
597 // EET_DATA_DESCRIPTOR_ADD_LIST(edd, Elm_Config, "font_dirs", font_dirs, sub_edd);
598 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "font_hinting", font_hinting, EET_T_INT);
599 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "image_cache", image_cache, EET_T_INT);
600 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "font_cache", font_cache, EET_T_INT);
601 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "finger_size", finger_size, EET_T_INT);
602 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "fps", fps, EET_T_DOUBLE);
603 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "theme", theme, EET_T_STRING);
604 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Elm_Config, "modules", modules, EET_T_STRING);
605 }
606 else
607 {
608 printf("EEEK! eet_data_descriptor_file_new() failed\n");
609 }
610
611 home = getenv("HOME");
612 if (!home) home = "/";
613
614 snprintf(buf, sizeof(buf), "%s/.elementary/config/profile.cfg", home);
615 ef = eet_open(buf, EET_FILE_MODE_READ);
616 if (ef)
617 {
618 p = eet_read(ef, "config", &len);
619 if (p)
620 {
621 free(profile);
622 profile = malloc(len + 1);
623 memcpy(profile, p, len);
624 profile[len] = 0;
625 free(p);
626 }
627 eet_close(ef);
628 if (!p) ef = NULL;
629 }
630 if (!ef)
631 {
632 snprintf(buf, sizeof(buf), "%s/config/profile.cfg", _elm_data_dir);
633 ef = eet_open(buf, EET_FILE_MODE_READ);
634 if (ef)
635 {
636 p = eet_read(ef, "config", &len);
637 if (p)
638 {
639 free(profile);
640 profile = malloc(len + 1);
641 memcpy(profile, p, len);
642 profile[len] = 0;
643 free(p);
644 }
645 eet_close(ef);
646 }
647 }
648
649 s = getenv("ELM_PROFILE");
650 if (s)
651 {
652 free(profile);
653 profile = strdup(s);
654 }
655
656 snprintf(buf, sizeof(buf), "%s/.elementary/config/%s/base.cfg", home, profile);
657 ef = eet_open(buf, EET_FILE_MODE_READ);
658 if (ef)
659 {
660 _elm_config = eet_data_read(ef, edd, "config");
661 eet_close(ef);
662 }
663 if (!_elm_config)
664 {
665 snprintf(buf, sizeof(buf), "%s/config/%s/base.cfg", _elm_data_dir, profile);
666 ef = eet_open(buf, EET_FILE_MODE_READ);
667 if (ef)
668 {
669 _elm_config = eet_data_read(ef, edd, "config");
670 eet_close(ef);
671 }
672 }
673
674 if (edd) eet_data_descriptor_free(edd);
675 if (profile) free(profile);
676 }
677
678 if (!_elm_config)
679 {
680 _elm_config = ELM_NEW(Elm_Config);
681 _elm_config->engine = ELM_SOFTWARE_X11;
682 _elm_config->thumbscroll_enable = 1;
683 _elm_config->thumbscroll_threshhold = 24;
684 _elm_config->thumbscroll_momentum_threshhold = 100.0;
685 _elm_config->thumbscroll_friction = 1.0;
686 _elm_config->thumbscroll_bounce_friction = 0.5;
687 _elm_config->page_scroll_friction = 0.5;
688 _elm_config->bring_in_scroll_friction = 0.5;
689 _elm_config->zoom_friction = 0.5;
690 _elm_config->thumbscroll_bounce_enable = 1;
691 _elm_config->scale = 1.0;
692 _elm_config->bgpixmap = 0;
693 _elm_config->font_hinting = 2;
694 _elm_config->font_dirs = NULL;
695 _elm_config->image_cache = 4096;
696 _elm_config->font_cache = 512;
697 _elm_config->finger_size = 40;
698 _elm_config->compositing = 1;
699 _elm_config->fps = 60.0;
700 _elm_config->theme = eina_stringshare_add("default");
701 _elm_config->modules = NULL;
702 }
581 703
582 s = getenv("ELM_ENGINE"); 704 s = getenv("ELM_ENGINE");
583 if (s) 705 if (s)
@@ -641,8 +763,17 @@ elm_quicklaunch_init(int argc, char **argv)
641 if (s) _elm_config->zoom_friction = atof(s); 763 if (s) _elm_config->zoom_friction = atof(s);
642 764
643 s = getenv("ELM_THEME"); 765 s = getenv("ELM_THEME");
644 if (s) _elm_theme_parse(s); 766 if (s)
645 else _elm_theme_parse("default"); 767 {
768 if (_elm_config->theme)
769 {
770 eina_stringshare_del(_elm_config->theme);
771 _elm_config->theme = NULL;
772 }
773 _elm_config->theme = eina_stringshare_add(s);
774 }
775
776 _elm_theme_parse(_elm_config->theme);
646 777
647 _elm_config->font_hinting = 2; 778 _elm_config->font_hinting = 2;
648 s = getenv("ELM_FONT_HINTING"); 779 s = getenv("ELM_FONT_HINTING");
@@ -659,6 +790,11 @@ elm_quicklaunch_init(int argc, char **argv)
659 const char *p, *pp; 790 const char *p, *pp;
660 char *buf; 791 char *buf;
661 792
793 EINA_LIST_FREE(_elm_config->font_dirs, p)
794 {
795 eina_stringshare_del(p);
796 }
797
662 buf = alloca(strlen(s) + 1); 798 buf = alloca(strlen(s) + 1);
663 p = s; 799 p = s;
664 pp = p; 800 pp = p;
@@ -705,11 +841,20 @@ elm_quicklaunch_init(int argc, char **argv)
705 if (_elm_config->fps < 1.0) _elm_config->fps = 1.0; 841 if (_elm_config->fps < 1.0) _elm_config->fps = 1.0;
706 842
707 ecore_animator_frametime_set(1.0 / _elm_config->fps); 843 ecore_animator_frametime_set(1.0 / _elm_config->fps);
708 edje_frametime_set(1.0 / 60.0); 844 edje_frametime_set(1.0 / _elm_config->fps);
709 edje_scale_set(_elm_config->scale); 845 edje_scale_set(_elm_config->scale);
710 846
711 s = getenv("ELM_MODULES"); 847 s = getenv("ELM_MODULES");
712 if (s) _elm_module_parse(s); 848 if (s)
849 {
850 if (_elm_config->modules)
851 {
852 eina_stringshare_del(_elm_config->modules);
853 _elm_config->modules = NULL;
854 }
855 _elm_config->modules = eina_stringshare_add(s);
856 }
857 if (_elm_config->modules) _elm_module_parse(_elm_config->modules);
713} 858}
714 859
715EAPI void 860EAPI void
@@ -775,6 +920,12 @@ elm_quicklaunch_sub_init(int argc, char **argv)
775 _elm_atom_enlightenment_theme); 920 _elm_atom_enlightenment_theme);
776 if (s) 921 if (s)
777 { 922 {
923 if (_elm_config->theme)
924 {
925 eina_stringshare_del(_elm_config->theme);
926 _elm_config->theme = NULL;
927 }
928 _elm_config->theme = eina_stringshare_add(s);
778 _elm_theme_parse(s); 929 _elm_theme_parse(s);
779 free(s); 930 free(s);
780 } 931 }
@@ -817,12 +968,16 @@ elm_quicklaunch_shutdown(void)
817 { 968 {
818 eina_stringshare_del(fontdir); 969 eina_stringshare_del(fontdir);
819 } 970 }
820 971
972 if (_elm_config->theme) eina_stringshare_del(_elm_config->theme);
973 if (_elm_config->modules) eina_stringshare_del(_elm_config->modules);
974
975 free(_elm_config);
976 free(_elm_appname);
977
821 ecore_event_handler_del(_elm_exit_handler); 978 ecore_event_handler_del(_elm_exit_handler);
822 _elm_exit_handler = NULL; 979 _elm_exit_handler = NULL;
823 980
824 free(_elm_config);
825 free(_elm_appname);
826 _elm_unneed_efreet(); 981 _elm_unneed_efreet();
827 _elm_unneed_e_dbus(); 982 _elm_unneed_e_dbus();
828 _elm_module_shutdown(); 983 _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
57 int font_hinting; 57 int font_hinting;
58 int image_cache; 58 int image_cache;
59 int font_cache; 59 int font_cache;
60 Evas_Coord finger_size; 60 int finger_size;
61 double fps; 61 double fps;
62 const char *theme;
63 const char *modules;
62}; 64};
63 65
64typedef struct _Elm_Module Elm_Module; 66typedef 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 @@
1typedef enum _Elm_Smart_Scroller_Policy 1typedef enum _Elm_Smart_Scroller_Policy
2{ 2{
3 ELM_SMART_SCROLLER_POLICY_OFF, 3 ELM_SMART_SCROLLER_POLICY_AUTO,
4 ELM_SMART_SCROLLER_POLICY_ON, 4 ELM_SMART_SCROLLER_POLICY_ON,
5 ELM_SMART_SCROLLER_POLICY_AUTO 5 ELM_SMART_SCROLLER_POLICY_OFF
6} 6}
7Elm_Smart_Scroller_Policy; 7Elm_Smart_Scroller_Policy;
8 8