diff --git a/data/config/appearance/default/shelves/default.bits.db b/data/config/appearance/default/shelves/default.bits.db index 5d9771fd5..509f6640a 100644 Binary files a/data/config/appearance/default/shelves/default.bits.db and b/data/config/appearance/default/shelves/default.bits.db differ diff --git a/src/e.h b/src/e.h index 4b13daf68..edee29cd9 100644 --- a/src/e.h +++ b/src/e.h @@ -12,6 +12,7 @@ #include #include #include +#include #ifdef WITH_DMALLOC #include #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); diff --git a/src/icons.c b/src/icons.c index f6ef64916..e829a84ee 100644 --- a/src/icons.c +++ b/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)) diff --git a/src/shelf.c b/src/shelf.c index 8f02f07af..83aa8e63d 100644 --- a/src/shelf.c +++ b/src/shelf.c @@ -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); } } diff --git a/src/util.c b/src/util.c index 24159b652..65bcb8eb4 100644 --- a/src/util.c +++ b/src/util.c @@ -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; +} diff --git a/src/view.c b/src/view.c index 3d53c1a8f..3b9fff0fc 100644 --- a/src/view.c +++ b/src/view.c @@ -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;