summaryrefslogtreecommitdiff
path: root/legacy/elementary
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2012-03-28 08:42:13 +0000
committerDaniel Juyung Seo <seojuyung2@gmail.com>2012-03-28 08:42:13 +0000
commitd71a77419a802aad54d2c1b252beedd2ad3a995a (patch)
tree9a025109393fcdf220a4a707aa6fc0441822a00c /legacy/elementary
parent939ee710a9e0b92d756cf1e66af85e9a4f2ee697 (diff)
elm elc_player.c: Fixed slider usage.
SVN revision: 69697
Diffstat (limited to 'legacy/elementary')
-rw-r--r--legacy/elementary/src/lib/elc_player.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/legacy/elementary/src/lib/elc_player.c b/legacy/elementary/src/lib/elc_player.c
index 05184e4446..a6ef91ca9f 100644
--- a/legacy/elementary/src/lib/elc_player.c
+++ b/legacy/elementary/src/lib/elc_player.c
@@ -427,7 +427,7 @@ _player_button_add(Evas_Object *parent, Evas_Object *obj, Evas_Object *layout, c
427 return bt; 427 return bt;
428} 428}
429 429
430static const char * 430static char *
431_double_to_time(double value) 431_double_to_time(double value)
432{ 432{
433 char buf[256]; 433 char buf[256];
@@ -447,7 +447,13 @@ _double_to_time(double value)
447 snprintf(buf, sizeof(buf), "%02i.%02i", 447 snprintf(buf, sizeof(buf), "%02i.%02i",
448 ps, pf); 448 ps, pf);
449 449
450 return eina_stringshare_add(buf); 450 return (char *)eina_stringshare_add(buf);
451}
452
453static void
454_value_free(char *data)
455{
456 eina_stringshare_del(data);
451} 457}
452#endif 458#endif
453 459
@@ -555,8 +561,8 @@ elm_player_add(Evas_Object *parent)
555 561
556 wd->slider = elm_slider_add(parent); 562 wd->slider = elm_slider_add(parent);
557 elm_widget_sub_object_add(obj, wd->slider); 563 elm_widget_sub_object_add(obj, wd->slider);
558 elm_slider_indicator_format_function_set(wd->slider, _double_to_time, eina_stringshare_del); 564 elm_slider_indicator_format_function_set(wd->slider, _double_to_time, _value_free);
559 elm_slider_units_format_function_set(wd->slider, _double_to_time, eina_stringshare_del); 565 elm_slider_units_format_function_set(wd->slider, _double_to_time, _value_free);
560 elm_slider_min_max_set(wd->slider, 0, 0); 566 elm_slider_min_max_set(wd->slider, 0, 0);
561 elm_slider_value_set(wd->slider, 0); 567 elm_slider_value_set(wd->slider, 0);
562 elm_object_disabled_set(wd->slider, EINA_TRUE); 568 elm_object_disabled_set(wd->slider, EINA_TRUE);