config: fixed recently added scroll configuration setup issue.

thumbscroll_min_friction and thumbscroll friction standard were added recently.
So with the previous elementary configuration those values became zero which is not valid.
Now elementary checks whether the value is zero and set the correct default value.
This commit is contained in:
Daniel Juyung Seo 2013-05-03 22:56:05 +09:00
parent 4a568d2bff
commit 204816e393
2 changed files with 10 additions and 2 deletions

View File

@ -2847,7 +2847,7 @@ _status_config_scrolling(Evas_Object *win,
elm_slider_span_size_set(sl, 120);
elm_slider_unit_format_set(sl, "%1.1f");
elm_slider_indicator_format_set(sl, "%1.1f");
elm_slider_min_max_set(sl, 0.0, 15.0);
elm_slider_min_max_set(sl, 0.1, 10.0);
elm_slider_value_set(sl, elm_config_scroll_thumbscroll_friction_get());
elm_box_pack_end(bx, sl);
evas_object_show(sl);
@ -2867,7 +2867,7 @@ _status_config_scrolling(Evas_Object *win,
elm_slider_span_size_set(sl, 120);
elm_slider_unit_format_set(sl, "%1.1f");
elm_slider_indicator_format_set(sl, "%1.1f");
elm_slider_min_max_set(sl, 0.0, 15.0);
elm_slider_min_max_set(sl, 0.1, 10.0);
elm_slider_value_set(sl, elm_config_scroll_thumbscroll_min_friction_get());
elm_box_pack_end(bx, sl);
evas_object_show(sl);

View File

@ -1043,6 +1043,14 @@ _config_load(void)
{
if (_elm_config->config_version < ELM_CONFIG_VERSION)
_config_update();
/* set the default value if the configuration was just added and the
* value is zero which means it was not supported before and invalid. */
if (_elm_config->thumbscroll_min_friction == 0.0)
_elm_config->thumbscroll_min_friction = 0.5;
if (_elm_config->thumbscroll_friction_standard == 0.0)
_elm_config->thumbscroll_friction_standard = 1000.0;
return;
}