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:
Ryuan Choi 2013-09-04 10:09:37 +09:00
parent 206d4603c6
commit 763eb220af
3 changed files with 17 additions and 26 deletions

View File

@ -1585,3 +1585,7 @@
2013-09-02 ChunEon Park (Hermet)
* 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

View File

@ -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
_config_all_changed(void *data,
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 */
_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_save(); /* make sure new profile has its data dir */
}
@ -1370,8 +1361,8 @@ _profile_reset(void *data,
elm_config_reload();
_profile_change_do(elm_object_top_widget_get(li), curr);
elm_config_all_flush();
_config_display_update(elm_object_top_widget_get(li));
elm_config_save(); /* make sure new profile has its data dir */
}

View File

@ -2585,28 +2585,24 @@ elm_config_indicator_service_get(int rotation)
void
_elm_config_profile_set(const char *profile)
{
Eina_Bool changed = EINA_FALSE;
if (_elm_profile)
{
if (strcmp(_elm_profile, profile))
changed = 1;
if (!strcmp(_elm_profile, profile))
return;
free(_elm_profile);
}
_elm_profile = strdup(profile);
if (changed)
{
_config_free(_elm_config);
_elm_config = NULL;
_config_load();
_config_apply();
_elm_config_font_overlay_apply();
_elm_rescale();
_elm_recache();
_elm_clouseau_reload();
}
_config_free(_elm_config);
_elm_config = NULL;
_config_load();
_config_apply();
_elm_config_font_overlay_apply();
_elm_rescale();
_elm_recache();
_elm_clouseau_reload();
}
void