entrance: the config panels are refreshing their content
This commit is contained in:
parent
6595f25cc0
commit
768cb94854
|
@ -14,6 +14,7 @@ typedef struct Entrance_Int_Conf_Main_
|
||||||
double scale;
|
double scale;
|
||||||
Eina_Bool vkbd_enabled : 1;
|
Eina_Bool vkbd_enabled : 1;
|
||||||
Eina_Bool update : 1;
|
Eina_Bool update : 1;
|
||||||
|
Evas_Object *list;
|
||||||
} Entrance_Int_Conf_Main;
|
} Entrance_Int_Conf_Main;
|
||||||
|
|
||||||
static void _entrance_conf_main_begin(void);
|
static void _entrance_conf_main_begin(void);
|
||||||
|
@ -188,7 +189,7 @@ _entrance_conf_main_build(Evas_Object *obj)
|
||||||
elm_box_pack_end(bx, o);
|
elm_box_pack_end(bx, o);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
o = elm_gengrid_add(obj);
|
_entrance_int_conf_main->list = o = elm_gengrid_add(obj);
|
||||||
elm_gengrid_item_size_set(o,
|
elm_gengrid_item_size_set(o,
|
||||||
elm_config_scale_get() * 150,
|
elm_config_scale_get() * 150,
|
||||||
elm_config_scale_get() * 150);
|
elm_config_scale_get() * 150);
|
||||||
|
@ -338,10 +339,20 @@ _entrance_conf_main_apply(void)
|
||||||
entrance_gui_conf_set(&conf);
|
entrance_gui_conf_set(&conf);
|
||||||
entrance_connect_conf_gui_send(&conf);
|
entrance_connect_conf_gui_send(&conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_entrance_conf_main_renew(void)
|
_entrance_conf_main_renew(void)
|
||||||
{
|
{
|
||||||
|
Eina_List *s_bg, *t_bg, *l = NULL;
|
||||||
|
s_bg = entrance_gui_background_pool_get();
|
||||||
|
t_bg = entrance_gui_theme_backgrounds();
|
||||||
|
|
||||||
|
elm_gengrid_clear(_entrance_int_conf_main->list);
|
||||||
|
IMG_LIST_FORK(s_bg, l);
|
||||||
|
IMG_LIST_FORK(t_bg, l);
|
||||||
|
entrance_fill(_entrance_int_conf_main->list, entrance_conf_background_fill_get(),
|
||||||
|
l, _entrance_conf_bg_fill_cb,
|
||||||
|
_entrance_conf_bg_sel, _entrance_int_conf_main->list);
|
||||||
|
eina_list_free(l);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -16,6 +16,8 @@ typedef struct Entrance_Int_Conf_User_
|
||||||
const char *lsess;
|
const char *lsess;
|
||||||
Eina_Bool remember_session : 1;
|
Eina_Bool remember_session : 1;
|
||||||
Eina_Bool update : 1;
|
Eina_Bool update : 1;
|
||||||
|
Evas_Object *ic_list;
|
||||||
|
Evas_Object *bg_list;
|
||||||
} Entrance_Int_Conf_User;
|
} Entrance_Int_Conf_User;
|
||||||
|
|
||||||
|
|
||||||
|
@ -330,7 +332,7 @@ _entrance_conf_user_build_cb(Evas_Object *t, Entrance_Login *eu)
|
||||||
elm_box_pack_end(bx, o);
|
elm_box_pack_end(bx, o);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
gl = elm_gengrid_add(t);
|
_entrance_int_conf_user->bg_list = gl = elm_gengrid_add(t);
|
||||||
elm_scroller_bounce_set(gl, EINA_FALSE, EINA_TRUE);
|
elm_scroller_bounce_set(gl, EINA_FALSE, EINA_TRUE);
|
||||||
evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
@ -368,7 +370,7 @@ _entrance_conf_user_build_cb(Evas_Object *t, Entrance_Login *eu)
|
||||||
elm_box_pack_end(bx, o);
|
elm_box_pack_end(bx, o);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
gl = elm_gengrid_add(t);
|
_entrance_int_conf_user->ic_list = gl = elm_gengrid_add(t);
|
||||||
elm_scroller_bounce_set(gl, EINA_FALSE, EINA_TRUE);
|
elm_scroller_bounce_set(gl, EINA_FALSE, EINA_TRUE);
|
||||||
evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
@ -482,6 +484,36 @@ _entrance_conf_user_apply(void)
|
||||||
static void
|
static void
|
||||||
_entrance_conf_user_renew(void)
|
_entrance_conf_user_renew(void)
|
||||||
{
|
{
|
||||||
|
Entrance_Conf_Background *img;
|
||||||
|
Eina_List *l = NULL;
|
||||||
|
|
||||||
|
if (!_entrance_int_conf_user->orig) /* no one is logged in */
|
||||||
|
return;
|
||||||
|
|
||||||
|
elm_gengrid_clear(_entrance_int_conf_user->bg_list);
|
||||||
|
elm_gengrid_clear(_entrance_int_conf_user->ic_list);
|
||||||
|
|
||||||
|
img = calloc(1, sizeof(Entrance_Conf_Background));
|
||||||
|
img->name = eina_stringshare_add("None");
|
||||||
|
l = eina_list_append(l, img);
|
||||||
|
IMG_LIST_FORK(entrance_gui_background_pool_get(), l);
|
||||||
|
IMG_LIST_FORK(entrance_gui_theme_backgrounds(), l);
|
||||||
|
IMG_LIST_FORK(_entrance_int_conf_user->orig->background_pool, l);
|
||||||
|
entrance_fill(_entrance_int_conf_user->bg_list,
|
||||||
|
entrance_conf_background_fill_get(),
|
||||||
|
l, _entrance_conf_user_bg_fill_cb,
|
||||||
|
_entrance_conf_user_bg_sel, NULL);
|
||||||
|
eina_list_free(l);
|
||||||
|
l = NULL;
|
||||||
|
|
||||||
|
IMG_LIST_FORK(entrance_gui_background_pool_get(), l);
|
||||||
|
IMG_LIST_FORK(entrance_gui_theme_backgrounds(), l);
|
||||||
|
IMG_LIST_FORK(_entrance_int_conf_user->orig->background_pool, l);
|
||||||
|
entrance_fill(_entrance_int_conf_user->ic_list,
|
||||||
|
entrance_conf_background_fill_get(),
|
||||||
|
l, _entrance_conf_user_bg_fill_cb,
|
||||||
|
_entrance_conf_user_bg_sel, NULL);
|
||||||
|
eina_list_free(l);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue