Enlightenment CVS committal Author : lordchaos Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_iconbox.c ewl_iconbox.h Log Message: * If a user has manually moved an icon, don't clip it back on 'configure'. The logic here needs to be cleaned up a bit. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.c,v retrieving revision 1.101 retrieving revision 1.102 diff -u -3 -r1.101 -r1.102 --- ewl_iconbox.c 9 Jan 2006 08:42:28 -0000 1.101 +++ ewl_iconbox.c 11 Jan 2006 03:56:54 -0000 1.102 @@ -818,9 +818,17 @@ y = ewl_object_current_y_get(EWL_OBJECT(list_item)); /* Only move if we have to */ - if (abs(x - ib->lx) > 0 || abs(y - ib->ly) > 0) - ewl_object_position_request(EWL_OBJECT(list_item), + if (abs(x - ib->lx) > 0 || abs(y - ib->ly) > 0) { + if ( !(list_item->ox || list_item->oy)) { + ewl_object_position_request(EWL_OBJECT(list_item), ib->lx + nx, ib->ly + ny); + } else { + ewl_object_position_request(EWL_OBJECT(list_item), + list_item->ox + ib->ox, list_item->oy + ib->oy); + + } + //printf("Requested position: %d:%d\n", ib->lx + nx, ib->ly + ny); + } ib->lx += iw + EWL_ICONBOX_ICON_PADDING; @@ -1155,6 +1163,19 @@ ewl_object_position_request(EWL_OBJECT(list_item), ev->x - (fw/2), ev->y - (fh/2)); + printf("Setting override position to %d:%d, layout: %d:%d, offset: %d:%d, pane %d:%d, box: %d:%d\n", + ev->x - (fw/2), ev->y - (fh/2), + ib->lx, ib->ly, + ib->ox , ib->oy, + px, py, + ibx,iby + ); + + printf("Position: %d:%d\n", ev->x - (fw/2) - ibx + abs(px - ibx), ev->y - (fh/2) - iby + abs(py - iby) ); + list_item->ox = ev->x - (fw/2) - ibx + abs(px - ibx); + list_item->oy = ev->y - (fh/2) - iby + abs(py - iby); + + DLEAVE_FUNCTION(DLEVEL_STABLE); } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- ewl_iconbox.h 29 Dec 2005 19:37:43 -0000 1.28 +++ ewl_iconbox.h 11 Jan 2006 03:56:54 -0000 1.29 @@ -38,6 +38,9 @@ Ewl_Iconbox *icon_box_parent; /* Our reference upwards, kinda breaks OO conventions */ char *label; /*Our icon's full (unabbreviated) label) */ char *label_compressed; + + int ox,oy; /* Override configure arranges, + if the user has moved the icon */ }; /** ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs