forked from enlightenment/enlightenment
parent
fffdf4722d
commit
d1077ae93e
|
@ -28,5 +28,5 @@ util.c \
|
||||||
view.c \
|
view.c \
|
||||||
e.h
|
e.h
|
||||||
|
|
||||||
enlightenment_LDADD = @evas_libs@ @edb_libs@ @ebits_libs@ @ecore_libs@ @efsd_libs@ -lm $(INTLLIBS)
|
enlightenment_LDADD = @evas_libs@ @edb_libs@ @ebits_libs@ @ecore_libs@ @efsd_libs@ -lm $(INTLLIBS) $(LDADD_FLAGS)
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ static void e_idle(void *data);
|
||||||
static void
|
static void
|
||||||
e_idle(void *data)
|
e_idle(void *data)
|
||||||
{
|
{
|
||||||
|
printf("idle...\n");
|
||||||
e_db_flush();
|
e_db_flush();
|
||||||
return;
|
return;
|
||||||
UN(data);
|
UN(data);
|
||||||
|
@ -166,7 +167,7 @@ e_desktops_init_file_display(E_Desktop *desk)
|
||||||
desk->view->bg->image = strdup(PACKAGE_DATA_DIR"/data/images/bg.jpg");
|
desk->view->bg->image = strdup(PACKAGE_DATA_DIR"/data/images/bg.jpg");
|
||||||
/* fixme later */
|
/* fixme later */
|
||||||
/* uncomment this and comment out the next line for some tress testing */
|
/* uncomment this and comment out the next line for some tress testing */
|
||||||
/* desk->view->dir = strdup("/dev");*/
|
/* desk->view->dir = strdup("/dev"); */
|
||||||
desk->view->dir = strdup(e_file_home());
|
desk->view->dir = strdup(e_file_home());
|
||||||
e_view_realize(desk->view);
|
e_view_realize(desk->view);
|
||||||
if (desk->view->options.back_pixmap) e_view_update(desk->view);
|
if (desk->view->options.back_pixmap) e_view_update(desk->view);
|
||||||
|
|
15
src/e.h
15
src/e.h
|
@ -315,6 +315,14 @@ struct _E_View
|
||||||
struct {
|
struct {
|
||||||
Evas_Render_Method render_method;
|
Evas_Render_Method render_method;
|
||||||
int back_pixmap;
|
int back_pixmap;
|
||||||
|
struct {
|
||||||
|
int method;
|
||||||
|
struct {
|
||||||
|
int dir;
|
||||||
|
int w, h;
|
||||||
|
int next_pos;
|
||||||
|
} grid;
|
||||||
|
} arrange;
|
||||||
} options;
|
} options;
|
||||||
|
|
||||||
Evas evas;
|
Evas evas;
|
||||||
|
@ -380,11 +388,16 @@ struct _E_Icon
|
||||||
char *selected;
|
char *selected;
|
||||||
char *clicked;
|
char *clicked;
|
||||||
} icon;
|
} icon;
|
||||||
|
struct {
|
||||||
|
int have;
|
||||||
|
int x, y;
|
||||||
|
} coord;
|
||||||
int ready;
|
int ready;
|
||||||
} info;
|
} info;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
int x, y, w, h;
|
int x, y;
|
||||||
|
int ix, iy, tx, ty, iw, ih, tw, th, w, h;
|
||||||
struct {
|
struct {
|
||||||
int text_location;
|
int text_location;
|
||||||
int show_text;
|
int show_text;
|
||||||
|
|
92
src/fs.c
92
src/fs.c
|
@ -6,27 +6,27 @@ static Evas_List fs_handlers = NULL;
|
||||||
static void _e_fs_fd_handle(int fd);
|
static void _e_fs_fd_handle(int fd);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_fs_fd_handle_a_la_cK(int fd)
|
_e_fs_fd_handle(int fd)
|
||||||
{
|
{
|
||||||
EfsdEvent ev;
|
Evas_List events = NULL;
|
||||||
Evas_List l;
|
double start, current;
|
||||||
|
|
||||||
|
printf("############## fs event...\n");
|
||||||
|
start = e_get_time();
|
||||||
while ((ec) && efsd_events_pending(ec))
|
while ((ec) && efsd_events_pending(ec))
|
||||||
{
|
{
|
||||||
ZERO(&ev, EfsdEvent, 1);
|
EfsdEvent *ev;
|
||||||
|
|
||||||
if (efsd_next_event(ec, &ev) >= 0)
|
ev = NEW(EfsdEvent, 1);
|
||||||
{
|
ZERO(ev, EfsdEvent, 1);
|
||||||
for (l = fs_handlers; l; l = l->next)
|
|
||||||
{
|
|
||||||
void (*func) (EfsdEvent *ev);
|
|
||||||
|
|
||||||
func = l->data;
|
if (efsd_next_event(ec, ev) >= 0)
|
||||||
func(&ev);
|
{
|
||||||
}
|
events = evas_list_append(events, ev);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
FREE(ev);
|
||||||
efsd_close(ec);
|
efsd_close(ec);
|
||||||
e_del_event_fd(fd);
|
e_del_event_fd(fd);
|
||||||
ec = NULL;
|
ec = NULL;
|
||||||
|
@ -35,63 +35,37 @@ _e_fs_fd_handle_a_la_cK(int fd)
|
||||||
printf("EEEEEEEEEEK efsd went wonky\n");
|
printf("EEEEEEEEEEK efsd went wonky\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
efsd_event_cleanup(&ev);
|
/* spent more thna 1/20th of a second here.. get out */
|
||||||
|
current = e_get_time();
|
||||||
|
if ((current - start) > 0.05)
|
||||||
|
{
|
||||||
|
printf("fs... too much time spent..\n");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_e_fs_fd_handle(int fd)
|
|
||||||
{
|
|
||||||
EfsdEvent ev;
|
|
||||||
int i = 1;
|
|
||||||
|
|
||||||
/* VERY nasty - sicne efas has no way of checkign If an event is in the */
|
|
||||||
/* event queue waiting to be picked up - i cant loop and get the events */
|
|
||||||
printf("_e_fs_fd_handle(%i)\n", fd);
|
|
||||||
while (i >= 0)
|
|
||||||
{
|
|
||||||
fd_set fdset;
|
|
||||||
struct timeval tv;
|
|
||||||
|
|
||||||
FD_ZERO(&fdset);
|
|
||||||
FD_SET(fd, &fdset);
|
|
||||||
tv.tv_sec = 0;
|
|
||||||
tv.tv_usec = 0;
|
|
||||||
select(fd + 1, &fdset, NULL, NULL, &tv);
|
|
||||||
if (FD_ISSET(fd, &fdset))
|
|
||||||
{
|
|
||||||
i = efsd_next_event(ec, &ev);
|
|
||||||
if (i < 0)
|
|
||||||
{
|
|
||||||
efsd_close(ec);
|
|
||||||
e_del_event_fd(fd);
|
|
||||||
/* FIXME: need to queue a popup dialog here saying */
|
|
||||||
/* efsd went wonky */
|
|
||||||
printf("EEEEEEEEEEK efsd went wonky\n");
|
|
||||||
/*
|
|
||||||
ec = efsd_open();
|
|
||||||
if (ec)
|
|
||||||
e_add_event_fd(efsd_get_connection_fd(ec),
|
|
||||||
_e_fs_fd_handle);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
if (i >= 0)
|
if (events)
|
||||||
{
|
{
|
||||||
Evas_List l;
|
Evas_List l;
|
||||||
|
|
||||||
for (l = fs_handlers; l; l = l->next)
|
for (l = events; l; l = l->next)
|
||||||
|
{
|
||||||
|
Evas_List ll;
|
||||||
|
EfsdEvent *ev;
|
||||||
|
|
||||||
|
ev = l->data;
|
||||||
|
for (ll = fs_handlers; ll; ll = ll->next)
|
||||||
{
|
{
|
||||||
void (*func) (EfsdEvent *ev);
|
void (*func) (EfsdEvent *ev);
|
||||||
|
|
||||||
func = l->data;
|
func = ll->data;
|
||||||
func(&ev);
|
func(ev);
|
||||||
}
|
}
|
||||||
efsd_event_cleanup(&ev);
|
efsd_event_cleanup(ev);
|
||||||
|
FREE(ev);
|
||||||
}
|
}
|
||||||
|
evas_list_free(events);
|
||||||
}
|
}
|
||||||
else
|
printf("############## fs done\n");
|
||||||
i = -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -125,7 +99,7 @@ e_fs_init(void)
|
||||||
fprintf(stderr, "efsd is not running - please run efsd.\n");
|
fprintf(stderr, "efsd is not running - please run efsd.\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
e_add_event_fd(efsd_get_connection_fd(ec), _e_fs_fd_handle_a_la_cK);
|
e_add_event_fd(efsd_get_connection_fd(ec), _e_fs_fd_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
EfsdConnection *
|
EfsdConnection *
|
||||||
|
|
153
src/icons.c
153
src/icons.c
|
@ -79,10 +79,113 @@ e_icon_new(void)
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_icon_place_grid(E_Icon *icon)
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
if (icon->view->options.arrange.grid.dir == 0) /* h */
|
||||||
|
{
|
||||||
|
int gw;
|
||||||
|
|
||||||
|
if (icon->view->options.arrange.grid.w > 0)
|
||||||
|
gw = icon->view->size.w / icon->view->options.arrange.grid.w;
|
||||||
|
else gw = 1;
|
||||||
|
y = icon->view->options.arrange.grid.next_pos / gw;
|
||||||
|
x = icon->view->options.arrange.grid.next_pos - (y * gw);
|
||||||
|
x *= icon->view->options.arrange.grid.w;
|
||||||
|
y *= icon->view->options.arrange.grid.h;
|
||||||
|
e_icon_set_xy(icon, x, y);
|
||||||
|
printf("GRID PLACE at %i %i\n", x, y);
|
||||||
|
icon->view->options.arrange.grid.next_pos++;
|
||||||
|
}
|
||||||
|
else /* v */
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_icon_pre_show(E_Icon *icon)
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
if (icon->info.ready) return;
|
||||||
|
printf("*********!!!!!!!!!!!!!!!********* update from e_icon_pre_show()\n");
|
||||||
|
e_icon_update(icon);
|
||||||
|
icon->info.ready = 1;
|
||||||
|
if (icon->info.coord.have)
|
||||||
|
{
|
||||||
|
x = icon->info.coord.x;
|
||||||
|
y = icon->info.coord.y;
|
||||||
|
e_icon_set_xy(icon, x, y);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (icon->view->options.arrange.method == 0) /* grid */
|
||||||
|
{
|
||||||
|
/* need to redo whole grid... */
|
||||||
|
if ((icon->current.w > icon->view->options.arrange.grid.w) ||
|
||||||
|
(icon->current.h > icon->view->options.arrange.grid.h))
|
||||||
|
{
|
||||||
|
Evas_List l;
|
||||||
|
|
||||||
|
icon->view->options.arrange.grid.next_pos = 0;
|
||||||
|
icon->view->options.arrange.grid.w = icon->current.w;
|
||||||
|
icon->view->options.arrange.grid.h = icon->current.h;
|
||||||
|
for (l = icon->view->icons; l; l = l->next)
|
||||||
|
{
|
||||||
|
E_Icon *ic;
|
||||||
|
|
||||||
|
ic = l->data;
|
||||||
|
if (ic->info.ready)
|
||||||
|
e_icon_place_grid(ic);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
e_icon_place_grid(icon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
e_icon_show(icon);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
e_icon_calulcate_geometry(E_Icon *icon)
|
e_icon_calulcate_geometry(E_Icon *icon)
|
||||||
{
|
{
|
||||||
|
int iw, ih, tw, th;
|
||||||
|
double dtw, dth;
|
||||||
|
|
||||||
if (!icon->view) return;
|
if (!icon->view) return;
|
||||||
|
dtw = 0; dth = 0; iw = 0; ih = 0;
|
||||||
|
evas_get_geometry(icon->view->evas, icon->obj.filename, NULL, NULL, &dtw, &dth);
|
||||||
|
tw = (int)dtw;
|
||||||
|
th = (int)dth;
|
||||||
|
evas_get_image_size(icon->view->evas, icon->obj.icon, &iw, &ih);
|
||||||
|
if (tw < iw)
|
||||||
|
{
|
||||||
|
icon->current.ix = icon->current.x;
|
||||||
|
icon->current.iy = icon->current.y;
|
||||||
|
icon->current.tx = icon->current.x + ((iw - tw) / 2);
|
||||||
|
icon->current.ty = icon->current.y + ih;
|
||||||
|
icon->current.w = iw;
|
||||||
|
icon->current.h = ih + th;
|
||||||
|
icon->current.iw = iw;
|
||||||
|
icon->current.ih = ih;
|
||||||
|
icon->current.tw = tw;
|
||||||
|
icon->current.th = th;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
icon->current.ix = icon->current.x + ((tw - iw) / 2);
|
||||||
|
icon->current.iy = icon->current.y;
|
||||||
|
icon->current.tx = icon->current.x;
|
||||||
|
icon->current.ty = icon->current.y + ih;
|
||||||
|
icon->current.w = tw;
|
||||||
|
icon->current.h = ih + th;
|
||||||
|
icon->current.iw = iw;
|
||||||
|
icon->current.ih = ih;
|
||||||
|
icon->current.tw = tw;
|
||||||
|
icon->current.th = th;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -90,10 +193,10 @@ e_icon_realize(E_Icon *icon)
|
||||||
{
|
{
|
||||||
icon->obj.sel1 = evas_add_rectangle(icon->view->evas);
|
icon->obj.sel1 = evas_add_rectangle(icon->view->evas);
|
||||||
icon->obj.sel2 = evas_add_rectangle(icon->view->evas);
|
icon->obj.sel2 = evas_add_rectangle(icon->view->evas);
|
||||||
evas_set_layer(icon->view->evas, icon->obj.sel1, 11);
|
|
||||||
evas_set_layer(icon->view->evas, icon->obj.sel2, 11);
|
|
||||||
evas_set_color(icon->view->evas, icon->obj.sel1, 0, 0, 0, 0);
|
evas_set_color(icon->view->evas, icon->obj.sel1, 0, 0, 0, 0);
|
||||||
evas_set_color(icon->view->evas, icon->obj.sel2, 0, 0, 0, 0);
|
evas_set_color(icon->view->evas, icon->obj.sel2, 0, 0, 0, 0);
|
||||||
|
evas_set_layer(icon->view->evas, icon->obj.sel1, 11);
|
||||||
|
evas_set_layer(icon->view->evas, icon->obj.sel2, 11);
|
||||||
evas_callback_add(icon->view->evas, icon->obj.sel1, CALLBACK_MOUSE_IN, e_icon_in_cb, icon);
|
evas_callback_add(icon->view->evas, icon->obj.sel1, CALLBACK_MOUSE_IN, e_icon_in_cb, icon);
|
||||||
evas_callback_add(icon->view->evas, icon->obj.sel1, CALLBACK_MOUSE_OUT, e_icon_out_cb, icon);
|
evas_callback_add(icon->view->evas, icon->obj.sel1, CALLBACK_MOUSE_OUT, e_icon_out_cb, icon);
|
||||||
evas_callback_add(icon->view->evas, icon->obj.sel1, CALLBACK_MOUSE_DOWN, e_icon_down_cb, icon);
|
evas_callback_add(icon->view->evas, icon->obj.sel1, CALLBACK_MOUSE_DOWN, e_icon_down_cb, icon);
|
||||||
|
@ -169,7 +272,6 @@ void
|
||||||
e_icon_set_filename(E_Icon *icon, char *file)
|
e_icon_set_filename(E_Icon *icon, char *file)
|
||||||
{
|
{
|
||||||
IF_FREE(icon->file);
|
IF_FREE(icon->file);
|
||||||
printf("e_icon_set_filename(%s)\n", file);
|
|
||||||
icon->file = strdup(file);
|
icon->file = strdup(file);
|
||||||
icon->changed = 1;
|
icon->changed = 1;
|
||||||
if (icon->view) icon->view->changed = 1;
|
if (icon->view) icon->view->changed = 1;
|
||||||
|
@ -181,6 +283,7 @@ e_icon_update(E_Icon *icon)
|
||||||
int obj_new = 0;
|
int obj_new = 0;
|
||||||
|
|
||||||
if (!icon->changed) return;
|
if (!icon->changed) return;
|
||||||
|
printf("icon (%s).. update\n", icon->file);
|
||||||
if (icon->current.state.clicked)
|
if (icon->current.state.clicked)
|
||||||
{
|
{
|
||||||
if (icon->info.icon.clicked)
|
if (icon->info.icon.clicked)
|
||||||
|
@ -203,15 +306,19 @@ e_icon_update(E_Icon *icon)
|
||||||
}
|
}
|
||||||
if ((!icon->current.state.selected) && (icon->obj.sel_icon))
|
if ((!icon->current.state.selected) && (icon->obj.sel_icon))
|
||||||
{
|
{
|
||||||
printf("no\n");
|
|
||||||
ebits_hide(icon->obj.sel_icon);
|
ebits_hide(icon->obj.sel_icon);
|
||||||
ebits_free(icon->obj.sel_icon);
|
ebits_free(icon->obj.sel_icon);
|
||||||
icon->obj.sel_icon = NULL;
|
icon->obj.sel_icon = NULL;
|
||||||
}
|
}
|
||||||
if (icon->obj.icon)
|
if ((icon->obj.icon) &&
|
||||||
|
(icon->current.icon) &&
|
||||||
|
((!icon->previous.icon) ||
|
||||||
|
((icon->previous.icon) &&
|
||||||
|
(!strcmp(icon->current.icon, icon->previous.icon)))))
|
||||||
{
|
{
|
||||||
int iw, ih;
|
int iw, ih;
|
||||||
|
|
||||||
|
printf("set file etc.\n");
|
||||||
evas_set_image_file(icon->view->evas, icon->obj.icon, icon->current.icon);
|
evas_set_image_file(icon->view->evas, icon->obj.icon, icon->current.icon);
|
||||||
evas_get_image_size(icon->view->evas, icon->obj.icon, &iw, &ih);
|
evas_get_image_size(icon->view->evas, icon->obj.icon, &iw, &ih);
|
||||||
evas_set_image_fill(icon->view->evas, icon->obj.icon, 0, 0, iw, ih);
|
evas_set_image_fill(icon->view->evas, icon->obj.icon, 0, 0, iw, ih);
|
||||||
|
@ -257,34 +364,32 @@ e_icon_update(E_Icon *icon)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((icon->previous.x != icon->current.x) ||
|
if ((icon->previous.x != icon->current.x) ||
|
||||||
(icon->previous.y != icon->current.y))
|
(icon->previous.y != icon->current.y) ||
|
||||||
|
(icon->current.visible != icon->previous.visible) ||
|
||||||
|
(obj_new))
|
||||||
{
|
{
|
||||||
int fx, fy;
|
e_icon_calulcate_geometry(icon);
|
||||||
int iw, ih;
|
/* HRRRM - must optimize this*/
|
||||||
double tw, th;
|
evas_move(icon->view->evas, icon->obj.icon, icon->current.ix, icon->current.iy);
|
||||||
|
evas_move(icon->view->evas, icon->obj.filename, icon->current.tx, icon->current.ty);
|
||||||
evas_get_geometry(icon->view->evas, icon->obj.filename, NULL, NULL, &tw, &th);
|
evas_move(icon->view->evas, icon->obj.sel1, icon->current.ix, icon->current.iy);
|
||||||
evas_get_image_size(icon->view->evas, icon->obj.icon, &iw, &ih);
|
evas_resize(icon->view->evas, icon->obj.sel1, icon->current.iw, icon->current.ih);
|
||||||
fx = icon->current.x + ((iw - tw) / 2);
|
evas_move(icon->view->evas, icon->obj.sel2, icon->current.tx, icon->current.ty);
|
||||||
fy = icon->current.y + ih;
|
evas_resize(icon->view->evas, icon->obj.sel2, icon->current.tw, icon->current.th);
|
||||||
evas_move(icon->view->evas, icon->obj.icon, icon->current.x, icon->current.y);
|
|
||||||
evas_move(icon->view->evas, icon->obj.filename, fx, fy);
|
|
||||||
evas_move(icon->view->evas, icon->obj.sel1, icon->current.x, icon->current.y);
|
|
||||||
evas_resize(icon->view->evas, icon->obj.sel1, iw, ih);
|
|
||||||
evas_move(icon->view->evas, icon->obj.sel2, fx, fy);
|
|
||||||
evas_resize(icon->view->evas, icon->obj.sel2, tw, th);
|
|
||||||
evas_set_color(icon->view->evas, icon->obj.filename, 0, 0, 0, 255);
|
evas_set_color(icon->view->evas, icon->obj.filename, 0, 0, 0, 255);
|
||||||
if (icon->obj.sel_icon)
|
/**/ if (icon->obj.sel_icon)
|
||||||
{
|
{
|
||||||
int pl, pr, pt, pb;
|
int pl, pr, pt, pb;
|
||||||
|
|
||||||
pl = pr = pt = pb = 0;
|
pl = pr = pt = pb = 0;
|
||||||
ebits_get_insets(icon->obj.sel_icon, &pl, &pr, &pt, &pb);
|
ebits_get_insets(icon->obj.sel_icon, &pl, &pr, &pt, &pb);
|
||||||
ebits_move(icon->obj.sel_icon, icon->current.x - pl, icon->current.y - pt);
|
ebits_move(icon->obj.sel_icon, icon->current.ix - pl, icon->current.iy - pt);
|
||||||
ebits_resize(icon->obj.sel_icon, iw + pl + pr, ih + pt + pb);
|
ebits_resize(icon->obj.sel_icon, icon->current.iw + pl + pr, icon->current.ih + pt + pb);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (icon->current.visible != icon->previous.visible)
|
||||||
|
{
|
||||||
if (icon->current.visible)
|
if (icon->current.visible)
|
||||||
{
|
{
|
||||||
evas_show(icon->view->evas, icon->obj.icon);
|
evas_show(icon->view->evas, icon->obj.icon);
|
||||||
|
@ -301,6 +406,8 @@ e_icon_update(E_Icon *icon)
|
||||||
evas_hide(icon->view->evas, icon->obj.sel2);
|
evas_hide(icon->view->evas, icon->obj.sel2);
|
||||||
if (icon->obj.sel_icon) ebits_hide(icon->obj.sel_icon);
|
if (icon->obj.sel_icon) ebits_hide(icon->obj.sel_icon);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
icon->previous = icon->current;
|
icon->previous = icon->current;
|
||||||
icon->changed = 0;
|
icon->changed = 0;
|
||||||
|
printf("... done\n");
|
||||||
}
|
}
|
||||||
|
|
20
src/view.c
20
src/view.c
|
@ -415,8 +415,6 @@ e_view_file_added(int id, char *file)
|
||||||
if (!e_view_filter_file(v, file)) return;
|
if (!e_view_filter_file(v, file)) return;
|
||||||
icon = e_icon_new();
|
icon = e_icon_new();
|
||||||
e_icon_set_filename(icon, file);
|
e_icon_set_filename(icon, file);
|
||||||
e_icon_set_xy(icon, rand()%(v->size.w - 60), rand()%(v->size.h - 60));
|
|
||||||
e_icon_show(icon);
|
|
||||||
e_view_add_icon(v, icon);
|
e_view_add_icon(v, icon);
|
||||||
sprintf(buf, "%s/%s", v->dir, file);
|
sprintf(buf, "%s/%s", v->dir, file);
|
||||||
if (efsd_ready(e_fs_get_connection()))
|
if (efsd_ready(e_fs_get_connection()))
|
||||||
|
@ -426,7 +424,7 @@ e_view_file_added(int id, char *file)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("Efsd not ready.\n");
|
printf("*********** EEEEEEEEEEEEEEEEEK Efsd not ready.\n");
|
||||||
}
|
}
|
||||||
v->changed = 1;
|
v->changed = 1;
|
||||||
}
|
}
|
||||||
|
@ -616,7 +614,8 @@ e_view_handle_fs(EfsdEvent *ev)
|
||||||
}
|
}
|
||||||
icon->changed = 1;
|
icon->changed = 1;
|
||||||
icon->view->changed = 1;
|
icon->view->changed = 1;
|
||||||
if (!icon->info.link_get_id) icon->info.ready = 1;
|
if (!icon->info.link_get_id)
|
||||||
|
e_icon_pre_show(icon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -646,7 +645,8 @@ e_view_handle_fs(EfsdEvent *ev)
|
||||||
memcpy(icon->info.link, (char*)ev->efsd_reply_event.data, ev->efsd_reply_event.data_len);
|
memcpy(icon->info.link, (char*)ev->efsd_reply_event.data, ev->efsd_reply_event.data_len);
|
||||||
icon->info.link[ev->efsd_reply_event.data_len] = 0;
|
icon->info.link[ev->efsd_reply_event.data_len] = 0;
|
||||||
icon->info.link_get_id = 0;
|
icon->info.link_get_id = 0;
|
||||||
if (!icon->info.link_get_id) icon->info.ready = 1;
|
if (!icon->info.link_get_id)
|
||||||
|
e_icon_pre_show(icon);
|
||||||
icon->changed = 1;
|
icon->changed = 1;
|
||||||
icon->view->changed = 1;
|
icon->view->changed = 1;
|
||||||
printf("link_to = %s\n", icon->info.link);
|
printf("link_to = %s\n", icon->info.link);
|
||||||
|
@ -727,6 +727,7 @@ e_view_new(void)
|
||||||
#endif
|
#endif
|
||||||
views = evas_list_append(views, v);
|
views = evas_list_append(views, v);
|
||||||
|
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
E_Shelf *sh;
|
E_Shelf *sh;
|
||||||
|
|
||||||
|
@ -738,7 +739,7 @@ e_view_new(void)
|
||||||
e_shelf_resize(sh, 500, 350);
|
e_shelf_resize(sh, 500, 350);
|
||||||
v->shelves = evas_list_append(v->shelves, sh);
|
v->shelves = evas_list_append(v->shelves, sh);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -785,14 +786,14 @@ e_view_add_icon(E_View *v, E_Icon *icon)
|
||||||
e_icon_realize(icon);
|
e_icon_realize(icon);
|
||||||
v->changed = 1;
|
v->changed = 1;
|
||||||
v->icons = evas_list_append(v->icons, icon);
|
v->icons = evas_list_append(v->icons, icon);
|
||||||
e_shelf_add_icon(v->shelves->data, icon);
|
/* e_shelf_add_icon(v->shelves->data, icon); */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
e_view_del_icon(E_View *v, E_Icon *icon)
|
e_view_del_icon(E_View *v, E_Icon *icon)
|
||||||
{
|
{
|
||||||
if (!icon->view) return;
|
if (!icon->view) return;
|
||||||
e_shelf_del_icon(v->shelves->data, icon);
|
/* e_shelf_del_icon(v->shelves->data, icon); */
|
||||||
e_icon_unrealize(icon);
|
e_icon_unrealize(icon);
|
||||||
OBJ_UNREF(icon);
|
OBJ_UNREF(icon);
|
||||||
icon->view = NULL;
|
icon->view = NULL;
|
||||||
|
@ -823,6 +824,7 @@ e_view_realize(E_View *v)
|
||||||
image_cache,
|
image_cache,
|
||||||
font_dir);
|
font_dir);
|
||||||
v->win.main = evas_get_window(v->evas);
|
v->win.main = evas_get_window(v->evas);
|
||||||
|
evas_event_move(v->evas, -999999, -999999);
|
||||||
e_add_child(v->win.base, v->win.main);
|
e_add_child(v->win.base, v->win.main);
|
||||||
if (v->options.back_pixmap)
|
if (v->options.back_pixmap)
|
||||||
{
|
{
|
||||||
|
@ -905,6 +907,7 @@ e_view_update(E_View *v)
|
||||||
{
|
{
|
||||||
Evas_List l;
|
Evas_List l;
|
||||||
|
|
||||||
|
printf("view update\n");
|
||||||
if (v->changed)
|
if (v->changed)
|
||||||
{
|
{
|
||||||
for (l = v->icons; l; l = l->next)
|
for (l = v->icons; l; l = l->next)
|
||||||
|
@ -915,6 +918,7 @@ e_view_update(E_View *v)
|
||||||
e_icon_update(icon);
|
e_icon_update(icon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
printf("done\n");
|
||||||
if (v->options.back_pixmap)
|
if (v->options.back_pixmap)
|
||||||
{
|
{
|
||||||
Imlib_Updates up;
|
Imlib_Updates up;
|
||||||
|
|
Loading…
Reference in New Issue