shelf can clip icons... and move them with it.. try resizing (by the


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 22 years ago
parent e173a57884
commit 4a7584f4fc
  1. BIN
      data/config/appearance/default/shelves/default.bits.db
  2. 2
      src/e.h
  3. 15
      src/icons.c
  4. 3
      src/shelf.c
  5. 7
      src/util.c
  6. 2
      src/view.c

@ -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);

@ -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…
Cancel
Save