Mercurial > geeqie
changeset 79:528e3432e0c0
Thu Oct 19 07:23:37 2006 John Ellis <johne@verizon.net>
* cache_maint.c, thumb_standard.[ch]: Use .thumblocal when saving
local thumbnails as per the freedesktop.org thumbnail spec.
* filelist.c: Add .thumblocal to list of ignored folders (those we
never show user).
* main.c: Fix bug in recent command line parser changes, a single
folder on the command line was not processed by parse_out_relatives().
author | gqview |
---|---|
date | Thu, 19 Oct 2006 11:34:52 +0000 |
parents | b192a0efe080 |
children | a10fc0308c12 |
files | ChangeLog src/cache_maint.c src/filelist.c src/main.c src/thumb_standard.c src/thumb_standard.h |
diffstat | 6 files changed, 27 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Oct 15 16:39:19 2006 +0000 +++ b/ChangeLog Thu Oct 19 11:34:52 2006 +0000 @@ -1,3 +1,12 @@ +Thu Oct 19 07:23:37 2006 John Ellis <johne@verizon.net> + + * cache_maint.c, thumb_standard.[ch]: Use .thumblocal when saving + local thumbnails as per the freedesktop.org thumbnail spec. + * filelist.c: Add .thumblocal to list of ignored folders (those we + never show user). + * main.c: Fix bug in recent command line parser changes, a single + folder on the command line was not processed by parse_out_relatives(). + Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net> * pan-view.c: For now, also display the full size image under the
--- a/src/cache_maint.c Sun Oct 15 16:39:19 2006 +0000 +++ b/src/cache_maint.c Thu Oct 19 11:34:52 2006 +0000 @@ -995,19 +995,19 @@ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(cd->progress), _("running...")); - path = g_strconcat(homedir(), "/", THUMB_FOLDER, "/", THUMB_FOLDER_NORMAL, NULL); + path = g_strconcat(homedir(), "/", THUMB_FOLDER_GLOBAL, "/", THUMB_FOLDER_NORMAL, NULL); list = NULL; path_list(path, &list, NULL); cd->list = list; g_free(path); - path = g_strconcat(homedir(), "/", THUMB_FOLDER, "/", THUMB_FOLDER_LARGE, NULL); + path = g_strconcat(homedir(), "/", THUMB_FOLDER_GLOBAL, "/", THUMB_FOLDER_LARGE, NULL); list = NULL; path_list(path, &list, NULL); cd->list = g_list_concat(cd->list, list); g_free(path); - path = g_strconcat(homedir(), "/", THUMB_FOLDER, "/", THUMB_FOLDER_FAIL, NULL); + path = g_strconcat(homedir(), "/", THUMB_FOLDER_GLOBAL, "/", THUMB_FOLDER_FAIL, NULL); list = NULL; path_list(path, &list, NULL); cd->list = g_list_concat(cd->list, list); @@ -1195,7 +1195,7 @@ group = pref_group_new(gd->vbox, FALSE, _("Shared thumbnail cache"), GTK_ORIENTATION_VERTICAL); - buf = g_strconcat(_("Location:"), " ", homedir(), "/", THUMB_FOLDER, NULL); + buf = g_strconcat(_("Location:"), " ", homedir(), "/", THUMB_FOLDER_GLOBAL, NULL); label = pref_label_new(group, buf); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); g_free(buf);
--- a/src/filelist.c Sun Oct 15 16:39:19 2006 +0000 +++ b/src/filelist.c Thu Oct 19 11:34:52 2006 +0000 @@ -1,6 +1,6 @@ /* * GQview - * (C) 2004 John Ellis + * (C) 2006 John Ellis * * Author: John Ellis * @@ -15,6 +15,7 @@ #include "cache.h" #include "rcfile.h" +#include "thumb_standard.h" #include "ui_fileops.h" @@ -707,7 +708,8 @@ if ((dirs) && !(name[0] == '.' && (name[1] == '\0' || (name[1] == '.' && name[2] == '\0'))) && strcmp(name, GQVIEW_CACHE_LOCAL_THUMB) != 0 && - strcmp(name, GQVIEW_CACHE_LOCAL_METADATA) != 0) + strcmp(name, GQVIEW_CACHE_LOCAL_METADATA) != 0 && + strcmp(name, THUMB_FOLDER_LOCAL) != 0) { dlist = g_list_prepend(dlist, file_data_new(filepath, &ent_sbuf)); }
--- a/src/main.c Sun Oct 15 16:39:19 2006 +0000 +++ b/src/main.c Thu Oct 19 11:34:52 2006 +0000 @@ -1,6 +1,6 @@ /* * GQview - * (C) 2004 John Ellis + * (C) 2006 John Ellis * * Author: John Ellis * @@ -1056,6 +1056,8 @@ { *path = first_dir; first_dir = NULL; + + parse_out_relatives(*path); } g_free(first_dir);
--- a/src/thumb_standard.c Sun Oct 15 16:39:19 2006 +0000 +++ b/src/thumb_standard.c Thu Oct 19 11:34:52 2006 +0000 @@ -1,6 +1,6 @@ /* * GQview - * (C) 2005 John Ellis + * (C) 2006 John Ellis * * Author: John Ellis * @@ -145,12 +145,12 @@ gchar *base; base = remove_level_from_path(path); - cache_base = g_strconcat(base, "/", THUMB_FOLDER, "/", cache_subfolder, NULL); + cache_base = g_strconcat(base, "/", THUMB_FOLDER_LOCAL, "/", cache_subfolder, NULL); g_free(base); } else { - cache_base = g_strconcat(homedir(), "/", THUMB_FOLDER, "/", cache_subfolder, NULL); + cache_base = g_strconcat(homedir(), "/", THUMB_FOLDER_GLOBAL, "/", cache_subfolder, NULL); } md5_get_digest((guchar *)uri, strlen(uri), digest); @@ -169,16 +169,7 @@ static gchar *thumb_loader_std_cache_path(ThumbLoaderStd *tl, gint local, GdkPixbuf *pixbuf, gint fail) { -#if 0 - gchar *result = NULL; - gchar *cache_base; -#endif const gchar *folder_size; -#if 0 - const gchar *uri; - gchar *md5_text; - guchar digest[16]; -#endif gint w, h; if (!tl->source_path || !tl->thumb_uri) return NULL; @@ -210,35 +201,6 @@ return thumb_std_cache_path(tl->source_path, (local) ? tl->local_uri : tl->thumb_uri, local, folder_size); - -#if 0 - if (local) - { - gchar *base; - - base = remove_level_from_path(tl->source_path); - cache_base = g_strconcat(base, "/", THUMB_FOLDER, "/", folder_size, NULL); - g_free(base); - } - else - { - cache_base = g_strconcat(homedir(), "/", THUMB_FOLDER, "/", folder_size, NULL); - } - - uri = (local) ? tl->local_uri : tl->thumb_uri; - md5_get_digest(uri, strlen(uri), digest); - md5_text = md5_digest_to_text(digest); - - if (cache_base && md5_text) - { - result = g_strconcat(cache_base, "/", md5_text, THUMB_NAME_EXTENSION, NULL); - } - - g_free(cache_base); - g_free(md5_text); - - return result; -#endif } static gint thumb_loader_std_fail_check(ThumbLoaderStd *tl) @@ -700,7 +662,7 @@ tl->source_size = st.st_size; tl->source_mode = st.st_mode; - if (!thumb_cache) thumb_cache = g_strconcat(homedir(), "/", THUMB_FOLDER, NULL); + if (!thumb_cache) thumb_cache = g_strconcat(homedir(), "/", THUMB_FOLDER_GLOBAL, NULL); if (strncmp(tl->source_path, thumb_cache, strlen(thumb_cache)) != 0) { gchar *pathl;
--- a/src/thumb_standard.h Sun Oct 15 16:39:19 2006 +0000 +++ b/src/thumb_standard.h Thu Oct 19 11:34:52 2006 +0000 @@ -1,6 +1,6 @@ /* * GQview - * (C) 2005 John Ellis + * (C) 2006 John Ellis * * Author: John Ellis * @@ -14,7 +14,8 @@ #define THUMB_STANDARD_H -#define THUMB_FOLDER ".thumbnails" +#define THUMB_FOLDER_GLOBAL ".thumbnails" +#define THUMB_FOLDER_LOCAL ".thumblocal" #define THUMB_FOLDER_NORMAL "normal" #define THUMB_FOLDER_LARGE "large" #define THUMB_FOLDER_FAIL "fail/gqview-1.0"