forked from enlightenment/enlightenment
fix stringshare usage in wizard language page (010)
lang is not stringshared, and if it were then add/ref should always be called before del
This commit is contained in:
parent
160fb71af0
commit
604bf1ea4e
|
@ -246,8 +246,7 @@ wizard_page_hide(E_Wizard_Page *pg EINA_UNUSED)
|
||||||
{
|
{
|
||||||
// evas_object_del(pg->data);
|
// evas_object_del(pg->data);
|
||||||
/* special - language inits its stuff the moment it goes away */
|
/* special - language inits its stuff the moment it goes away */
|
||||||
eina_stringshare_del(e_config->language);
|
eina_stringshare_replace(&e_config->language, lang);
|
||||||
e_config->language = eina_stringshare_ref(lang);
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
* This should be on lang select,
|
* This should be on lang select,
|
||||||
* so if next page needs xdg we can't press next */
|
* so if next page needs xdg we can't press next */
|
||||||
|
@ -262,8 +261,7 @@ E_API int
|
||||||
wizard_page_apply(E_Wizard_Page *pg EINA_UNUSED)
|
wizard_page_apply(E_Wizard_Page *pg EINA_UNUSED)
|
||||||
{
|
{
|
||||||
// do this again as we want it to apply to the new profile
|
// do this again as we want it to apply to the new profile
|
||||||
eina_stringshare_del(e_config->language);
|
eina_stringshare_replace(&e_config->language, lang);
|
||||||
e_config->language = eina_stringshare_ref(lang);
|
|
||||||
e_intl_language_set(e_config->language);
|
e_intl_language_set(e_config->language);
|
||||||
e_wizard_labels_update();
|
e_wizard_labels_update();
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue