summaryrefslogtreecommitdiff
path: root/legacy/elementary
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2012-03-28 07:04:14 +0000
committerDaniel Juyung Seo <seojuyung2@gmail.com>2012-03-28 07:04:14 +0000
commitc613f40a8caa05b2460396fab86a8acb970edbe6 (patch)
tree14cba81e57f1de884071bbbe3d30e2d6f57165ed /legacy/elementary
parent09e15ebe0409b41c9a505ee99557ee4294d03248 (diff)
elm slider: Changed format function callback's const char * to char *.
The string will be freed in application's callback later. So 'const' is not appropriate. In elm_slider_indicator_format_function_set and elm_slider_units_format_function_set. SVN revision: 69692
Diffstat (limited to 'legacy/elementary')
-rw-r--r--legacy/elementary/src/lib/elm_slider.c20
-rw-r--r--legacy/elementary/src/lib/elm_slider.h4
2 files changed, 12 insertions, 12 deletions
diff --git a/legacy/elementary/src/lib/elm_slider.c b/legacy/elementary/src/lib/elm_slider.c
index bf9f3b3bc0..6a3719d278 100644
--- a/legacy/elementary/src/lib/elm_slider.c
+++ b/legacy/elementary/src/lib/elm_slider.c
@@ -16,11 +16,11 @@ struct _Widget_Data
16 const char *units; 16 const char *units;
17 const char *indicator; 17 const char *indicator;
18 18
19 const char *(*indicator_format_func)(double val); 19 char *(*indicator_format_func)(double val);
20 void (*indicator_format_free)(const char *str); 20 void (*indicator_format_free)(char *str);
21 21
22 const char *(*units_format_func)(double val); 22 char *(*units_format_func)(double val);
23 void (*units_format_free)(const char *str); 23 void (*units_format_free)(char *str);
24 24
25 double val, val_min, val_max, val2; 25 double val, val_min, val_max, val2;
26 Evas_Coord size; 26 Evas_Coord size;
@@ -348,7 +348,7 @@ _units_set(Evas_Object *obj)
348 if (!wd) return; 348 if (!wd) return;
349 if (wd->units_format_func) 349 if (wd->units_format_func)
350 { 350 {
351 const char *buf; 351 char *buf;
352 buf = wd->units_format_func(wd->val); 352 buf = wd->units_format_func(wd->val);
353 edje_object_part_text_set(wd->slider, "elm.units", buf); 353 edje_object_part_text_set(wd->slider, "elm.units", buf);
354 if (wd->units_format_free) wd->units_format_free(buf); 354 if (wd->units_format_free) wd->units_format_free(buf);
@@ -371,7 +371,7 @@ _indicator_set(Evas_Object *obj)
371 if (!wd) return; 371 if (!wd) return;
372 if (wd->indicator_format_func) 372 if (wd->indicator_format_func)
373 { 373 {
374 const char *buf; 374 char *buf;
375 buf = wd->indicator_format_func(wd->val); 375 buf = wd->indicator_format_func(wd->val);
376 edje_object_part_text_set(wd->slider, "elm.dragable.slider:elm.indicator", buf); 376 edje_object_part_text_set(wd->slider, "elm.dragable.slider:elm.indicator", buf);
377 if (wd->indicator_format_free) wd->indicator_format_free(buf); 377 if (wd->indicator_format_free) wd->indicator_format_free(buf);
@@ -747,8 +747,8 @@ _hash_labels_free_cb(void* label)
747static void 747static void
748_min_max_set(Evas_Object *obj) 748_min_max_set(Evas_Object *obj)
749{ 749{
750 const char *buf_min = NULL; 750 char *buf_min = NULL;
751 const char *buf_max = NULL; 751 char *buf_max = NULL;
752 752
753 Widget_Data *wd = elm_widget_data_get(obj); 753 Widget_Data *wd = elm_widget_data_get(obj);
754 if (!wd) return; 754 if (!wd) return;
@@ -1023,7 +1023,7 @@ elm_slider_inverted_get(const Evas_Object *obj)
1023} 1023}
1024 1024
1025EAPI void 1025EAPI void
1026elm_slider_indicator_format_function_set(Evas_Object *obj, const char *(*func)(double val), void (*free_func)(const char *str)) 1026elm_slider_indicator_format_function_set(Evas_Object *obj, char *(*func)(double val), void (*free_func)(char *str))
1027{ 1027{
1028 ELM_CHECK_WIDTYPE(obj, widtype); 1028 ELM_CHECK_WIDTYPE(obj, widtype);
1029 Widget_Data *wd = elm_widget_data_get(obj); 1029 Widget_Data *wd = elm_widget_data_get(obj);
@@ -1034,7 +1034,7 @@ elm_slider_indicator_format_function_set(Evas_Object *obj, const char *(*func)(d
1034} 1034}
1035 1035
1036EAPI void 1036EAPI void
1037elm_slider_units_format_function_set(Evas_Object *obj, const char *(*func)(double val), void (*free_func)(const char *str)) 1037elm_slider_units_format_function_set(Evas_Object *obj, char *(*func)(double val), void (*free_func)(char *str))
1038{ 1038{
1039 ELM_CHECK_WIDTYPE(obj, widtype); 1039 ELM_CHECK_WIDTYPE(obj, widtype);
1040 Widget_Data *wd = elm_widget_data_get(obj); 1040 Widget_Data *wd = elm_widget_data_get(obj);
diff --git a/legacy/elementary/src/lib/elm_slider.h b/legacy/elementary/src/lib/elm_slider.h
index c42bd09643..4e5d2bf32a 100644
--- a/legacy/elementary/src/lib/elm_slider.h
+++ b/legacy/elementary/src/lib/elm_slider.h
@@ -211,7 +211,7 @@ EAPI const char *elm_slider_indicator_format_get(const Evas_Obj
211 * 211 *
212 * @ingroup Slider 212 * @ingroup Slider
213 */ 213 */
214EAPI void elm_slider_indicator_format_function_set(Evas_Object *obj, const char *(*func)(double val), void (*free_func)(const char *str)); 214EAPI void elm_slider_indicator_format_function_set(Evas_Object *obj, char *(*func)(double val), void (*free_func)(char *str));
215 215
216/** 216/**
217 * Set the format function pointer for the units label 217 * Set the format function pointer for the units label
@@ -226,7 +226,7 @@ EAPI void elm_slider_indicator_format_function_set(Evas_
226 * 226 *
227 * @ingroup Slider 227 * @ingroup Slider
228 */ 228 */
229EAPI void elm_slider_units_format_function_set(Evas_Object *obj, const char *(*func)(double val), void (*free_func)(const char *str)); 229EAPI void elm_slider_units_format_function_set(Evas_Object *obj, char *(*func)(double val), void (*free_func)(char *str));
230 230
231/** 231/**
232 * Set the orientation of a given slider widget. 232 * Set the orientation of a given slider widget.