Ephoto: Make sure to reset changes on cancel.

v-1.6.0
Stephen Houston 7 years ago
parent ae946f5b74
commit 485d0342d7
  1. 9
      src/bin/ephoto_bcg.c
  2. 9
      src/bin/ephoto_color.c
  3. 9
      src/bin/ephoto_hsv.c

@ -238,6 +238,7 @@ static void
_bcg_reset(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Ephoto_BCG *ebcg = data;
elm_slider_value_set(ebcg->bslider, 0);
elm_slider_value_set(ebcg->cslider, 0);
elm_slider_value_set(ebcg->gslider, 1);
@ -264,6 +265,14 @@ static void
_bcg_cancel(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Ephoto_BCG *ebcg = data;
elm_slider_value_set(ebcg->bslider, 0);
elm_slider_value_set(ebcg->cslider, 0);
elm_slider_value_set(ebcg->gslider, 1);
ebcg->brightness = 0;
ebcg->contrast = 0;
ebcg->gamma = 1;
_brightness_slider_changed(ebcg, ebcg->bslider, NULL);
ephoto_single_browser_cancel_editing(ebcg->main, ebcg->image);
evas_object_del(ebcg->frame);
}

@ -228,6 +228,7 @@ static void
_color_reset(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Ephoto_Color *eco = data;
elm_slider_value_set(eco->rslider, 0);
elm_slider_value_set(eco->gslider, 0);
elm_slider_value_set(eco->bslider, 0);
@ -254,6 +255,14 @@ static void
_color_cancel(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Ephoto_Color *eco = data;
elm_slider_value_set(eco->rslider, 0);
elm_slider_value_set(eco->gslider, 0);
elm_slider_value_set(eco->bslider, 0);
eco->red = 0;
eco->green = 0;
eco->blue = 0;
_red_slider_changed(eco, eco->rslider, NULL);
ephoto_single_browser_cancel_editing(eco->main, eco->image);
evas_object_del(eco->frame);
}

@ -249,6 +249,7 @@ static void
_hsv_reset(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Ephoto_HSV *ehsv = data;
elm_slider_value_set(ehsv->hslider, 0);
elm_slider_value_set(ehsv->sslider, 0);
elm_slider_value_set(ehsv->vslider, 0);
@ -275,6 +276,14 @@ static void
_hsv_cancel(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Ephoto_HSV *ehsv = data;
elm_slider_value_set(ehsv->hslider, 0);
elm_slider_value_set(ehsv->sslider, 0);
elm_slider_value_set(ehsv->vslider, 0);
ehsv->hue = 0;
ehsv->saturation = 0;
ehsv->value = 0;
_hue_slider_changed(ehsv, ehsv->hslider, NULL);
ephoto_single_browser_cancel_editing(ehsv->main, ehsv->image);
evas_object_del(ehsv->frame);
}

Loading…
Cancel
Save