+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
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);
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);
/*
* GQview
- * (C) 2004 John Ellis
+ * (C) 2006 John Ellis
*
* Author: John Ellis
*
#include "cache.h"
#include "rcfile.h"
+#include "thumb_standard.h"
#include "ui_fileops.h"
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));
}
/*
* GQview
- * (C) 2004 John Ellis
+ * (C) 2006 John Ellis
*
* Author: John Ellis
*
{
*path = first_dir;
first_dir = NULL;
+
+ parse_out_relatives(*path);
}
g_free(first_dir);
/*
* GQview
- * (C) 2005 John Ellis
+ * (C) 2006 John Ellis
*
* Author: John Ellis
*
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);
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;
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)
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;
/*
* GQview
- * (C) 2005 John Ellis
+ * (C) 2006 John Ellis
*
* Author: John Ellis
*
#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"