static void _e_fm_icon_mouse_move_cb (void *data, Evas *e, Evas_Object *obj, void *event_info);
static int _e_fm_win_mouse_up_cb (void *data, int type, void *event);
+static void _e_fm_icon_select_up(E_Fm_Smart_Data *sd);
+static void _e_fm_icon_select_down(E_Fm_Smart_Data *sd);
+static void _e_fm_icon_select_left(E_Fm_Smart_Data *sd);
+static void _e_fm_icon_select_right(E_Fm_Smart_Data *sd);
+static void _e_fm_icon_goto_key(E_Fm_Smart_Data *sd, char *c);
+
+
static int _e_fm_drop_enter_cb (void *data, int type, void *event);
static int _e_fm_drop_leave_cb (void *data, int type, void *event);
static int _e_fm_drop_position_cb (void *data, int type, void *event);
}
static void
+_e_fm_icon_goto_key(E_Fm_Smart_Data *sd, char *c)
+{
+ E_Fm_Icon *icon;
+ Evas_List *l;
+
+ if(sd->selection.current.ptr)
+ {
+ l = sd->selection.current.ptr;
+ icon = sd->selection.current.file;
+ if(icon->file->name[0] == c[0] && l->next)
+ l = l->next;
+ else
+ l = sd->selection.current.ptr;
+ }
+ else
+ l = sd->files;
+
+ for(l; l; l = l->next)
+ {
+ icon = l->data;
+ if(icon->file->name[0] == c[0])
+ {
+ _e_fm_selections_clear(sd);
+ _e_fm_selections_add(l->data, l);
+ goto position;
+ }
+ }
+ for(l = sd->files; l != sd->selection.current.ptr; l = l->next)
+ {
+ icon = l->data;
+ if(icon->file->name[0] == c[0])
+ {
+ _e_fm_selections_clear(sd);
+ _e_fm_selections_add(l->data, l);
+ goto position;
+ }
+ }
+
+ return;
+position:
+ {
+ Evas_Coord x, y, w, h;
+ icon = l->data;
+ evas_object_geometry_get(icon->icon_object, &x, &y, &w, &h);
+ if(!E_CONTAINS(sd->x, sd->y, sd->w, sd->h, x, y, w, h))
+ {
+ E_Event_Fm_Reconfigure *ev;
+
+ ev = E_NEW(E_Event_Fm_Reconfigure, 1);
+ if (ev)
+ {
+ ev->object = sd->object;
+ ev->x = sd->x;
+ ev->y = sd->child.y - (sd->y - (y - sd->icon_info.y_space));
+ ev->w = sd->w;
+ ev->h = sd->h;
+ ecore_event_add(E_EVENT_FM_RECONFIGURE, ev, NULL, NULL);
+ }
+ }
+ }
+}
+
+static void
_e_fm_icon_select_up(E_Fm_Smart_Data *sd)
{
Evas_List *l;
ecore_event_add(E_EVENT_FM_RECONFIGURE, ev, NULL, NULL);
}
}
- }
+ }
}
else
_e_fm_selections_add(sd->files->data, sd->files);
else if (!strcmp(ev->keyname, "Right"))
_e_fm_icon_select_right(sd);
else if (!strcmp(ev->keyname, "Return"))
- _e_fm_icon_run(sd);
+ _e_fm_icon_run(sd);
+ else if(strlen(ev->keyname) == 1)
+ _e_fm_icon_goto_key(sd, ev->string);
}
static int