Re: [E-devel] [EGIT] [misc/entrance] master 04/09: entrance: Updated the user settings
Really ??? You break one more time settings of background. You get the main background not user background ... I really think a revert of all your patch could be a better solution. None have a good quality, I really think you are coding without understanding of what you are doing. 2014-04-02 17:55 GMT+02:00 Marcel Hollerbach : > bu5hm4n pushed a commit to branch master. > > > http://git.enlightenment.org/misc/entrance.git/commit/?id=573efe360070018b1a1a91c394f78a1410f58ba5 > > commit 573efe360070018b1a1a91c394f78a1410f58ba5 > Author: Marcel Hollerbach > Date: Wed Apr 2 12:24:43 2014 +0200 > > entrance: Updated the user settings > > - A User can now set a Background and a Icon file ! > > - Images are displayed from pools > --- > src/bin/entrance_conf_user.c | 181 > +-- > 1 file changed, 140 insertions(+), 41 deletions(-) > > diff --git a/src/bin/entrance_conf_user.c b/src/bin/entrance_conf_user.c > index 97ed8d8..6cc4553 100644 > --- a/src/bin/entrance_conf_user.c > +++ b/src/bin/entrance_conf_user.c > @@ -5,7 +5,6 @@ typedef struct Entrance_Int_Conf_User_ > Entrance_Login *orig; > struct > { > -Evas_Object *preview; > const char *path; > const char *group; > } bg; > @@ -39,17 +38,21 @@ _entrance_conf_user_bg_sel(void *data EINA_UNUSED, > Evas_Object *obj EINA_UNUSED, > { > Entrance_Conf_Background *cbg; > cbg = elm_object_item_data_get(event_info); > - if (!elm_layout_file_set(_entrance_int_conf_user->bg.preview, > - cbg->path, cbg->group)) > - { > -PT("Error on loading "); > -fprintf(stderr, "%s %s\n", cbg->path, cbg->group); > - } > _entrance_int_conf_user->bg.path = cbg->path; > _entrance_int_conf_user->bg.group = cbg->group; > entrance_conf_changed(); > } > > +static void > +_entrance_conf_user_icon_sel(void *data EINA_UNUSED, Evas_Object *obj > EINA_UNUSED, void *event_info) > +{ > + Entrance_Conf_Background *cbg; > + cbg = elm_object_item_data_get(event_info); > + _entrance_int_conf_user->image.path = cbg->path; > + _entrance_int_conf_user->image.group = cbg->group; > + entrance_conf_changed(); > +} > + > static Eina_Bool > _entrance_conf_user_bg_fill_cb(void *data, Elm_Object_Item *it) > { > @@ -57,17 +60,41 @@ _entrance_conf_user_bg_fill_cb(void *data, > Elm_Object_Item *it) > const char *bg_path, *bg_group; > cbg = data; > > - bg_path = _entrance_int_conf_user->orig->bg.path; > - bg_group = _entrance_int_conf_user->orig->bg.group; > - if ((cbg->path) > - && (cbg->group) > - && (bg_path) > - && (bg_group) > - && (!strcmp(cbg->path, bg_path)) > - && (!strcmp(cbg->group, bg_group))) > + entrance_gui_background_get(&bg_path, &bg_group); > + if (((cbg->path) && (bg_path) > + && (!strcmp(cbg->path, bg_path))) || > + ((!cbg->path) && (!bg_path))) > { > -elm_genlist_item_selected_set(it, EINA_TRUE); > -return EINA_TRUE; > +if (((cbg->group) && (bg_group) > + && (!strcmp(cbg->group, bg_group))) || > +((!cbg->group) && (!bg_group))) > + { > + elm_gengrid_item_selected_set(it, EINA_TRUE); > + return EINA_TRUE; > + } > + } > + return EINA_FALSE; > +} > + > +static Eina_Bool > +_entrance_conf_user_icon_fill_cb(void *data, Elm_Object_Item *it) > +{ > + Entrance_Conf_Background *cbg; > + const char *bg_path, *bg_group; > + cbg = data; > + bg_path = _entrance_int_conf_user->orig->image.path; > + bg_group = _entrance_int_conf_user->orig->image.group; > + if (((cbg->path) && (bg_path) > + && (!strcmp(cbg->path, bg_path))) || > + ((!cbg->path) && (!bg_path))) > + { > +if (((cbg->group) && (bg_group) > + && (!strcmp(cbg->group, bg_group))) || > +((!cbg->group) && (!bg_group))) > + { > + elm_gengrid_item_selected_set(it, EINA_TRUE); > + return EINA_TRUE; > + } > } > return EINA_FALSE; > } > @@ -179,51 +206,120 @@ static void > _entrance_conf_user_build_cb(Evas_Object *t, Entrance_Login *eu) > { > Evas_Object *o, *gl, *bx, *hbx; > - Eina_List *l; > + Eina_List *l = NULL, *tmp = NULL, *node = NULL; > + Entrance_Conf_Background *img; > int j = 0; > > + hbx = elm_box_add(t); > + evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, > EVAS_HINT_EXPAND); > + evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, EVAS_HINT_FILL); > + elm_box_horizontal_set(hbx, EINA_TRUE); > + elm_table_pack(t, hbx, 0, j, 2, 1); > + evas_object_show(hbx); > + ++j; > + > /* Background */ > + bx = elm_box_add(t); > + evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, > EVAS_HINT_EXPAND); > + evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); > + elm_box_pack_end(hbx, bx); > + evas_object_show(bx
Re: [E-devel] [EGIT] [misc/entrance] master 04/09: entrance: Updated the user settings
On Mon, Apr 07, 2014 at 10:55:40AM +0200, Michaël Bouchaud wrote: > Really ??? > You break one more time settings of background. You get the main One more time ?? > background not user background ... Okay, I will fix that ! > I really think a revert of all your patch could be a better solution. None > have a good quality, I really think you are coding without understanding of > what you are doing. Why ?? There where a few misstakes okay, if you tell me the misstakes I can fix them. I am understanding what I am doing !! (we had this once again, remember the thing with char*[] eh ? eh ?). > > > 2014-04-02 17:55 GMT+02:00 Marcel Hollerbach : > > > bu5hm4n pushed a commit to branch master. > > > > > > http://git.enlightenment.org/misc/entrance.git/commit/?id=573efe360070018b1a1a91c394f78a1410f58ba5 > > > > commit 573efe360070018b1a1a91c394f78a1410f58ba5 > > Author: Marcel Hollerbach > > Date: Wed Apr 2 12:24:43 2014 +0200 > > > > entrance: Updated the user settings > > > > - A User can now set a Background and a Icon file ! > > > > - Images are displayed from pools > > --- > > src/bin/entrance_conf_user.c | 181 > > +-- > > 1 file changed, 140 insertions(+), 41 deletions(-) > > > > diff --git a/src/bin/entrance_conf_user.c b/src/bin/entrance_conf_user.c > > index 97ed8d8..6cc4553 100644 > > --- a/src/bin/entrance_conf_user.c > > +++ b/src/bin/entrance_conf_user.c > > @@ -5,7 +5,6 @@ typedef struct Entrance_Int_Conf_User_ > > Entrance_Login *orig; > > struct > > { > > -Evas_Object *preview; > > const char *path; > > const char *group; > > } bg; > > @@ -39,17 +38,21 @@ _entrance_conf_user_bg_sel(void *data EINA_UNUSED, > > Evas_Object *obj EINA_UNUSED, > > { > > Entrance_Conf_Background *cbg; > > cbg = elm_object_item_data_get(event_info); > > - if (!elm_layout_file_set(_entrance_int_conf_user->bg.preview, > > - cbg->path, cbg->group)) > > - { > > -PT("Error on loading "); > > -fprintf(stderr, "%s %s\n", cbg->path, cbg->group); > > - } > > _entrance_int_conf_user->bg.path = cbg->path; > > _entrance_int_conf_user->bg.group = cbg->group; > > entrance_conf_changed(); > > } > > > > +static void > > +_entrance_conf_user_icon_sel(void *data EINA_UNUSED, Evas_Object *obj > > EINA_UNUSED, void *event_info) > > +{ > > + Entrance_Conf_Background *cbg; > > + cbg = elm_object_item_data_get(event_info); > > + _entrance_int_conf_user->image.path = cbg->path; > > + _entrance_int_conf_user->image.group = cbg->group; > > + entrance_conf_changed(); > > +} > > + > > static Eina_Bool > > _entrance_conf_user_bg_fill_cb(void *data, Elm_Object_Item *it) > > { > > @@ -57,17 +60,41 @@ _entrance_conf_user_bg_fill_cb(void *data, > > Elm_Object_Item *it) > > const char *bg_path, *bg_group; > > cbg = data; > > > > - bg_path = _entrance_int_conf_user->orig->bg.path; > > - bg_group = _entrance_int_conf_user->orig->bg.group; > > - if ((cbg->path) > > - && (cbg->group) > > - && (bg_path) > > - && (bg_group) > > - && (!strcmp(cbg->path, bg_path)) > > - && (!strcmp(cbg->group, bg_group))) > > + entrance_gui_background_get(&bg_path, &bg_group); > > + if (((cbg->path) && (bg_path) > > + && (!strcmp(cbg->path, bg_path))) || > > + ((!cbg->path) && (!bg_path))) > > { > > -elm_genlist_item_selected_set(it, EINA_TRUE); > > -return EINA_TRUE; > > +if (((cbg->group) && (bg_group) > > + && (!strcmp(cbg->group, bg_group))) || > > +((!cbg->group) && (!bg_group))) > > + { > > + elm_gengrid_item_selected_set(it, EINA_TRUE); > > + return EINA_TRUE; > > + } > > + } > > + return EINA_FALSE; > > +} > > + > > +static Eina_Bool > > +_entrance_conf_user_icon_fill_cb(void *data, Elm_Object_Item *it) > > +{ > > + Entrance_Conf_Background *cbg; > > + const char *bg_path, *bg_group; > > + cbg = data; > > + bg_path = _entrance_int_conf_user->orig->image.path; > > + bg_group = _entrance_int_conf_user->orig->image.group; > > + if (((cbg->path) && (bg_path) > > + && (!strcmp(cbg->path, bg_path))) || > > + ((!cbg->path) && (!bg_path))) > > + { > > +if (((cbg->group) && (bg_group) > > + && (!strcmp(cbg->group, bg_group))) || > > +((!cbg->group) && (!bg_group))) > > + { > > + elm_gengrid_item_selected_set(it, EINA_TRUE); > > + return EINA_TRUE; > > + } > > } > > return EINA_FALSE; > > } > > @@ -179,51 +206,120 @@ static void > > _entrance_conf_user_build_cb(Evas_Object *t, Entrance_Login *eu) > > { > > Evas_Object *o, *gl, *bx, *hbx; > > - Eina_List *l; > > + Eina_List *l = NULL, *tmp = NULL, *node = NULL; > > + Entrance_Conf_Background *img; > > int j = 0; > > > > + hbx = el