summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-11-29 23:28:14 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-11-29 23:28:14 +0900
commit8ee3931cfd0a667465a5268ea1be83ba7dc37381 (patch)
tree6e5954377f7248b090f3109e44f187b7ce13c09a
parent6de31e88b5b299dd1063419b2131402dc789d53e (diff)
slider: Clean up of the previous slider patch.
- This is a first clean up of 65240b5327e5ab1eb8f77835b4729444fe1f02df - Fix wrong version for since tag. - Fix indentation and remove trailing whitespaces. - Make the code more readable. - Remove a unused variable.
-rw-r--r--src/lib/elm_config.h6
-rw-r--r--src/lib/elm_slider.c21
-rw-r--r--src/lib/elm_widget_slider.h3
3 files changed, 12 insertions, 18 deletions
diff --git a/src/lib/elm_config.h b/src/lib/elm_config.h
index 7da1f5872..58bf21b2d 100644
--- a/src/lib/elm_config.h
+++ b/src/lib/elm_config.h
@@ -597,7 +597,7 @@ EAPI void elm_config_focus_autoscroll_mode_set(Elm_Focus_Autoscroll_Mode
597/** 597/**
598 * Slider's indicator visiblity mode. 598 * Slider's indicator visiblity mode.
599 * 599 *
600 * @since 1.12 600 * @since 1.13
601 * @ingroup Slider 601 * @ingroup Slider
602 */ 602 */
603 603
@@ -617,7 +617,7 @@ typedef enum
617 * viewport. 617 * viewport.
618 * 618 *
619 * @ingroup Slider 619 * @ingroup Slider
620 * @since 1.12 620 * @since 1.13
621 */ 621 */
622EAPI void elm_config_slider_indicator_visible_mode_set(Elm_Slider_Indicator_Visible_Mode mode); 622EAPI void elm_config_slider_indicator_visible_mode_set(Elm_Slider_Indicator_Visible_Mode mode);
623 623
@@ -630,7 +630,7 @@ EAPI void elm_config_slider_indicator_visible_mode_set(Elm_Slider_Indicator_Visi
630 * ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE if any of the above is set by user. 630 * ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE if any of the above is set by user.
631 * 631 *
632 * @ingroup Slider 632 * @ingroup Slider
633 * @since 1.12 633 * @since 1.13
634 */ 634 */
635EAPI Elm_Slider_Indicator_Visible_Mode elm_config_slider_indicator_visible_mode_get(void); 635EAPI Elm_Slider_Indicator_Visible_Mode elm_config_slider_indicator_visible_mode_get(void);
636 636
diff --git a/src/lib/elm_slider.c b/src/lib/elm_slider.c
index 6d11d2382..d68e9f1a3 100644
--- a/src/lib/elm_slider.c
+++ b/src/lib/elm_slider.c
@@ -308,7 +308,8 @@ _popup_show(void *data,
308 const char *source EINA_UNUSED) 308 const char *source EINA_UNUSED)
309{ 309{
310 ELM_SLIDER_DATA_GET(data, sd); 310 ELM_SLIDER_DATA_GET(data, sd);
311 if (sd->popup && _elm_config->slider_indicator_visible_mode != ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE) 311 if (sd->popup &&
312 (_elm_config->slider_indicator_visible_mode != ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE))
312 { 313 {
313 evas_object_raise(sd->popup); 314 evas_object_raise(sd->popup);
314 evas_object_show(sd->popup); 315 evas_object_show(sd->popup);
@@ -329,14 +330,12 @@ _popup_hide(void *data,
329 if (!sd->popup_visible || !sd->popup) return; 330 if (!sd->popup_visible || !sd->popup) return;
330 331
331 if (_elm_config->slider_indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS) return; 332 if (_elm_config->slider_indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS) return;
333 if ((_elm_config->slider_indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS) &&
334 elm_widget_focus_get(data))
335 return;
332 336
333 if (!((elm_widget_focus_get(data)) && 337 edje_object_signal_emit(sd->popup, "popup,hide", "elm"); // XXX: for compat
334 (_elm_config->slider_indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS))) 338 edje_object_signal_emit(sd->popup, "elm,popup,hide", "elm");
335 {
336 // XXX: for compat
337 edje_object_signal_emit(sd->popup, "popup,hide", "elm");
338 edje_object_signal_emit(sd->popup, "elm,popup,hide", "elm");
339 }
340} 339}
341 340
342static void 341static void
@@ -828,13 +827,11 @@ _access_state_cb(void *data EINA_UNUSED, Evas_Object *obj)
828} 827}
829 828
830static void 829static void
831_on_show(void *data EINA_UNUSED, 830_on_show(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj,
832 Evas *e EINA_UNUSED,
833 Evas_Object *obj,
834 void *event_info EINA_UNUSED) 831 void *event_info EINA_UNUSED)
835{ 832{
836 if (_elm_config->slider_indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS) 833 if (_elm_config->slider_indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS)
837 _popup_show(obj, NULL, NULL, NULL); 834 _popup_show(obj, NULL, NULL, NULL);
838} 835}
839 836
840EOLIAN static void 837EOLIAN static void
diff --git a/src/lib/elm_widget_slider.h b/src/lib/elm_widget_slider.h
index 731ee9552..33b8f5ca9 100644
--- a/src/lib/elm_widget_slider.h
+++ b/src/lib/elm_widget_slider.h
@@ -48,9 +48,6 @@ struct _Elm_Slider_Data
48 Eina_Bool spacer_down : 1; 48 Eina_Bool spacer_down : 1;
49 Eina_Bool frozen : 1; 49 Eina_Bool frozen : 1;
50 Eina_Bool units_show : 1; 50 Eina_Bool units_show : 1;
51 /* this flag is to set the visiblity of slider indicator
52 if this flag is set then the indicator always show */
53 Eina_Bool always_popup_show : 1;
54 Eina_Bool popup_visible : 1; 51 Eina_Bool popup_visible : 1;
55}; 52};
56 53