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)
|
||||
|
||||
* 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
|
||||
_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 */
|
||||
}
|
||||
|
||||
|
|
|
@ -2585,19 +2585,16 @@ 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();
|
||||
|
@ -2607,7 +2604,6 @@ _elm_config_profile_set(const char *profile)
|
|||
_elm_recache();
|
||||
_elm_clouseau_reload();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_elm_config_shutdown(void)
|
||||
|
|
Loading…
Reference in New Issue