seoz pushed a commit to branch master.
commit 1d7f7a055861dc77af47a2bf0747432cce132a9a
Author: Daniel Juyung Seo <[email protected]>
Date: Fri May 3 22:56:05 2013 +0900
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.
---
src/bin/config.c | 4 ++--
src/lib/elm_config.c | 8 ++++++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/bin/config.c b/src/bin/config.c
index 1ed09d6..8fcbda8 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -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);
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index ecabcf0..3ade1d1 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -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;
}
--
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2