fix bug where slider could be changed while disabled

ticket #2169


SVN revision: 82403
devs/asdfuser/comp-sounds
Mike Blumenkrantz 10 years ago
parent 27624264ee
commit 9543eb5c37
  1. 2
      ChangeLog
  2. 2
      NEWS
  3. 12
      src/bin/e_slider.c
  4. 2
      src/bin/e_slider.h
  5. 5
      src/bin/e_widget_slider.c
  6. 12
      src/modules/fileman/e_mod_config.c

@ -2,6 +2,8 @@
* Fixed bug where keyboard resizing of windows would not be possible if timeout was set to zero
* Fixed crash when clicking apply in wallpaper settings dialog and no wallpaper is selected
* Fixed bug where disabled slider widgets could be changed with mouse wheel
* Fixed bug where fileman config slider widgets were not properly disabled
* Added elm win trap callback for base size setting, calling this causes ICCCM hints to be applied
2013-01-07 Tom "TAsn" Hacohen

@ -67,3 +67,5 @@ Fixes:
* entry/scrollframe: Fixed issues with submembers.
* Fixed bug where keyboard resizing of windows would not be possible if timeout was set to zero
* Fixed crash when clicking apply in wallpaper settings dialog and no wallpaper is selected
* Fixed bug where disabled slider widgets could be changed with mouse wheel
* Fixed bug where fileman config slider widgets were not properly disabled

@ -23,6 +23,7 @@ struct _E_Smart_Data
Evas_Coord minw, minh;
Ecore_Timer *set_timer;
Eina_List *special_values;
Eina_Bool disabled : 1;
};
struct _E_Slider_Special_Value
@ -205,6 +206,13 @@ e_slider_direction_set(Evas_Object *obj, int reversed)
_e_smart_value_update_now(sd);
}
EAPI void
e_slider_disabled_set(Evas_Object *obj, Eina_Bool disable)
{
API_ENTRY return;
sd->disabled = disable;
}
EAPI int
e_slider_direction_get(Evas_Object *obj)
{
@ -397,6 +405,7 @@ _e_smart_signal_cb_wheel_up(void *data, Evas_Object *obj __UNUSED__, const char
{
E_Smart_Data *sd = data;
if (sd->disabled) return;
edje_object_part_drag_step(sd->edje_obj, "e.dragable.slider", -0.05, -0.05);
sd->direction = -1;
}
@ -406,6 +415,7 @@ _e_smart_signal_cb_wheel_down(void *data, Evas_Object *obj __UNUSED__, const cha
{
E_Smart_Data *sd = data;
if (sd->disabled) return;
edje_object_part_drag_step(sd->edje_obj, "e.dragable.slider", 0.05, 0.05);
sd->direction = 1;
}
@ -416,6 +426,7 @@ _e_smart_event_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
Evas_Event_Key_Down *ev = event_info;
E_Smart_Data *sd = data;
if (sd->disabled) return;
if ((!strcmp(ev->keyname, "Up")) ||
(!strcmp(ev->keyname, "KP_Up")) ||
(!strcmp(ev->keyname, "Left")) ||
@ -467,6 +478,7 @@ _e_smart_event_mouse_down(void *data, Evas *e, Evas_Object *obj __UNUSED__, void
double pos;
static int in_md = 0;
if (sd->disabled) return;
if (in_md > 0) return;
in_md++;
evas_object_geometry_get(sd->event, &x, &y, &w, &h);

@ -20,7 +20,7 @@ EAPI void e_slider_direction_set (Evas_Object *obj, int rever
EAPI int e_slider_direction_get (Evas_Object *obj);
EAPI void e_slider_size_min_get (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
EAPI Evas_Object *e_slider_edje_object_get (Evas_Object *obj);
EAPI void e_slider_disabled_set(Evas_Object *obj, Eina_Bool disable);
EAPI void e_slider_special_value_add (Evas_Object *obj, double value, double error, const char *label);
#endif
#endif

@ -230,9 +230,12 @@ static void
_e_wid_disable_hook(Evas_Object *obj)
{
E_Widget_Data *wd;
Eina_Bool disable;
wd = e_widget_data_get(obj);
if (e_widget_disabled_get(obj))
disable = e_widget_disabled_get(obj);
e_slider_disabled_set(wd->o_slider, disable);
if (disable)
edje_object_signal_emit(e_slider_edje_object_get(wd->o_slider),
"e,state,disabled", "e");
else

@ -28,7 +28,9 @@ struct _E_Config_Dialog_Data
double delay;
double size;
Eina_Bool enable;
Evas_Object *delay_slider_text;
Evas_Object *delay_slider;
Evas_Object *size_slider_text;
Evas_Object *size_slider;
} tooltip;
/* display of icons */
@ -282,7 +284,9 @@ _tooltip_changed(void *data, Evas_Object *obj __UNUSED__)
{
E_Config_Dialog_Data *cfdata = data;
e_widget_disabled_set(cfdata->tooltip.delay_slider_text, !cfdata->tooltip.enable);
e_widget_disabled_set(cfdata->tooltip.delay_slider, !cfdata->tooltip.enable);
e_widget_disabled_set(cfdata->tooltip.size_slider_text, !cfdata->tooltip.enable);
e_widget_disabled_set(cfdata->tooltip.size_slider, !cfdata->tooltip.enable);
}
@ -453,15 +457,15 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__,
(int*)&(cfdata->tooltip.enable));
e_widget_on_change_hook_set(ob, _tooltip_changed, cfdata);
e_widget_list_object_append(o, ob, 1, 1, 0.5);
cfdata->tooltip.delay_slider = ob = e_widget_label_add(evas, _("Tooltip delay"));
cfdata->tooltip.delay_slider_text = ob = e_widget_label_add(evas, _("Tooltip delay"));
e_widget_list_object_append(o, ob, 1, 1, 0.5);
ob = e_widget_slider_add(evas, 1, 0, _("%1.1f"), 0.0, 5.0, 0.5, 0,
cfdata->tooltip.delay_slider = ob = e_widget_slider_add(evas, 1, 0, _("%1.1f"), 0.0, 5.0, 0.5, 0,
&cfdata->tooltip.delay, NULL, 150);
e_widget_list_object_append(o, ob, 1, 1, 0.5);
cfdata->tooltip.size_slider = ob = e_widget_label_add(evas, _("Tooltip size (Screen percentage)"));
cfdata->tooltip.size_slider_text = ob = e_widget_label_add(evas, _("Tooltip size (Screen percentage)"));
e_widget_list_object_append(o, ob, 1, 1, 0.5);
ob = e_widget_slider_add(evas, 1, 0, _("%2.0f"), 10.0, 75.0, 5.0, 0,
cfdata->tooltip.size_slider = ob = e_widget_slider_add(evas, 1, 0, _("%2.0f"), 10.0, 75.0, 5.0, 0,
&cfdata->tooltip.size, NULL, 150);
e_widget_list_object_append(o, ob, 1, 1, 0.5);
_tooltip_changed(cfdata, NULL);

Loading…
Cancel
Save