okra pushed a commit to branch master. http://git.enlightenment.org/apps/ephoto.git/commit/?id=a55ffcc2901552632c6458acc41ff98f8fbdf106
commit a55ffcc2901552632c6458acc41ff98f8fbdf106 Author: Stephen Houston <smhousto...@gmail.com> Date: Fri Feb 20 21:08:25 2015 -0600 Ephoto: Spec file fix, rid of unused variables. --- data/themes/crop.edc | 22 +++++++++++++--------- ephoto.spec.in | 2 +- src/bin/ephoto_cropper.c | 7 +------ 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/data/themes/crop.edc b/data/themes/crop.edc index c6f3371..306cdae 100644 --- a/data/themes/crop.edc +++ b/data/themes/crop.edc @@ -95,17 +95,21 @@ collections { set_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, ppox, ppoy); } if (movetype == 9) { - new ppox, ppoy, oldw, oldh, scalew, scaleh; + new ppox, ppoy; get_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy); get_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, ppox, ppoy); - oldw = cw + cox; - oldh = ch + coy; - scalew = oldw/cw; - scaleh = oldh/ch; - pox *= scalew; - ppox *= scalew; - poy *= scaleh; - ppoy *= scaleh; + if (cx < ix) + cox = ix-cx; + if (cx+cw > ix+iw) + cox = (ix+iw)-(cx+cw); + if (cy < iy) + coy = iy-cy; + if (cy+ch > iy+ih) + coy = (iy+ih)-(cy+ch); + pox += cox; + ppox += cox; + poy += coy; + ppoy += coy; set_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy); set_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, ppox, ppoy); } diff --git a/ephoto.spec.in b/ephoto.spec.in index 55298a5..fa0ddcc 100644 --- a/ephoto.spec.in +++ b/ephoto.spec.in @@ -4,7 +4,7 @@ Version: @VERSION@ Release: 0.%(date '+%Y%m%d') License: BSD Group: Applications/Multimedia -URL: http://www.stephen.3sixty8.com +URL: http://www.smhouston.us Source: %{name}-%{version}.tar.gz Packager: %{?_packager:%{_packager}}%{!?_packager:Stephen Houston <smhousto...@gmail.com>} Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:Okra Project (http://www.smhouston.us/)} diff --git a/src/bin/ephoto_cropper.c b/src/bin/ephoto_cropper.c index e2246d1..5e62574 100644 --- a/src/bin/ephoto_cropper.c +++ b/src/bin/ephoto_cropper.c @@ -271,8 +271,7 @@ _image_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi Ephoto_Cropper *ec = data; Edje_Message_Int_Set *msg; - int sx, sy, sw, sh, iw, ih, diffw, diffh; - int cx, cy, cw, ch, ix, iy; + int sx, sy, sw, sh, ix, iy, iw, ih, diffw, diffh; evas_object_geometry_get(ec->layout, &sx, &sy, &sw, &sh); evas_object_image_size_get(elm_image_object_get(ec->image), &iw, &ih); @@ -310,10 +309,6 @@ _image_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi diffh /= 2; ix = sx+diffw; iy = sy+diffh; - cw = nw/2; - ch = nh/2; - cx = ix+(cw/2); - cy = iy+(ch/2); evas_object_resize(ec->layout, nw, nh); evas_object_move(ec->layout, ix, iy); --