enlightenment/src/bin/e_fileman.c

178 lines
4.3 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:
* - dont allow for menus on ".."
* - add scrollers.
* - xdnd
* - thumb fork / cache
* - proper mime system
* - create x, y, w, h in canvas struct and make them auto update
****/
2005-10-10 09:33:13 -07:00
static void _e_fileman_vscrollbar_drag_cb(Evas_Object *object, double value, void *data);
static void _e_fileman_reconf_cb(void *data, int type, void *event);
2005-10-10 09:33:13 -07:00
static void _e_fileman_cb_resize(E_Win *win);
static void _e_fileman_cb_delete(E_Win *win);
static void _e_fileman_free(E_Fileman *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
E_Fileman *
2005-10-10 09:33:13 -07:00
e_fileman_new(E_Container *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
{
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;
}
if (!getcwd(dir, sizeof(dir)))
return NULL;
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;
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_delete_callback_set(fileman->win, _e_fileman_cb_delete);
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);
fileman->main = edje_object_add(fileman->evas);
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_theme_edje_object_set(fileman->main, "base/theme/fileman/main",
2005-10-10 09:33:13 -07:00
"fileman/main");
fileman->vscrollbar = e_scrollbar_add(fileman->evas);
e_scrollbar_direction_set(fileman->vscrollbar, E_SCROLLBAR_VERTICAL);
e_scrollbar_callback_drag_add(fileman->vscrollbar, _e_fileman_vscrollbar_drag_cb, fileman);
e_win_resize_callback_set(fileman->win, _e_fileman_cb_resize);
e_win_resize(fileman->win, 640, 480);
e_fm_init(); // this needs to move to e's global init
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->smart = e_fm_add(fileman->evas);
2005-10-10 09:33:13 -07:00
e_fm_e_win_set(fileman->smart, fileman->win);
//e_fm_dir_set(fileman->smart, dir);
2005-10-10 09:33:13 -07:00
edje_object_part_swallow(fileman->main, "icon_area", fileman->smart);
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
ecore_x_dnd_aware_set(fileman->win->evas_win, 1);
2005-10-10 09:33:13 -07:00
fileman->event_handlers = evas_list_append(fileman->event_handlers,
ecore_event_handler_add(E_EVENT_FM_RECONFIGURE,
_e_fileman_reconf_cb,
fileman));
2005-10-10 09:33:13 -07:00
return fileman;
}
void
e_fileman_show(E_Fileman *fileman)
{
if (!fileman) return;
e_win_show(fileman->win);
evas_object_show(fileman->main);
}
void
e_fileman_hide(E_Fileman *fileman)
{
if (!fileman) return;
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
{
e_object_unref(E_OBJECT(fileman->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
evas_object_del(fileman->vscrollbar);
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));
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
free(fileman);
}
2005-10-10 09:33:13 -07:00
static void
_e_fileman_cb_resize(E_Win *win)
{
E_Fileman *fileman;
Evas_Coord w, h;
2005-10-10 09:33:13 -07:00
fileman = win->data;
evas_object_resize(fileman->main, win->w, win->h);
e_fm_geometry_virtual_get(fileman->smart, &w, &h);
if (h > win->h)
edje_object_part_swallow(fileman->main, "vscrollbar", fileman->vscrollbar);
else
{
edje_object_part_unswallow(fileman->main, fileman->vscrollbar);
evas_object_hide(fileman->vscrollbar);
}
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
2005-10-10 09:33:13 -07:00
static void
_e_fileman_cb_delete(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;
e_object_del(E_OBJECT(fileman));
e_object_del(E_OBJECT(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
static void
_e_fileman_vscrollbar_drag_cb(Evas_Object *object, double value, void *data)
{
E_Fileman *fileman;
fileman = data;
e_fm_scroll_vertical(fileman->smart, value);
}
static void
_e_fileman_reconf_cb(void *data, int type, void *event)
{
E_Event_Fm_Reconfigure *ev;
E_Fileman *fileman;
fileman = data;
ev = event;
evas_event_freeze(fileman->evas);
if (ev->h > fileman->win->h)
edje_object_part_swallow(fileman->main, "vscrollbar", fileman->vscrollbar);
else
{
edje_object_part_unswallow(fileman->main, fileman->vscrollbar);
evas_object_hide(fileman->vscrollbar);
}
evas_event_thaw(fileman->evas);
}