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:
Add multiple-rubberband/click selections using CTRL key
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- ewl_iconbox.c 29 Oct 2005 07:53:44 -0000 1.60
+++ ewl_iconbox.c 30 Oct 2005 01:35:15 -0000 1.61
@@ -545,12 +545,12 @@
-void ewl_iconbox_icon_select(Ewl_IconBox_Icon* ib, int loc) /* Loc 0= image,
1= label */
+void ewl_iconbox_icon_select(Ewl_IconBox_Icon* ib, int loc, int deselect) /*
Loc 0= image, 1= label */
{
int sel = ib->selected;
- if (!ib->icon_box_parent->drag_box) {
+ if ((!ib->icon_box_parent->drag_box) && deselect) {
Ewl_IconBox_Icon* list_item;
ecore_list_goto_first(ib->icon_box_parent->ewl_iconbox_icon_list);
while((list_item =
(Ewl_IconBox_Icon*)ecore_list_next(ib->icon_box_parent->ewl_iconbox_icon_list))
!= NULL) {
@@ -891,8 +891,8 @@
iy =
ewl_object_current_y_get(EWL_OBJECT(list_item));
if (ix >= lx && iy >= ly && ix <= hx && iy <=
hy) {
-
ewl_iconbox_icon_select(EWL_ICONBOX_ICON(list_item),0);
- } else if (list_item->selected) {
+
ewl_iconbox_icon_select(EWL_ICONBOX_ICON(list_item),0,0);
+ } else if (list_item->selected &&
!(ev->modifiers == EWL_KEY_MODIFIER_CTRL)) {
ewl_iconbox_icon_deselect(EWL_ICONBOX_ICON(list_item));
}
}
@@ -996,7 +996,11 @@
ib->icon_box_parent->ydown = ev->y;
/* Set this to selected */
- ewl_iconbox_icon_select(ib,0);
+ if (ev->modifiers == EWL_KEY_MODIFIER_CTRL) {
+ ewl_iconbox_icon_select(ib,0,0);
+ } else {
+ ewl_iconbox_icon_select(ib,0,1);
+ }
ib->icon_box_parent->select_icon = ib; /*We rely on this being the
first callback - so
client*/
@@ -1060,7 +1064,7 @@
Ewl_IconBox_Icon* ib = user_data;
/* Set this to selected */
- ewl_iconbox_icon_select(ib,1);
+ ewl_iconbox_icon_select(ib,1, 1);
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- ewl_iconbox.h 23 Oct 2005 09:58:12 -0000 1.20
+++ ewl_iconbox.h 30 Oct 2005 01:35:15 -0000 1.21
@@ -146,7 +146,7 @@
/* Internal functions */
-void ewl_iconbox_icon_select(Ewl_IconBox_Icon* ib, int loc);
+void ewl_iconbox_icon_select(Ewl_IconBox_Icon* ib, int loc, int deselect);
void ewl_iconbox_icon_deselect(Ewl_IconBox_Icon *ib);
void ewl_iconbox_label_edit_key_down(Ewl_Widget *w, void *ev_data, void*
user_data);
void ewl_iconbox_inner_pane_calculate(Ewl_IconBox* ib);
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs