diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index 1695f01d04..ea24b35cad 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -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 diff --git a/legacy/elementary/src/bin/config.c b/legacy/elementary/src/bin/config.c index 450ca1cf6a..29b226c818 100644 --- a/legacy/elementary/src/bin/config.c +++ b/legacy/elementary/src/bin/config.c @@ -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 */ } diff --git a/legacy/elementary/src/lib/elm_config.c b/legacy/elementary/src/lib/elm_config.c index df7442a182..2fcb6f0456 100644 --- a/legacy/elementary/src/lib/elm_config.c +++ b/legacy/elementary/src/lib/elm_config.c @@ -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