forked from enlightenment/efl
elm_config : profile may be broken when clicked reset button in profiles tab
elm_config_profile_set should not free _elm_config_profile when _elm_config_profile is passed as parameter such as elm_config_profile_set(elm_config_profile_get()); In addition, removed this dumb calls from elementary_config.
This commit is contained in:
parent
206d4603c6
commit
763eb220af
|
@ -1585,3 +1585,7 @@
|
||||||
2013-09-02 ChunEon Park (Hermet)
|
2013-09-02 ChunEon Park (Hermet)
|
||||||
|
|
||||||
* Widget: Introduce elm_object_item_object_get() API.
|
* Widget: Introduce elm_object_item_object_get() API.
|
||||||
|
|
||||||
|
2013-09-04 Ryuan Choi (ryuan)
|
||||||
|
|
||||||
|
* elm_config : profile may be broken when clicked reset button in profiles tab
|
||||||
|
|
|
@ -1270,15 +1270,6 @@ _config_display_update(Evas_Object *win)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_profile_change_do(Evas_Object *win,
|
|
||||||
const char *profile)
|
|
||||||
{
|
|
||||||
elm_config_profile_set(profile);
|
|
||||||
elm_config_all_flush();
|
|
||||||
_config_display_update(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_config_all_changed(void *data,
|
_config_all_changed(void *data,
|
||||||
int ev_type EINA_UNUSED,
|
int ev_type EINA_UNUSED,
|
||||||
|
@ -1332,7 +1323,7 @@ _profile_use(void *data,
|
||||||
|
|
||||||
elm_config_profile_set(selection); /* just here to update info for getters below */
|
elm_config_profile_set(selection); /* just here to update info for getters below */
|
||||||
|
|
||||||
_profile_change_do(elm_object_top_widget_get(li), selection);
|
_config_display_update(elm_object_top_widget_get(li));
|
||||||
elm_config_all_flush();
|
elm_config_all_flush();
|
||||||
elm_config_save(); /* make sure new profile has its data dir */
|
elm_config_save(); /* make sure new profile has its data dir */
|
||||||
}
|
}
|
||||||
|
@ -1370,8 +1361,8 @@ _profile_reset(void *data,
|
||||||
|
|
||||||
elm_config_reload();
|
elm_config_reload();
|
||||||
|
|
||||||
_profile_change_do(elm_object_top_widget_get(li), curr);
|
|
||||||
elm_config_all_flush();
|
elm_config_all_flush();
|
||||||
|
_config_display_update(elm_object_top_widget_get(li));
|
||||||
elm_config_save(); /* make sure new profile has its data dir */
|
elm_config_save(); /* make sure new profile has its data dir */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2585,28 +2585,24 @@ elm_config_indicator_service_get(int rotation)
|
||||||
void
|
void
|
||||||
_elm_config_profile_set(const char *profile)
|
_elm_config_profile_set(const char *profile)
|
||||||
{
|
{
|
||||||
Eina_Bool changed = EINA_FALSE;
|
|
||||||
|
|
||||||
if (_elm_profile)
|
if (_elm_profile)
|
||||||
{
|
{
|
||||||
if (strcmp(_elm_profile, profile))
|
if (!strcmp(_elm_profile, profile))
|
||||||
changed = 1;
|
return;
|
||||||
|
|
||||||
free(_elm_profile);
|
free(_elm_profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
_elm_profile = strdup(profile);
|
_elm_profile = strdup(profile);
|
||||||
|
|
||||||
if (changed)
|
_config_free(_elm_config);
|
||||||
{
|
_elm_config = NULL;
|
||||||
_config_free(_elm_config);
|
_config_load();
|
||||||
_elm_config = NULL;
|
_config_apply();
|
||||||
_config_load();
|
_elm_config_font_overlay_apply();
|
||||||
_config_apply();
|
_elm_rescale();
|
||||||
_elm_config_font_overlay_apply();
|
_elm_recache();
|
||||||
_elm_rescale();
|
_elm_clouseau_reload();
|
||||||
_elm_recache();
|
|
||||||
_elm_clouseau_reload();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue