Enlightenment CVS committal Author : codewarrior Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_fileman.c e_fileman_smart.c Log Message: -m pressing a key like "i" will take you to "images" and "C" takes you to "Code". Wrapping is also supported." =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_fileman.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- e_fileman.c 5 Nov 2005 12:42:59 -0000 1.24 +++ e_fileman.c 6 Nov 2005 14:40:58 -0000 1.25 @@ -85,7 +85,7 @@ _e_fileman_scroll_child_size_get); e_win_resize_callback_set(fileman->win, _e_fileman_resize_cb); - e_win_resize(fileman->win, 640, 480); + e_win_resize(fileman->win, 570, 355); ecore_x_dnd_aware_set(fileman->win->evas_win, 1); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_fileman_smart.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -3 -r1.90 -r1.91 --- e_fileman_smart.c 6 Nov 2005 13:38:46 -0000 1.90 +++ e_fileman_smart.c 6 Nov 2005 14:40:58 -0000 1.91 @@ -237,6 +237,13 @@ 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); @@ -2227,6 +2234,69 @@ } 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; @@ -2290,7 +2360,7 @@ ecore_event_add(E_EVENT_FM_RECONFIGURE, ev, NULL, NULL); } } - } + } } else _e_fm_selections_add(sd->files->data, sd->files); @@ -2536,7 +2606,9 @@ 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 ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs