config: fixed recently added scroll configuration setup issue.
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Fri, 3 May 2013 13:56:05 +0000 (22:56 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Fri, 3 May 2013 13:56:05 +0000 (22:56 +0900)
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.

src/bin/config.c
src/lib/elm_config.c

index 1ed09d6..8fcbda8 100644 (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);
index ecabcf0..3ade1d1 100644 (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;
      }