enlightenment/src/bin/e_fileman.c

235 lines
5.7 KiB
C
Raw Normal View History

2005-10-10 09:33:13 -07:00
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
#include "e.h"
/****
* TODO:
* - reset scrollbar positions on dir changes
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
* - dont allow for menus on ".."
* - xdnd
* - proper mime system
* - create x, y, w, h in canvas struct and make them auto update
****/
#ifdef EFM_DEBUG
# define D(x) do {printf(__FILE__ ":%d: ", __LINE__); printf x; fflush(stdout);} while (0)
#else
# define D(x) ((void) 0)
#endif
static void _e_fileman_resize_cb(E_Win *win);
static void _e_fileman_delete_cb(E_Win *win);
static void _e_fileman_selector_cb(Evas_Object *object, char *file, void *data);
2005-10-10 09:33:13 -07:00
static void _e_fileman_free(E_Fileman *fileman);
2005-10-30 01:40:37 -07:00
static void _e_fileman_scroll_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
static void _e_fileman_scroll_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
static void _e_fileman_scroll_max_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
static void _e_fileman_scroll_child_size_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
static int _e_fileman_reconfigure_cb(void *data, int type, void *event);
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
E_Fileman *
2005-10-10 09:33:13 -07:00
e_fileman_new(E_Container *con)
{
char dir[PATH_MAX];
if (!getcwd(dir, sizeof(dir)))
return NULL;
return e_fileman_new_to_dir(con, dir);
}
E_Fileman *
e_fileman_new_to_dir(E_Container *con, char *path)
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
{
E_Fileman *fileman;
2005-10-10 09:33:13 -07:00
E_Manager *man;
char dir[PATH_MAX];
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
if (!con)
2005-10-10 09:33:13 -07:00
{
man = e_manager_current_get();
if (!man) return NULL;
con = e_container_current_get(man);
if (!con) con = e_container_number_get(man, 0);
if (!con) return NULL;
}
snprintf(dir, PATH_MAX, "%s", path);
if(!ecore_file_is_dir(dir))
if (!getcwd(dir, sizeof(dir)))
return NULL;
2005-10-10 09:33:13 -07:00
fileman = E_OBJECT_ALLOC(E_Fileman, E_FILEMAN_TYPE, _e_fileman_free);
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
if (!fileman) return NULL;
fileman->con = con;
2005-10-10 09:33:13 -07:00
e_object_ref(E_OBJECT(fileman->con));
fileman->win = e_win_new(con);
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
if (!fileman->win)
2005-10-10 09:33:13 -07:00
{
free(fileman);
return NULL;
}
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
fileman->xpos = 0;
2005-10-10 09:33:13 -07:00
fileman->ypos = 0;
e_win_delete_callback_set(fileman->win, _e_fileman_delete_cb);
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
fileman->win->data = fileman;
2005-10-10 09:33:13 -07:00
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
fileman->evas = e_win_evas_get(fileman->win);
2005-10-10 09:33:13 -07:00
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
e_win_name_class_set(fileman->win, "Efm ", "_fileman");
2005-10-10 09:33:13 -07:00
e_win_title_set(fileman->win, dir);
evas_event_freeze(fileman->evas);
fileman->smart = e_fm_add(fileman->evas);
2005-10-10 09:33:13 -07:00
e_fm_e_win_set(fileman->smart, fileman->win);
2005-10-30 01:40:37 -07:00
fileman->main = e_scrollframe_add(fileman->evas);
e_scrollframe_custom_theme_set(fileman->main, "base/themes/fileman",
"fileman/main");
e_scrollframe_extern_pan_set(fileman->main, fileman->smart,
_e_fileman_scroll_set,
_e_fileman_scroll_get,
_e_fileman_scroll_max_get,
_e_fileman_scroll_child_size_get);
e_win_resize_callback_set(fileman->win, _e_fileman_resize_cb);
e_win_resize(fileman->win, 570, 355);
e_fm_dir_set(fileman->smart, dir);
2005-10-30 01:40:37 -07:00
ecore_x_dnd_aware_set(fileman->win->evas_win, 1);
evas_event_thaw(fileman->evas);
evas_object_focus_set(fileman->main, 0);
evas_object_focus_set(fileman->smart, 1);
evas_object_propagate_events_set(fileman->smart, 0);
fileman->event_handlers = evas_list_append(fileman->event_handlers,
ecore_event_handler_add(E_EVENT_FM_RECONFIGURE,
_e_fileman_reconfigure_cb,
fileman));
D(("e_fileman_new: ok\n"));
2005-10-10 09:33:13 -07:00
return fileman;
}
2005-10-30 01:40:37 -07:00
static void
_e_fileman_scroll_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
{
e_fm_scroll_set(obj, x, y);
}
static void
_e_fileman_scroll_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
{
e_fm_scroll_get(obj, x, y);
}
static void
_e_fileman_scroll_max_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
{
e_fm_scroll_max_get(obj, x, y);
}
static void
_e_fileman_scroll_child_size_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
{
e_fm_geometry_virtual_get(obj, x, y);
}
void
e_fileman_selector_enable(E_Fileman *fileman, void (*func)(E_Fileman *fileman, char *file, void *data), void *data)
{
fileman->selector.func = func;
fileman->selector.data = data;
e_fm_selector_enable(fileman->smart, _e_fileman_selector_cb, fileman);
}
2005-10-10 09:33:13 -07:00
void
e_fileman_show(E_Fileman *fileman)
{
if (!fileman) return;
D(("e_fileman_show: (%p)\n", fileman));
2005-10-10 09:33:13 -07:00
e_win_show(fileman->win);
evas_object_show(fileman->main);
}
void
e_fileman_hide(E_Fileman *fileman)
{
if (!fileman) return;
D(("e_fileman_hide: (%p)\n", fileman));
2005-10-10 09:33:13 -07:00
e_win_hide(fileman->win);
evas_object_hide(fileman->main);
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
}
static void
_e_fileman_free(E_Fileman *fileman)
2005-10-10 09:33:13 -07:00
{
D(("e_fileman_free: (%p)\n", fileman));
while (fileman->event_handlers)
{
ecore_event_handler_del(fileman->event_handlers->data);
fileman->event_handlers = evas_list_remove_list(fileman->event_handlers, fileman->event_handlers);
}
2005-10-30 01:40:37 -07:00
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
evas_object_del(fileman->smart);
2005-10-10 09:33:13 -07:00
evas_object_del(fileman->main);
e_object_del(E_OBJECT(fileman->win));
free(fileman);
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
}
2005-10-10 09:33:13 -07:00
static void
_e_fileman_resize_cb(E_Win *win)
2005-10-10 09:33:13 -07:00
{
E_Fileman *fileman;
2005-10-10 09:33:13 -07:00
fileman = win->data;
evas_object_resize(fileman->main, win->w, win->h);
}
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
2005-10-10 09:33:13 -07:00
static void
_e_fileman_delete_cb(E_Win *win)
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
{
2005-10-10 09:33:13 -07:00
E_Fileman *fileman;
fileman = win->data;
D(("e_fileman_delete_cb: (%p)\n", fileman));
2005-10-10 09:33:13 -07:00
e_object_del(E_OBJECT(fileman));
EFM - The E17 file manager and file browser smart object. *** BEFORE YOU USE *** This is alpha software and may cause E17 to crash, lockup, use 99% of your cpu, or even delete your files! I would advise using it in Xnest if you want to test or develop it. *** BEFORE YOU USE *** EFM can: - browse files and directories - generate thumbnails - launch executables - do some xdnd - monitor files and directories - delete and rename files EFM cant: - scroll - associate applications with files - purge its thumbnails (do it manually: ~/.e/e/fileman/thumbnails) - do a lot of things you'd expect it to do because its still in alpha stage Current TODO: - scrolling - we need a redraw function that will just re-arrange and not do the whole thing. for example, when we resize, we should just check the file offset and fill the empty space with icons - is the offset code working properly? i have a feeling we're displayin more icons that the visible space can take and they are being hidden. - emit all sorts of signals on double click, right click, single click... - aspect ratio on thumbnails. - add typebuffer like in evidence. - keyboard shortcuts for directory and file navigation. - multi select - allow for icon movement inside the canvas - add metadata system which allows us to save icon positions and will eventually allow us to have custom icon sizes, custom bgs per dir... - double check dir monitoring. note: when we are in a dir that is constantly changing, we cant keep calling redraw_new as it will kill us. - we need to fix the icon edc to allow us to have icon labels what will wrap on wrap=char - fix bugs SVN revision: 17370
2005-10-09 17:55:07 -07:00
}
2005-10-10 09:33:13 -07:00
static void
_e_fileman_selector_cb(Evas_Object *object, char *file, void *data)
{
E_Fileman *fileman;
fileman = data;
fileman->selector.func(fileman, file, fileman->selector.data);
//e_object_del(E_OBJECT(fileman));
}
static int
_e_fileman_reconfigure_cb(void *data, int type, void *event)
{
E_Event_Fm_Reconfigure *ev;
E_Fileman *fileman;
fileman = data;
ev = event;
e_scrollframe_child_region_show(fileman->main, ev->x, ev->y, ev->w, ev->h);
return 1;
}