forked from enlightenment/enlightenment
parent
1b173acce8
commit
9f0cb822d8
|
@ -12,9 +12,13 @@
|
||||||
* the mouse grab. (also onto the e17 desktop, or anything that doesnt
|
* the mouse grab. (also onto the e17 desktop, or anything that doesnt
|
||||||
* accept the drop
|
* accept the drop
|
||||||
*
|
*
|
||||||
|
* - scrolling
|
||||||
|
*
|
||||||
* - checking wether events belong to us (ecore events)
|
* - 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
|
* - we need a redraw function that will just re-arrange and not do
|
||||||
* the whole thing. for example, when we resize, we should just
|
* the whole thing. for example, when we resize, we should just
|
||||||
|
@ -31,8 +35,6 @@
|
||||||
*
|
*
|
||||||
* - keyboard shortcuts for directory and file navigation.
|
* - keyboard shortcuts for directory and file navigation.
|
||||||
*
|
*
|
||||||
* - multi select
|
|
||||||
*
|
|
||||||
* - allow for icon movement inside the canvas
|
* - allow for icon movement inside the canvas
|
||||||
*
|
*
|
||||||
* - add metadata system which allows us to save icon positions and will
|
* - add metadata system which allows us to save icon positions and will
|
||||||
|
@ -162,14 +164,15 @@ struct _E_Fileman_Smart_Data
|
||||||
} max;
|
} max;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
Evas_List *files;
|
Evas_List *files;
|
||||||
E_Fileman_File *current_file;
|
E_Fileman_File *current_file;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
unsigned char enabled : 1;
|
unsigned char enabled : 1;
|
||||||
Evas_Coord x, y;
|
Evas_Coord x, y;
|
||||||
Evas_Object *obj;
|
Evas_Object *obj;
|
||||||
} band;
|
Evas_List *files;
|
||||||
|
} band;
|
||||||
|
|
||||||
} selection;
|
} selection;
|
||||||
};
|
};
|
||||||
|
@ -981,6 +984,7 @@ _e_fm_selections_clear(E_Fileman_Smart_Data *sd)
|
||||||
}
|
}
|
||||||
sd->selection.files = evas_list_free(sd->selection.files);
|
sd->selection.files = evas_list_free(sd->selection.files);
|
||||||
sd->selection.current_file = NULL;
|
sd->selection.current_file = NULL;
|
||||||
|
sd->selection.band.files = evas_list_free(sd->selection.band.files);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1012,15 +1016,23 @@ _e_fm_selections_add_rect(E_Fileman_Smart_Data *sd, Evas_Coord x, Evas_Coord y,
|
||||||
evas_object_geometry_get(file->icon, &xx, &yy, &ww, &hh);
|
evas_object_geometry_get(file->icon, &xx, &yy, &ww, &hh);
|
||||||
if (E_INTERSECTS(x, y, w, h, xx, yy, ww, hh))
|
if (E_INTERSECTS(x, y, w, h, xx, yy, ww, hh))
|
||||||
{
|
{
|
||||||
if (!file->state.selected)
|
if(!evas_list_find(file->sd->selection.band.files, file))
|
||||||
{
|
{
|
||||||
_e_fm_selections_add(file);
|
if(file->state.selected)
|
||||||
}
|
_e_fm_selections_del(file);
|
||||||
}
|
else
|
||||||
else
|
_e_fm_selections_add(file);
|
||||||
{
|
file->sd->selection.band.files = evas_list_append(file->sd->selection.band.files, file);
|
||||||
if (file->state.selected) // todo: add control+rubberband
|
}
|
||||||
_e_fm_selections_del(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 @@ _e_fm_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
sd->selection.band.enabled = 0;
|
sd->selection.band.enabled = 0;
|
||||||
evas_object_resize(sd->selection.band.obj, 1, 1);
|
evas_object_resize(sd->selection.band.obj, 1, 1);
|
||||||
evas_object_hide(sd->selection.band.obj);
|
evas_object_hide(sd->selection.band.obj);
|
||||||
|
sd->selection.band.files = evas_list_free(sd->selection.band.files);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1957,21 +1970,17 @@ _e_fm_mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
switch (ev->button)
|
switch (ev->button)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
if (evas_key_modifier_is_set(evas_key_modifier_get(sd->evas), "Control"))
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
if (!evas_key_modifier_is_set(evas_key_modifier_get(sd->evas), "Control"))
|
||||||
else
|
_e_fm_selections_clear(sd);
|
||||||
{
|
|
||||||
_e_fm_selections_clear(sd);
|
sd->selection.band.enabled = 1;
|
||||||
sd->selection.band.enabled = 1;
|
evas_object_move(sd->selection.band.obj, ev->canvas.x, ev->canvas.y);
|
||||||
evas_object_move(sd->selection.band.obj, ev->canvas.x, ev->canvas.y);
|
evas_object_resize(sd->selection.band.obj, 1, 1);
|
||||||
evas_object_resize(sd->selection.band.obj, 1, 1);
|
evas_object_show(sd->selection.band.obj);
|
||||||
evas_object_show(sd->selection.band.obj);
|
sd->selection.band.x = ev->canvas.x;
|
||||||
sd->selection.band.x = ev->canvas.x;
|
sd->selection.band.y = ev->canvas.y;
|
||||||
sd->selection.band.y = ev->canvas.y;
|
break;
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
if (!sd->win) break;
|
if (!sd->win) break;
|
||||||
|
|
Loading…
Reference in New Issue