From f7f1cdc3173a336cb66427da97c829f837b48fec Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Tue, 9 Apr 2002 16:48:42 +0000 Subject: [PATCH] r1374: Adding or removing a .DirIcon refreshes the display. --- ROX-Filer/src/action.c | 8 ++++++++ ROX-Filer/src/usericons.c | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ROX-Filer/src/action.c b/ROX-Filer/src/action.c index 6d7a1ff6..b8417c86 100644 --- a/ROX-Filer/src/action.c +++ b/ROX-Filer/src/action.c @@ -876,6 +876,14 @@ static void do_delete(const char *src_path, const char *unused) { g_string_sprintf(message, "s%s", safe_path); send(); + if (strcmp(g_basename(safe_path), ".DirIcon") == 0) + { + gchar *dir; + dir = g_dirname(safe_path); + g_string_sprintf(message, "s%s", dir); + g_free(dir); + send(); + } } g_free(safe_path); diff --git a/ROX-Filer/src/usericons.c b/ROX-Filer/src/usericons.c index 73e03000..4a1a7dcf 100644 --- a/ROX-Filer/src/usericons.c +++ b/ROX-Filer/src/usericons.c @@ -171,6 +171,7 @@ void check_globicon(const guchar *path, DirItem *item) gboolean create_diricon(const guchar *filepath, const guchar *iconpath) { MaskedPixmap *pic; + gchar *icon_path; pic = g_fscache_lookup(pixmap_cache, iconpath); if (!pic) @@ -183,13 +184,15 @@ gboolean create_diricon(const guchar *filepath, const guchar *iconpath) return FALSE; } - gdk_pixbuf_save(pic->huge_pixbuf, - make_path(filepath, ".DirIcon")->str, + icon_path = make_path(filepath, ".DirIcon")->str; + gdk_pixbuf_save(pic->huge_pixbuf, icon_path, "png", NULL, "tEXt::Software", PROJECT, NULL); g_object_unref(pic); + dir_check_this(filepath); + return TRUE; } -- 2.11.4.GIT