Nice!

On Thu, Nov 14, 2013 at 1:30 PM, Gustavo Sverzut Barbieri <
barbi...@profusion.mobi> wrote:

> barbieri pushed a commit to branch master.
>
>
> http://git.enlightenment.org/core/efl.git/commit/?id=8e362c7ad41bd4c48960400c890dd362e50f5389
>
> commit 8e362c7ad41bd4c48960400c890dd362e50f5389
> Author: Gustavo Sverzut Barbieri <barbi...@profusion.mobi>
> Date:   Thu Nov 14 13:27:19 2013 -0200
>
>     allow ecore to not load system modules.
>
>     this won't go to changelog/news as it's mainly internal, I can't see
>     people wanting to use it except rare cases as edje tools.
> ---
>  src/bin/edje/edje_cc.c                 |  2 ++
>  src/bin/edje/edje_codegen.c            |  2 ++
>  src/bin/edje/edje_convert_main.c       |  2 ++
>  src/bin/edje/edje_decc.c               |  3 +++
>  src/bin/edje/edje_external_inspector.c |  2 ++
>  src/bin/edje/edje_inspector.c          |  2 ++
>  src/bin/edje/edje_pick.c               |  2 ++
>  src/lib/ecore/Ecore_Common.h           | 16 ++++++++++++++++
>  src/lib/ecore/ecore.c                  | 11 ++++++++++-
>  9 files changed, 41 insertions(+), 1 deletion(-)
>
> diff --git a/src/bin/edje/edje_cc.c b/src/bin/edje/edje_cc.c
> index 1ce5168..d714355 100644
> --- a/src/bin/edje/edje_cc.c
> +++ b/src/bin/edje/edje_cc.c
> @@ -116,6 +116,8 @@ main(int argc, char **argv)
>
>     setlocale(LC_NUMERIC, "C");
>
> +   ecore_app_no_system_modules();
> +
>     if (!eina_init())
>       return -1;
>
> diff --git a/src/bin/edje/edje_codegen.c b/src/bin/edje/edje_codegen.c
> index d03f450..f2ddc7f 100644
> --- a/src/bin/edje/edje_codegen.c
> +++ b/src/bin/edje/edje_codegen.c
> @@ -1098,6 +1098,8 @@ main(int argc, char *argv[])
>
>     setlocale(LC_NUMERIC, "C");
>
> +   ecore_app_no_system_modules();
> +
>     eina_init();
>     ecore_init();
>     ecore_evas_init();
> diff --git a/src/bin/edje/edje_convert_main.c
> b/src/bin/edje/edje_convert_main.c
> index e17d412..97a96d8 100644
> --- a/src/bin/edje/edje_convert_main.c
> +++ b/src/bin/edje/edje_convert_main.c
> @@ -113,6 +113,8 @@ main(int argc, char **argv)
>
>     setlocale(LC_NUMERIC, "C");
>
> +   ecore_app_no_system_modules();
> +
>     if (!eina_init())
>       return -1;
>
> diff --git a/src/bin/edje/edje_decc.c b/src/bin/edje/edje_decc.c
> index 2065d90..1cbaf29 100644
> --- a/src/bin/edje/edje_decc.c
> +++ b/src/bin/edje/edje_decc.c
> @@ -142,6 +142,9 @@ main(int argc, char **argv)
>     int i;
>
>     setlocale(LC_NUMERIC, "C");
> +
> +   ecore_app_no_system_modules();
> +
>     if (!eina_init())
>       exit(-1);
>     _edje_cc_log_dom = eina_log_domain_register
> diff --git a/src/bin/edje/edje_external_inspector.c
> b/src/bin/edje/edje_external_inspector.c
> index 6bd9a35..6b1a521 100644
> --- a/src/bin/edje/edje_external_inspector.c
> +++ b/src/bin/edje/edje_external_inspector.c
> @@ -602,6 +602,8 @@ main(int argc, char **argv)
>
>     setlocale(LC_NUMERIC, "C");
>
> +   ecore_app_no_system_modules();
> +
>     ecore_init();
>     eina_init();
>     edje_init();
> diff --git a/src/bin/edje/edje_inspector.c b/src/bin/edje/edje_inspector.c
> index 01cf104..81fe427 100644
> --- a/src/bin/edje/edje_inspector.c
> +++ b/src/bin/edje/edje_inspector.c
> @@ -1536,6 +1536,8 @@ main(int argc, char **argv)
>
>     setlocale(LC_NUMERIC, "C");
>
> +   ecore_app_no_system_modules();
> +
>     ecore_init();
>     ecore_evas_init();
>     eina_init();
> diff --git a/src/bin/edje/edje_pick.c b/src/bin/edje/edje_pick.c
> index 4635dfe..c057d3a 100644
> --- a/src/bin/edje/edje_pick.c
> +++ b/src/bin/edje/edje_pick.c
> @@ -1207,6 +1207,8 @@ main(int argc, char **argv)
>     void *n;
>     int k, bytes;
>
> +   ecore_app_no_system_modules();
> +
>     eina_init();
>     eet_init();
>     ecore_init();
> diff --git a/src/lib/ecore/Ecore_Common.h b/src/lib/ecore/Ecore_Common.h
> index 5536d22..bf6d1de 100644
> --- a/src/lib/ecore/Ecore_Common.h
> +++ b/src/lib/ecore/Ecore_Common.h
> @@ -1741,6 +1741,22 @@ EAPI void ecore_app_args_get(int *argc, char
> ***argv);
>  EAPI void ecore_app_restart(void);
>
>  /**
> + * @brief Do not load system modules for this application.
> + *
> + * Ecore will now load platform-specific system modules such as
> + * power-management, time and locate monitors.
> + *
> + * Whenever this function is called @b before ecore_init(), ecore
> + * won't load such modules.
> + *
> + * This may be useful to some command-line utilities, hardly will be
> + * useful for end-user applications.
> + *
> + * @since 1.8
> + */
> +EAPI void ecore_app_no_system_modules(void);
> +
> +/**
>   * @}
>   */
>
> diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
> index 1e7a1b7..d9c194c 100644
> --- a/src/lib/ecore/ecore.c
> +++ b/src/lib/ecore/ecore.c
> @@ -52,6 +52,8 @@ static FILE *_ecore_memory_statistic_file = NULL;
>  #endif
>  #endif
>
> +static Eina_Bool _no_system_modules = EINA_FALSE;
> +
>  Eo *_ecore_parent = NULL;
>
>  static const char *_ecore_magic_string_get(Ecore_Magic m);
> @@ -194,6 +196,12 @@ ecore_system_modules_unload(void)
>       }
>  }
>
> +EAPI void
> +ecore_app_no_system_modules(void)
> +{
> +   _no_system_modules = EINA_TRUE;
> +}
> +
>  /**
>   * @addtogroup Ecore_Init_Group
>   *
> @@ -320,7 +328,8 @@ ecore_init(void)
>       }
>  #endif
>
> -   ecore_system_modules_load();
> +   if (!_no_system_modules)
> +     ecore_system_modules_load();
>
>     eina_log_timing(_ecore_log_dom,
>                    EINA_LOG_STATE_STOP,
>
> --
>
>
>
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to