what did you want to display in this conf log panel ?
Split your patch !!!


2014-04-06 21:23 GMT+02:00 Marcel Hollerbach <[email protected]>:

> bu5hm4n pushed a commit to branch master.
>
>
> http://git.enlightenment.org/misc/entrance.git/commit/?id=1539a34296d9bf04a4d17a54ce0060c9f6bba380
>
> commit 1539a34296d9bf04a4d17a54ce0060c9f6bba380
> Author: Marcel Hollerbach <[email protected]>
> Date:   Sun Apr 6 21:21:08 2014 +0200
>
>     entrance: Changed the Settingspane
>
>     - Themeselector & Log is a new place in the segment control. It is less
>       confusing if there is just one place where you can click throuw the
>       settings!
>
>     - Moved background and general Settings back into one pane.
> ---
>  src/bin/Makefile.am           |   4 +
>  src/bin/entrance_client.h     |   2 +
>  src/bin/entrance_conf.c       |   4 +
>  src/bin/entrance_conf_log.c   |  62 ++++++++++++++
>  src/bin/entrance_conf_log.h   |   7 ++
>  src/bin/entrance_conf_main.c  | 190
> ++++++++++++++----------------------------
>  src/bin/entrance_conf_theme.c |  74 ++++++++++++++++
>  src/bin/entrance_conf_theme.h |   7 ++
>  8 files changed, 221 insertions(+), 129 deletions(-)
>
> diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
> index 1124e5a..a47667b 100644
> --- a/src/bin/Makefile.am
> +++ b/src/bin/Makefile.am
> @@ -20,6 +20,10 @@ entrance_conf.h           \
>  entrance_conf.c           \
>  entrance_conf_main.h      \
>  entrance_conf_main.c      \
> +entrance_conf_theme.h     \
> +entrance_conf_theme.c     \
> +entrance_conf_log.h       \
> +entrance_conf_log.c       \
>  entrance_conf_user.h      \
>  entrance_conf_user.c      \
>  entrance_connect.h        \
> diff --git a/src/bin/entrance_client.h b/src/bin/entrance_client.h
> index ed2113a..d0728b7 100644
> --- a/src/bin/entrance_client.h
> +++ b/src/bin/entrance_client.h
> @@ -14,6 +14,8 @@
>  #include "entrance_fill.h"
>  #include "entrance_conf.h"
>  #include "entrance_conf_main.h"
> +#include "entrance_conf_log.h"
> +#include "entrance_conf_theme.h"
>  #include "entrance_conf_user.h"
>  #include "entrance_connect.h"
>  #include "entrance_client.h"
> diff --git a/src/bin/entrance_conf.c b/src/bin/entrance_conf.c
> index 37a1a9d..41427ba 100644
> --- a/src/bin/entrance_conf.c
> +++ b/src/bin/entrance_conf.c
> @@ -209,6 +209,8 @@ entrance_conf_init(void)
>
>     entrance_conf_main_init();
>     entrance_conf_user_init();
> +   entrance_conf_theme_init();
> +   entrance_conf_log_init();
>  }
>
>  void
> @@ -219,6 +221,8 @@ entrance_conf_shutdown(void)
>     PT("conf shutdown\n");
>     entrance_conf_user_shutdown();
>     entrance_conf_main_shutdown();
> +   entrance_conf_theme_shutdown();
> +   entrance_conf_log_shutdown();
>     EINA_LIST_FREE(_entrance_conf->modules, conf)
>       {
>          eina_stringshare_del(conf->label);
> diff --git a/src/bin/entrance_conf_log.c b/src/bin/entrance_conf_log.c
> new file mode 100644
> index 0000000..ab4a569
> --- /dev/null
> +++ b/src/bin/entrance_conf_log.c
> @@ -0,0 +1,62 @@
> +#include "entrance_client.h"
> +
> +static void _entrance_conf_log_begin(void);
> +static void _entrance_conf_log_end(void);
> +static Evas_Object *_entrance_conf_log_build(Evas_Object *obj);
> +static Eina_Bool _entrance_conf_log_check(void);
> +static void _entrance_conf_log_apply(void);
> +
> +static void
> +_entrance_conf_log_begin(void)
> +{
> +
> +}
> +
> +static void
> +_entrance_conf_log_end(void)
> +{
> +
> +}
> +
> +static Evas_Object *
> +_entrance_conf_log_build(Evas_Object *obj)
> +{
> +   Evas_Object *o;
> +   /* Graphical Log */
> +   o = elm_label_add(obj);
> +   elm_object_text_set(o, "TODO Implement graphical Log !");
> +   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0);
> +   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> +   return o;
> +}
> +
> +static Eina_Bool
> +_entrance_conf_log_check(void)
> +{
> +   return 0;
> +}
> +
> +static void
> +_entrance_conf_log_apply(void)
> +{
> +}
> +
> +
> +void
> +entrance_conf_log_init(void)
> +{
> +   PT("conf grapical log init\n");
> +   entrance_conf_module_register("Log",
> +                                 _entrance_conf_log_begin,
> +                                 _entrance_conf_log_end,
> +                                 _entrance_conf_log_build,
> +                                 _entrance_conf_log_check,
> +                                 _entrance_conf_log_apply);
> +}
> +
> +void
> +entrance_conf_log_shutdown(void)
> +{
> +   PT("conf log shutdown\n");
> +}
> +
> diff --git a/src/bin/entrance_conf_log.h b/src/bin/entrance_conf_log.h
> new file mode 100644
> index 0000000..d1ead6b
> --- /dev/null
> +++ b/src/bin/entrance_conf_log.h
> @@ -0,0 +1,7 @@
> +#ifndef ENTRANCE_CONF_LOG_H_
> +#define ENTRANCE_CONF_LOG_H_
> +
> +void entrance_conf_log_init(void);
> +void entrance_conf_log_shutdown(void);
> +
> +#endif /* ENTRANCE_CONF_MAIN_H_ */
> diff --git a/src/bin/entrance_conf_main.c b/src/bin/entrance_conf_main.c
> index 9cf2efb..3f0c086 100644
> --- a/src/bin/entrance_conf_main.c
> +++ b/src/bin/entrance_conf_main.c
> @@ -102,31 +102,78 @@ _entrance_conf_scale_changed(void *data EINA_UNUSED,
> Evas_Object *obj, void *eve
>     entrance_conf_changed();
>  }
>
> -static void
> -_entrance_conf_toolbar_click(void *data, Evas_Object *obj EINA_UNUSED,
> void *event_info EINA_UNUSED)
> +static Evas_Object *
> +_entrance_conf_main_build(Evas_Object *obj)
>  {
> -   Evas_Object *o = data, *old;
> +   Evas_Object *tb, *bx_over, *o, *bx, *t;
> +   Eina_List *s_bg, *t_bg, *tmp = NULL, *node = NULL;
>
> -   Eina_List *childs =
> elm_box_children_get(_entrance_int_conf_main->display_area);
> -   old = eina_list_data_get(childs);
> -   elm_box_unpack(_entrance_int_conf_main->display_area, old);
>
> -   evas_object_hide(old);
> +   /*Main Frame*/
> +   o = bx_over = elm_box_add(obj);
> +   elm_box_horizontal_set(o, EINA_TRUE);
> +   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND,
> EVAS_HINT_EXPAND);
> +   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> +   evas_object_show(o);
>
> -   elm_box_pack_end(_entrance_int_conf_main->display_area, o);
> +   o = tb = elm_toolbar_add(obj);
> +   evas_object_size_hint_weight_set(o, 0, EVAS_HINT_EXPAND);
> +   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> +   elm_toolbar_horizontal_set(o, EINA_FALSE);
> +   elm_toolbar_select_mode_set(o, ELM_OBJECT_SELECT_MODE_ALWAYS);
> +   elm_toolbar_shrink_mode_set(o, ELM_TOOLBAR_SHRINK_SCROLL);
> +   elm_toolbar_homogeneous_set(o, EINA_FALSE);
> +   elm_box_pack_end(bx_over, o);
>     evas_object_show(o);
> -}
>
> -static Evas_Object*
> -_entrance_conf_main_general(Evas_Object *obj)
> -{
> -   Evas_Object *t, *o;
> +   o = bx = elm_box_add(obj);
> +   elm_box_horizontal_set(o, EINA_FALSE);
> +   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND,
> EVAS_HINT_EXPAND);
> +   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> +   elm_box_pack_end(bx_over, o);
> +   evas_object_show(o);
> +
> +   o = elm_label_add(obj);
> +   elm_object_text_set(o, "Background");
> +   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0);
> +   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> +   elm_box_pack_end(bx, o);
> +   evas_object_show(o);
> +
> +   o = elm_gengrid_add(obj);
> +   elm_gengrid_item_size_set(o,
> +                             elm_config_scale_get() * 150,
> +                             elm_config_scale_get() * 150);
> +   elm_gengrid_group_item_size_set(o,
> +                                   elm_config_scale_get() * 31,
> +                                   elm_config_scale_get() * 31);
> +   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND,
> EVAS_HINT_EXPAND);
> +   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> +   elm_box_pack_end(bx, o);
> +   evas_object_show(o);
> +
> +   s_bg = entrance_gui_background_pool_get();
> +   t_bg = entrance_gui_theme_backgrounds();
> +
> +#define LIST_FILL(list) \
> +   tmp = NULL; \
> +   IMG_LIST_FORK(list, tmp); \
> +   entrance_fill(o, entrance_conf_background_fill_get(),\
> +                 tmp, _entrance_conf_bg_fill_cb,\
> +                 _entrance_conf_bg_sel, o);
> +
> +   LIST_FILL(s_bg);
> +   LIST_FILL(t_bg);
> +
> +#undef LIST_FILL
>
>     /* General */
>     t = elm_table_add(obj);
>     elm_table_padding_set(t, 0, 0);
> -   evas_object_size_hint_weight_set(t, EVAS_HINT_EXPAND,
> EVAS_HINT_EXPAND);
> +   evas_object_size_hint_weight_set(t, EVAS_HINT_EXPAND, 0);
>     evas_object_size_hint_align_set(t, EVAS_HINT_FILL, EVAS_HINT_FILL);
> +   elm_box_pack_end(bx, t);
> +   evas_object_show(t);
>
>     /* Touch Screen */
>     o = elm_label_add(obj);
> @@ -189,121 +236,6 @@ _entrance_conf_main_general(Evas_Object *obj)
>
>     elm_table_pack(t, o, 1, 2, 1, 1);
>     evas_object_show(o);
> -   return t;
> -}
> -
> -static Evas_Object*
> -_entrance_conf_main_background(Evas_Object *obj)
> -{
> -   Evas_Object *o, *bx;
> -   Eina_List *s_bg, *t_bg, *tmp = NULL, *node = NULL;
> -
> -   o = bx = elm_box_add(obj);
> -   elm_box_horizontal_set(o, EINA_FALSE);
> -   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND,
> EVAS_HINT_EXPAND);
> -   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> -
> -   o = elm_label_add(obj);
> -   elm_object_text_set(o, "Background");
> -   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0);
> -   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> -   elm_box_pack_end(bx, o);
> -   evas_object_show(o);
> -
> -   o = elm_gengrid_add(obj);
> -   elm_gengrid_item_size_set(o,
> -                             elm_config_scale_get() * 150,
> -                             elm_config_scale_get() * 150);
> -   elm_gengrid_group_item_size_set(o,
> -                                   elm_config_scale_get() * 31,
> -                                   elm_config_scale_get() * 31);
> -   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND,
> EVAS_HINT_EXPAND);
> -   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> -   elm_box_pack_end(bx, o);
> -   evas_object_show(o);
> -
> -   s_bg = entrance_gui_background_pool_get();
> -   t_bg = entrance_gui_theme_backgrounds();
> -
> -#define LIST_FILL(list) \
> -   tmp = NULL; \
> -   IMG_LIST_FORK(list, tmp); \
> -   entrance_fill(o, entrance_conf_background_fill_get(),\
> -                 tmp, _entrance_conf_bg_fill_cb,\
> -                 _entrance_conf_bg_sel, o);
> -
> -   LIST_FILL(s_bg);
> -   LIST_FILL(t_bg);
> -
> -#undef LIST_FILL
> -
> -   return bx;
> -}
> -
> -static Evas_Object*
> -_entrance_conf_main_themesel(Evas_Object *obj)
> -{
> -   Evas_Object *o;
> -   /* Theme selector */
> -   o = elm_label_add(obj);
> -   elm_object_text_set(o, "TODO Implement theme selector!");
> -   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0);
> -   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> -   return o;
> -}
> -
> -static Evas_Object*
> -_entrance_conf_main_graph_log(Evas_Object *obj)
> -{
> -   Evas_Object *o;
> -   /* Graphical Log */
> -   o = elm_label_add(obj);
> -   elm_object_text_set(o, "TODO Implement Graphical Log !");
> -   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0);
> -   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> -   return o;
> -}
> -
> -static Evas_Object *
> -_entrance_conf_main_build(Evas_Object *obj)
> -{
> -   Evas_Object *tb, *bx_over, *o, *bx;
> -
> -   /*Main Frame*/
> -   o = bx_over = elm_box_add(obj);
> -   elm_box_horizontal_set(o, EINA_TRUE);
> -   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND,
> EVAS_HINT_EXPAND);
> -   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> -   evas_object_show(o);
> -
> -   o = tb = elm_toolbar_add(obj);
> -   evas_object_size_hint_weight_set(o, 0, EVAS_HINT_EXPAND);
> -   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> -   elm_toolbar_horizontal_set(o, EINA_FALSE);
> -   elm_toolbar_select_mode_set(o, ELM_OBJECT_SELECT_MODE_ALWAYS);
> -   elm_toolbar_shrink_mode_set(o, ELM_TOOLBAR_SHRINK_SCROLL);
> -   elm_toolbar_homogeneous_set(o, EINA_FALSE);
> -   elm_box_pack_end(bx_over, o);
> -   evas_object_show(o);
> -
> -   o = bx = elm_box_add(obj);
> -   elm_box_horizontal_set(o, EINA_TRUE);
> -   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND,
> EVAS_HINT_EXPAND);
> -   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> -   elm_box_pack_end(bx_over, o);
> -   evas_object_show(o);
> -
> -   _entrance_int_conf_main->display_area = o;
> -
> -   elm_toolbar_item_append(tb, NULL, "General",
> -       _entrance_conf_toolbar_click, _entrance_conf_main_general(obj));
> -   elm_toolbar_item_append(tb, NULL, "Background",
> -       _entrance_conf_toolbar_click, _entrance_conf_main_background(obj));
> -   elm_toolbar_item_append(tb, NULL, "Theme",
> -       _entrance_conf_toolbar_click, _entrance_conf_main_themesel(obj));
> -   elm_toolbar_item_append(tb, NULL, "Log",
> -       _entrance_conf_toolbar_click, _entrance_conf_main_graph_log(obj));
> -
>     return bx_over;
>  }
>
> diff --git a/src/bin/entrance_conf_theme.c b/src/bin/entrance_conf_theme.c
> new file mode 100644
> index 0000000..6528bf2
> --- /dev/null
> +++ b/src/bin/entrance_conf_theme.c
> @@ -0,0 +1,74 @@
> +#include "entrance_client.h"
> +
> +typedef struct Entrance_Int_Conf_Theme_
> +{
> +   const char *theme;
> +} Entrance_Int_Conf_Theme;
> +
> +static void _entrance_conf_theme_begin(void);
> +static void _entrance_conf_theme_end(void);
> +static Evas_Object *_entrance_conf_theme_build(Evas_Object *obj);
> +static Eina_Bool _entrance_conf_theme_check(void);
> +static void _entrance_conf_theme_apply(void);
> +
> +static Entrance_Int_Conf_Theme *_entrance_int_conf_theme = NULL;
> +
> +
> +static void
> +_entrance_conf_theme_begin(void)
> +{
> +   _entrance_int_conf_theme = calloc(1, sizeof(Entrance_Int_Conf_Theme));
> +   _entrance_int_conf_theme->theme = entrance_gui_theme_name_get();
> +}
> +
> +static void
> +_entrance_conf_theme_end(void)
> +{
> +   free(_entrance_int_conf_theme);
> +}
> +
> +
> +static Evas_Object *
> +_entrance_conf_theme_build(Evas_Object *obj)
> +{
> +   Evas_Object *o;
> +   /* Graphical Log */
> +   o = elm_label_add(obj);
> +   elm_object_text_set(o, "TODO Implement Theme Selector !");
> +   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0);
> +   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
> +
> +  return o;
> +}
> +
> +static Eina_Bool
> +_entrance_conf_theme_check(void)
> +{
> +   return !!((_entrance_int_conf_theme->theme !=
> entrance_gui_theme_name_get()));
> +}
> +
> +static void
> +_entrance_conf_theme_apply(void)
> +{
> +   //TODO save the correct theme
> +}
> +
> +
> +void
> +entrance_conf_theme_init(void)
> +{
> +   PT("conf theme init\n");
> +   entrance_conf_module_register("Theme Selector",
> +                                 _entrance_conf_theme_begin,
> +                                 _entrance_conf_theme_end,
> +                                 _entrance_conf_theme_build,
> +                                 _entrance_conf_theme_check,
> +                                 _entrance_conf_theme_apply);
> +}
> +
> +void
> +entrance_conf_theme_shutdown(void)
> +{
> +   PT("conf theme shutdown\n");
> +}
> +
> diff --git a/src/bin/entrance_conf_theme.h b/src/bin/entrance_conf_theme.h
> new file mode 100644
> index 0000000..da5c69d
> --- /dev/null
> +++ b/src/bin/entrance_conf_theme.h
> @@ -0,0 +1,7 @@
> +#ifndef ENTRANCE_CONF_THEME_H_
> +#define ENTRANCE_CONF_THEME_H_
> +
> +void entrance_conf_theme_init(void);
> +void entrance_conf_theme_shutdown(void);
> +
> +#endif /* ENTRANCE_CONF_MAIN_H_ */
>
> --
>
>
>


-- 
Michaël Bouchaud (yoz) <[email protected]>
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees_APR
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to