Nice Mate :+) dh [EMAIL PROTECTED] wrote: > Author: raster > Date: 2008-08-21 23:55:37 -0700 (Thu, 21 Aug 2008) > New Revision: 35614 > > Added: > trunk/e/config/ trunk/e/config/Makefile.am trunk/e/config/default/ > trunk/e/config/default/Makefile.am trunk/e/config/default/e.src > trunk/e/config/default/module.battery.src > trunk/e/config/default/module.cpufreq.src > trunk/e/config/default/module.dropshadow.src > trunk/e/config/default/module.fileman.src > trunk/e/config/default/module.ibar.src trunk/e/config/default/module.ibox.src > trunk/e/config/default/module.pager.src > trunk/e/config/default/module.temperature.src trunk/e/config/profile.src > Modified: > trunk/e/Makefile.am trunk/e/configure.in trunk/e/src/bin/e_config.c > Log: > > allow for a default installed config file set.. and use it.. and allow the > default profiel to be named etc. etc. > > > > Modified: trunk/e/Makefile.am > =================================================================== > --- trunk/e/Makefile.am 2008-08-22 01:03:05 UTC (rev 35613) > +++ trunk/e/Makefile.am 2008-08-22 06:55:37 UTC (rev 35614) > @@ -1,4 +1,4 @@ > -SUBDIRS = src data doc po > +SUBDIRS = src data doc po config > > MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \ > config.h.in config.sub configure install-sh \ > > Added: trunk/e/config/Makefile.am > > Added: trunk/e/config/default/Makefile.am > > Added: trunk/e/config/default/e.src > > Added: trunk/e/config/default/module.battery.src > > Added: trunk/e/config/default/module.cpufreq.src > > Added: trunk/e/config/default/module.dropshadow.src > > Added: trunk/e/config/default/module.fileman.src > > Added: trunk/e/config/default/module.ibar.src > > Added: trunk/e/config/default/module.ibox.src > > Added: trunk/e/config/default/module.pager.src > > Added: trunk/e/config/default/module.temperature.src > > Added: trunk/e/config/profile.src > > Modified: trunk/e/configure.in > =================================================================== > --- trunk/e/configure.in 2008-08-22 01:03:05 UTC (rev 35613) > +++ trunk/e/configure.in 2008-08-22 06:55:37 UTC (rev 35614) > @@ -275,6 +275,18 @@ > ]) > AC_SUBST(edje_cc) > > +PKG_CHECK_MODULES(EET, [eet >= 1.0.1]) > +AC_ARG_WITH(eet-eet, > +[ --with-eet-eet=PATH specify a specific path to eet utility], > +[ > + v=$withval; > + eet_eet=$v > + echo " Enlightenment eet explicitly set to "$eet_eet; > +],[ > + eet_eet=$(pkg-config --variable=prefix eet)/bin/eet > +]) > +AC_SUBST(eet_eet) > + > AC_DEFINE(E_INTERNAL, 1, "This define can be used to wrap internal E stuff, > as config.h isn't exported") > > > @@ -438,6 +450,8 @@ > data/etc/Makefile > data/icons/Makefile > doc/Makefile > +config/Makefile > +config/default/Makefile > po/Makefile.in > enlightenment-config > ],[ > > Modified: trunk/e/src/bin/e_config.c > =================================================================== > --- trunk/e/src/bin/e_config.c 2008-08-22 01:03:05 UTC (rev 35613) > +++ trunk/e/src/bin/e_config.c 2008-08-22 06:55:37 UTC (rev 35614) > @@ -51,18 +51,30 @@ > E_EVENT_CONFIG_ICON_THEME = ecore_event_type_new(); > > _e_config_profile = getenv("E_CONF_PROFILE"); > - if (!_e_config_profile) > + if (_e_config_profile) > + /* if environment var set - use this profile name */ > + _e_config_profile = strdup(_e_config_profile); > + else > { > Eet_File *ef; > char buf[4096]; > const char *homedir; > > + /* try user profile config */ > homedir = e_user_homedir_get(); > snprintf(buf, sizeof(buf), "%s/.e/e/config/profile.cfg", > homedir); > ef = eet_open(buf, EET_FILE_MODE_READ); > + if (!ef) > + { > + /* use system if no user profile config */ > + snprintf(buf, sizeof(buf), "%s/data/config/profile.cfg", > + e_prefix_data_get()); > + ef = eet_open(buf, EET_FILE_MODE_READ); > + } > if (ef) > { > + /* profile config exists */ > char *data; > int data_len = 0; > > @@ -80,11 +92,25 @@ > eet_close(ef); > } > else > - _e_config_profile = strdup("default"); > + { > + /* no profile config - try other means */ > + char *link = NULL; > + > + /* check symlink - if default is a symlink to another dir */ > + snprintf(buf, sizeof(buf), "%s/data/config/default", > + e_prefix_data_get()); > + link = ecore_file_readlink(buf); > + /* if so use just the filename as the priofle - must be a local > link */ > + if (link) > + { > + _e_config_profile = strdup(ecore_file_file_get(link)); > + free(link); > + } > + else > + _e_config_profile = strdup("default"); > + } > e_util_env_set("E_CONF_PROFILE", _e_config_profile); > } > - else > - _e_config_profile = strdup(_e_config_profile); > > _e_config_gadcon_client_edd = E_CONFIG_DD_NEW("E_Config_Gadcon_Client", > E_Config_Gadcon_Client); > #undef T > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > enlightenment-svn mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn >
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel