forked from enlightenment/enlightenment
shelf can clip icons... and move them with it.. try resizing (by the
lower-right corner of the shelf) and them move it around.. :) you'll see what i mean... again - this is me just testing stuff... i think i now know enough works and what i need to do to go around and fix thing sup so they are done "right" :) SVN revision: 4250
This commit is contained in:
parent
e173a57884
commit
4a7584f4fc
Binary file not shown.
2
src/e.h
2
src/e.h
|
@ -12,6 +12,7 @@
|
|||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <fnmatch.h>
|
||||
#ifdef WITH_DMALLOC
|
||||
#include <dmalloc.h>
|
||||
#endif
|
||||
|
@ -610,6 +611,7 @@ char *e_file_real(char *file);
|
|||
char *e_file_get_file(char *file);
|
||||
char *e_file_get_dir(char *file);
|
||||
void *e_memdup(void *data, int size);
|
||||
int e_glob_matches(char *str, char *glob);
|
||||
|
||||
void e_exec_set_args(int argc, char **argv);
|
||||
void e_exec_restart(void);
|
||||
|
|
15
src/icons.c
15
src/icons.c
|
@ -160,6 +160,8 @@ e_icon_set_filename(E_Icon *icon, char *file)
|
|||
void
|
||||
e_icon_update(E_Icon *icon)
|
||||
{
|
||||
int obj_new = 0;
|
||||
|
||||
if (!icon->changed) return;
|
||||
if (((icon->current.icon) && (icon->previous.icon) &&
|
||||
(strcmp(icon->current.icon, icon->previous.icon))) ||
|
||||
|
@ -176,6 +178,7 @@ e_icon_update(E_Icon *icon)
|
|||
evas_set_layer(icon->view->evas, icon->obj.filename, 10);
|
||||
icon->previous.x = icon->current.x - 1;
|
||||
icon->previous.visible = icon->current.visible - 1;
|
||||
obj_new = 1;
|
||||
}
|
||||
if (!icon->obj.icon)
|
||||
{
|
||||
|
@ -183,6 +186,18 @@ e_icon_update(E_Icon *icon)
|
|||
evas_set_layer(icon->view->evas, icon->obj.icon, 10);
|
||||
icon->previous.x = icon->current.x - 1;
|
||||
icon->previous.visible = icon->current.visible - 1;
|
||||
obj_new = 1;
|
||||
}
|
||||
if (obj_new)
|
||||
{
|
||||
if (icon->shelf)
|
||||
{
|
||||
E_Shelf *sh;
|
||||
|
||||
sh = icon->shelf;
|
||||
e_shelf_del_icon(sh, icon);
|
||||
e_shelf_add_icon(sh, icon);
|
||||
}
|
||||
}
|
||||
if ((icon->previous.x != icon->current.x) ||
|
||||
(icon->previous.y != icon->current.y))
|
||||
|
|
|
@ -245,8 +245,8 @@ e_shelf_move_by(E_Shelf *sh, int dx, int dy)
|
|||
pl = pr = pt = pb = 0;
|
||||
if (sh->bit.border) ebits_get_insets(sh->bit.border, &pl, &pr, &pt, &pb);
|
||||
evas_move(sh->view->evas, sh->obj.clipper, sh->x + pl, sh->y + pt);
|
||||
printf("move to %i %i\n", sh->x + pl, sh->y + pt);
|
||||
}
|
||||
return;
|
||||
for (l = sh->view->icons; l; l = l->next)
|
||||
{
|
||||
E_Icon *icon;
|
||||
|
@ -274,6 +274,7 @@ e_shelf_resize(E_Shelf *sh, int w, int h)
|
|||
pl = pr = pt = pb = 0;
|
||||
if (sh->bit.border) ebits_get_insets(sh->bit.border, &pl, &pr, &pt, &pb);
|
||||
evas_resize(sh->view->evas, sh->obj.clipper, sh->w - pl - pr, sh->h - pt - pb);
|
||||
printf("resize to %i %i\n", sh->w - pl - pr, sh->h - pt - pb);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -122,3 +122,10 @@ e_memdup(void *data, int size)
|
|||
memcpy(data_dup, data, size);
|
||||
return data_dup;
|
||||
}
|
||||
|
||||
int
|
||||
e_glob_matches(char *str, char *glob)
|
||||
{
|
||||
if (!fnmatch(glob, str, 0)) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -686,12 +686,14 @@ e_view_add_icon(E_View *v, E_Icon *icon)
|
|||
e_icon_realize(icon);
|
||||
v->changed = 1;
|
||||
v->icons = evas_list_append(v->icons, icon);
|
||||
e_shelf_add_icon(v->shelves->data, icon);
|
||||
}
|
||||
|
||||
void
|
||||
e_view_del_icon(E_View *v, E_Icon *icon)
|
||||
{
|
||||
if (!icon->view) return;
|
||||
e_shelf_del_icon(v->shelves->data, icon);
|
||||
e_icon_unrealize(icon);
|
||||
OBJ_UNREF(icon);
|
||||
icon->view = NULL;
|
||||
|
|
Loading…
Reference in New Issue