Enlightenment CVS committal
Author : codewarrior
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_fileman_smart.c
Log Message:
Rubber band works with control now.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_fileman_smart.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- e_fileman_smart.c 11 Oct 2005 11:38:17 -0000 1.18
+++ e_fileman_smart.c 11 Oct 2005 13:23:54 -0000 1.19
@@ -11,10 +11,14 @@
* - when we drop something onto an efm from an efm we might not be releasing
* the mouse grab. (also onto the e17 desktop, or anything that doesnt
* accept the drop
+ *
+ * - scrolling
*
* - checking wether events belong to us (ecore events)
*
- * - scrolling
+ * - when we select multiple items, the right click menu on the icons needs
+ * to display some group related things and its actions need to work
+ * on the group.
*
* - we need a redraw function that will just re-arrange and not do
* the whole thing. for example, when we resize, we should just
@@ -31,8 +35,6 @@
*
* - keyboard shortcuts for directory and file navigation.
*
- * - multi select
- *
* - allow for icon movement inside the canvas
*
* - add metadata system which allows us to save icon positions and will
@@ -162,14 +164,15 @@
} max;
struct {
- Evas_List *files;
- E_Fileman_File *current_file;
+ Evas_List *files;
+ E_Fileman_File *current_file;
- struct {
- unsigned char enabled : 1;
- Evas_Coord x, y;
- Evas_Object *obj;
- } band;
+ struct {
+ unsigned char enabled : 1;
+ Evas_Coord x, y;
+ Evas_Object *obj;
+ Evas_List *files;
+ } band;
} selection;
};
@@ -981,6 +984,7 @@
}
sd->selection.files = evas_list_free(sd->selection.files);
sd->selection.current_file = NULL;
+ sd->selection.band.files = evas_list_free(sd->selection.band.files);
}
static void
@@ -1012,15 +1016,23 @@
evas_object_geometry_get(file->icon, &xx, &yy, &ww, &hh);
if (E_INTERSECTS(x, y, w, h, xx, yy, ww, hh))
{
- if (!file->state.selected)
- {
- _e_fm_selections_add(file);
- }
- }
- else
- {
- if (file->state.selected) // todo: add control+rubberband
- _e_fm_selections_del(file);
+ if(!evas_list_find(file->sd->selection.band.files, file))
+ {
+ if(file->state.selected)
+ _e_fm_selections_del(file);
+ else
+ _e_fm_selections_add(file);
+ file->sd->selection.band.files =
evas_list_append(file->sd->selection.band.files, file);
+ }
+ } else {
+ if(evas_list_find(file->sd->selection.band.files, file))
+ {
+ if(file->state.selected)
+ _e_fm_selections_del(file);
+ else
+ _e_fm_selections_add(file);
+ file->sd->selection.band.files =
evas_list_remove(file->sd->selection.band.files, file);
+ }
}
}
}
@@ -1873,6 +1885,7 @@
sd->selection.band.enabled = 0;
evas_object_resize(sd->selection.band.obj, 1, 1);
evas_object_hide(sd->selection.band.obj);
+ sd->selection.band.files = evas_list_free(sd->selection.band.files);
}
}
@@ -1957,26 +1970,22 @@
switch (ev->button)
{
case 1:
- if (evas_key_modifier_is_set(evas_key_modifier_get(sd->evas),
"Control"))
- {
-
- }
- else
- {
- _e_fm_selections_clear(sd);
- sd->selection.band.enabled = 1;
- evas_object_move(sd->selection.band.obj, ev->canvas.x,
ev->canvas.y);
- evas_object_resize(sd->selection.band.obj, 1, 1);
- evas_object_show(sd->selection.band.obj);
- sd->selection.band.x = ev->canvas.x;
- sd->selection.band.y = ev->canvas.y;
- }
- break;
+
+ if (!evas_key_modifier_is_set(evas_key_modifier_get(sd->evas),
"Control"))
+ _e_fm_selections_clear(sd);
+
+ sd->selection.band.enabled = 1;
+ evas_object_move(sd->selection.band.obj, ev->canvas.x, ev->canvas.y);
+ evas_object_resize(sd->selection.band.obj, 1, 1);
+ evas_object_show(sd->selection.band.obj);
+ sd->selection.band.x = ev->canvas.x;
+ sd->selection.band.y = ev->canvas.y;
+ break;
case 3:
if (!sd->win) break;
- mn = e_menu_new();
+ mn = e_menu_new();
sd->menu = mn;
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs