diff --git a/TODO b/TODO index 6c72bc9e4..925cda0ec 100644 --- a/TODO +++ b/TODO @@ -26,11 +26,12 @@ Some of the things (in very short form) that need to be done to E17... ------------------------------------------------------------------------------- ESSENTIAL FEATURES ------------------------------------------------------------------------------- +* fm2 needs a right-click file properties dialog * fm2 needs a way to set custom backgrounds and handle scrolling * fm2 needs to display symlink info on files somehow * fm2 needs to display more than 1 file being dragged (if more than 1 is being dragged) -* fm2 needs a way of mapping a mimetype to 1 ore more commands to execute or +* fm2 needs a way of mapping a mimetype to 1 or more commands to execute or internal e actions to do (like add as wallpaper etc.) * fm2 needs a way to use custom icons per dir/file * fm2 needs a icon views (auto-arrange, snap to grid and free placement) diff --git a/src/bin/e_apps.c b/src/bin/e_apps.c index 9e377d2d7..ad8042d30 100644 --- a/src/bin/e_apps.c +++ b/src/bin/e_apps.c @@ -416,63 +416,63 @@ e_app_new(const char *path, int scan_subdirs) } if ((a) && (a->path)) - { - if ((!in_all) && (strncmp(a->path, _e_apps_path_all, strlen(_e_apps_path_all)) == 0)) - in_all = 1; - if (ecore_file_is_dir(a->path)) - { - if ((!a->idle_fill) && (!a->filled)) - { - snprintf(buf, sizeof(buf), "%s/.directory", path); - if (ecore_file_exists(buf)) - e_app_fields_fill(a, buf); - else - { - a->name = evas_stringshare_add(ecore_file_get_file(a->path)); - a->filled = 1; - a->idle_fill = 1; - } - } - if (!a->filled) goto error; - if (scan_subdirs) - { - if (stated) - _e_app_subdir_rescan(a); - else - e_app_subdir_scan(a, scan_subdirs); - } - - /* Don't monitor the all directory, all changes to that must go through e_app. */ - if ((!stated) && (strcmp(_e_apps_path_all, a->path) != 0)) - a->monitor = ecore_file_monitor_add(a->path, _e_app_cb_monitor, a); - } - else if (_e_app_is_eapp(a->path)) - { - if ((!a->idle_fill) && (!a->filled)) - e_app_fields_fill(a, a->path); - - /* no exe field.. not valid. drop it */ -// if (!_e_app_exe_valid_get(a->exe)) -// goto error; + { + if ((!in_all) && (strncmp(a->path, _e_apps_path_all, strlen(_e_apps_path_all)) == 0)) + in_all = 1; + if (ecore_file_is_dir(a->path)) + { + if ((!a->idle_fill) && (!a->filled)) + { + snprintf(buf, sizeof(buf), "%s/.directory", path); + if (ecore_file_exists(buf)) + e_app_fields_fill(a, buf); + else + { + a->name = evas_stringshare_add(ecore_file_get_file(a->path)); + a->filled = 1; + a->idle_fill = 1; + } + } + if (!a->filled) goto error; + if (scan_subdirs) + { + if (stated) + _e_app_subdir_rescan(a); + else + e_app_subdir_scan(a, scan_subdirs); + } + + /* Don't monitor the all directory, all changes to that must go through e_app. */ + if ((!stated) && (strcmp(_e_apps_path_all, a->path) != 0)) + a->monitor = ecore_file_monitor_add(a->path, _e_app_cb_monitor, a); + } + else if (_e_app_is_eapp(a->path)) + { + if ((!a->idle_fill) && (!a->filled)) + e_app_fields_fill(a, a->path); + + /* no exe field.. not valid. drop it */ + // if (!_e_app_exe_valid_get(a->exe)) + // goto error; } else goto error; - + if (virtual_app) { a2 = E_OBJECT_ALLOC(E_App, E_APP_TYPE, _e_app_free); if (a2) { if (_e_app_copy(a2, a)) - a->references = evas_list_append(a->references, a2); + a->references = evas_list_append(a->references, a2); else { e_object_del(E_OBJECT(a2)); goto error; } - } - else - goto error; + } + else + goto error; } /* Timestamp the cache, and no need to stat the file twice if the cache was stale. */ if ((stated) || (stat(a->path, &st) >= 0)) @@ -480,7 +480,7 @@ e_app_new(const char *path, int scan_subdirs) a->mtime = st.st_mtime; stated = 1; } - + if (new_app) { _e_apps_every_app = evas_hash_direct_add(_e_apps_every_app, a->path, a); @@ -492,13 +492,13 @@ e_app_new(const char *path, int scan_subdirs) } } else if ((_e_apps_all) && (_e_apps_all->subapps) && (in_all)) - _e_apps_all->subapps = evas_list_remove(_e_apps_all->subapps, a); + _e_apps_all->subapps = evas_list_remove(_e_apps_all->subapps, a); if ((_e_apps_all) && (a != _e_apps_all) && (in_all)) - _e_apps_all->subapps = evas_list_prepend(_e_apps_all->subapps, a); - + _e_apps_all->subapps = evas_list_prepend(_e_apps_all->subapps, a); + if (virtual_app) - a = a2; - + a = a2; + } else goto error; @@ -2502,6 +2502,7 @@ _e_app_cb_monitor(void *data, Ecore_File_Monitor *em, e_app_fields_fill(a, path); if (a->filled) { +/* allow invalid apps if (!_e_app_exe_valid_get(a->exe)) { a->deleted = 1; @@ -2517,6 +2518,7 @@ _e_app_cb_monitor(void *data, Ecore_File_Monitor *em, _e_app_subdir_rescan(app); } else + */ { _e_app_change(a, E_APP_CHANGE); for (l = a->references; l; l = l->next) diff --git a/src/bin/e_fwin.c b/src/bin/e_fwin.c index 99edcc721..1b0219272 100644 --- a/src/bin/e_fwin.c +++ b/src/bin/e_fwin.c @@ -12,6 +12,7 @@ static void _e_fwin_free(E_Fwin *fwin); static void _e_fwin_cb_delete(E_Win *win); static void _e_fwin_cb_resize(E_Win *win); +static void _e_fwin_deleted(void *data, Evas_Object *obj, void *event_info); static void _e_fwin_changed(void *data, Evas_Object *obj, void *event_info); static void _e_fwin_selected(void *data, Evas_Object *obj, void *event_info); static void _e_fwin_menu_extend(void *data, Evas_Object *obj, E_Menu *m, E_Fm2_Icon_Info *info); @@ -85,6 +86,8 @@ e_fwin_new(E_Container *con, const char *dev, const char *path) e_fm2_config_set(o, &fmc); evas_object_smart_callback_add(o, "dir_changed", _e_fwin_changed, fwin); + evas_object_smart_callback_add(o, "dir_deleted", + _e_fwin_deleted, fwin); evas_object_smart_callback_add(o, "selected", _e_fwin_selected, fwin); e_fm2_path_set(o, dev, path); @@ -161,6 +164,15 @@ _e_fwin_cb_resize(E_Win *win) evas_object_resize(fwin->scrollframe_obj, fwin->win->w, fwin->win->h); } +static void +_e_fwin_deleted(void *data, Evas_Object *obj, void *event_info) +{ + E_Fwin *fwin; + + fwin = data; + e_object_del(E_OBJECT(fwin)); +} + static void _e_fwin_changed(void *data, Evas_Object *obj, void *event_info) { diff --git a/src/bin/e_int_menus.c b/src/bin/e_int_menus.c index 4a9f6bd0c..83946ec4a 100644 --- a/src/bin/e_int_menus.c +++ b/src/bin/e_int_menus.c @@ -496,7 +496,7 @@ _e_int_menus_apps_scan(E_Menu *m) { a = l->data; - if (e_app_valid_exe_get(a) || (!a->exe)) +// if (e_app_valid_exe_get(a) || (!a->exe)) { int opt = 0; char label[4096];