Am Mittwoch, den 04.01.2006, 02:02 +0200 schrieb Hisham Mardam Bey: > On 1/3/06, mista <[EMAIL PROTECTED]> wrote: > > > > Of course I will test things, as e is only my only wm ;) - just say what > > information you need. > > > > It looks like the li removal problem has been fixed by devilhorn's commit. > ok, the other thing I realized is that a greater TILE_SIZE solves the problem that, if you scroll up with keys, the viewport sometimes get not updated and the selected icon is then not more visible. > > I also did many cleanups and little improvements to fileman_smart. _icon > > and _file, but I externalized them to compile in a module. If you > > interested, I would send it to you and we can discuss if some of the > > changes should be applied back. > > > > What sort of changes? Could you summarize please?
-usability changes, like having dirs shown first, renaming can be applied with enter and denied with escape, icon-menu has a submenu with eaps(and their respective icons) that can open this filetype, this gets only generated once for each type, the first time the menu shows up and is afterwards hashed. scroll with band-selection and remember selected files that are not more visible. I had to change icon_canvas, so that icon_pack return the coordinates where the icon is placed and let selections_rect_add work with these coords. dnd works for single files(to drop files into other apps I put an ugly sleep(1) in e_drag_end). I have the problem, that the e_dnd_cb_mouse_up still gets called after the drop is done. Is this a known bug? -logical grouping changes in key_down_cb and key_select_-functions, which reduces the size and is much better to read, as I think. for example in key_down_cb is one section for each state typebuf_shown, _not_shown and renaming. I attached a snippet of the key_select functions, as they solve the problem of flickering selections if one is already at the end in that direction. - and some code convenience changes like wrapping the often used ext = strrchr(file->name, '.'); if (!ext) return 0; if (strcasecmp(ext, ".eap")) return 0; with: e_fm_file_has_mime(file,"eap") One extra functionality that is working is mime lookup via libmagic, this is also comfortable for files without extension, but if one extension is recognized it gets hashed - so you just need to add the mimetypes manually if the type could not be found by libmagic or the found one is not to your liking. > > > One thing I added is the icon-menu option open-with which scans the > > global eap list for matching mimetypes (which for now are stored in the > > comment field). > > Is it planned to store mimetypes in eaps? > > If so what would be the format and how could it be accessed. I think a > > convenient solution would be to have a field in the eap where the > > mimetypes are seperated with a semicolon and this could then be accessed > > as a list within the eapp-struct. > > > > Basically, we want to handle mime's in the eet config file that efm > uses. Something as simple as: > > mime/MIMETYPE -> application_to_use > if this information can be used by other e-applications then this is for sure a better solution. Though my version allows easy reuse of mimetype definitions in .desktop-files, as e17genmenu can be tweaked with little effort to put this information in the eap. What about reading the information once from the eap to store them in the eet-config? regards, jeff > That way, if you double click any icon in efm, we'd look it up (based > on extention for now) or see if its an executable, or an eap, and run > it. We would obviously also need a minor gui to change those entries > and add new ones. > > Best regards, > hisham. > > > > > -- > > > Hisham Mardam Bey > > > MSc (Computer Science) > > > http://hisham.cc/ > > > +9613609386 > > > Codito Ergo Sum (I Code Therefore I Am) > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > > > files > > > for problems? Stop! Download the new AJAX search engine that makes > > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > > http://ads.osdn.com/?ad_idv37&alloc_id865&op=click > > > _______________________________________________ > > > enlightenment-devel mailing list > > > enlightenment-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > > > > > > > > -- > Hisham Mardam Bey > MSc (Computer Science) > http://hisham.cc/ > +9613609386 > Codito Ergo Sum (I Code Therefore I Am) > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id865&op=click > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >
static void _e_fm_icon_key_select_up(E_Folder_Data *sd) { Evas_List *l; E_Fm_Icon *icon; if(!sd->selection.current.ptr) _e_fm_selections_add(sd->files->data, sd->files); else { if(sd->selection.current.ptr->prev) /* are we already at the beginning? */ { Evas_Coord x, x2, y, w, h; l = sd->selection.current.ptr; icon = l->data; evas_object_geometry_get(icon->icon_obj, &x, NULL, NULL, NULL); x2 = x + 1; if (!evas_key_modifier_is_set(evas_key_modifier_get(sd->evas), "Control")) { while(l->prev && (x != x2)) { l = l->prev; icon = l->data; evas_object_geometry_get(icon->icon_obj, &x2, NULL, NULL, NULL); } _e_fm_selections_clear(sd); _e_fm_selections_add(l->data, l); } else /* Control modifier set */ { while(l->prev && (x != x2)) { l = l->prev; icon = l->data; evas_object_geometry_get(icon->icon_obj, &x2, NULL, NULL, NULL); if(icon->state.selected) { _e_fm_selections_del(l->data); _e_fm_selections_current_set(l->data, l); } else _e_fm_selections_add(l->data, l); } } evas_object_geometry_get(icon->icon_obj, &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_key_select_down(E_Folder_Data *sd) { Evas_List *l; if(!sd->selection.current.ptr) _e_fm_selections_add(sd->files->data, sd->files); else { if(sd->selection.current.ptr->next) /* are we already at the end? */ { E_Folder_Icon *icon; Evas_Coord x, x2, y, w, h;; l = sd->selection.current.ptr; icon = l->data; evas_object_geometry_get(icon->icon_obj, &x, NULL, NULL, NULL); x2 = x + 1; if (!evas_key_modifier_is_set(evas_key_modifier_get(sd->evas), "Control")) { while(l->next && (x != x2)) { l = l->next; icon = l->data; evas_object_geometry_get(icon->icon_obj, &x2, NULL, NULL, NULL); } _e_fm_selections_clear(sd); _e_fm_selections_add(l->data, l); } else /* Control modifier set */ { while(l->next && (x != x2)) { l = l->next; icon = l->data; evas_object_geometry_get(icon->icon_obj, &x2, NULL, NULL, NULL); if(icon->state.selected) { _e_fm_selections_del(l->data); _e_fm_selections_current_set(l->data, l); } else _e_fm_selections_add(l->data, l); } } evas_object_geometry_get(icon->icon_obj, &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_key_select_left(E_Folder_Data *sd) { if(!sd->selection.current.ptr) _e_fm_selections_add(sd->files->data, sd->files); else { if(sd->selection.current.ptr->prev) { Evas_List *prev; E_Folder_Icon *icon; Evas_Coord x, y, w, h; prev = sd->selection.current.ptr->prev; icon = prev->data; if (evas_key_modifier_is_set(evas_key_modifier_get(sd->evas), "Control")) { if(icon->state.selected) { _e_fm_selections_del(prev->data); _e_fm_selections_current_set(prev->data, prev); } else _e_fm_selections_add(prev->data, prev); } else { _e_fm_selections_clear(sd); _e_fm_selections_add(prev->data, prev); } evas_object_geometry_get(icon->icon_obj, &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_key_select_right(E_Folder_Data *sd) { if(!sd->selection.current.ptr) _e_fm_selections_add(sd->files->data, sd->files); else { if (sd->selection.current.ptr->next) { Evas_List *next; E_Folder_Icon *icon; Evas_Coord x, y, w, h; next = sd->selection.current.ptr->next; icon = next->data; if (evas_key_modifier_is_set(evas_key_modifier_get(sd->evas), "Control")) { if (icon->state.selected) { _e_fm_selections_del(next->data); _e_fm_selections_current_set(next->data, next); } else _e_fm_selections_add(next->data, next); } else { _e_fm_selections_clear(sd); _e_fm_selections_add(next->data, next); } evas_object_geometry_get(icon->icon_obj, &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 + y + h + sd->icon_info.y_space - (sd->y + sd->h); ev->w = sd->w; ev->h = sd->h; ecore_event_add(E_EVENT_FM_RECONFIGURE, ev, NULL, NULL); } } } } }