Commit ebd7367f authored by Jannis Pohlmann's avatar Jannis Pohlmann

Squashme: A bit more work done here, moved things around.

parent 8e2e0f6f
......@@ -8,6 +8,7 @@ SUBDIRS = \
tdb \
thunarx \
thunar \
thunar-vfs-thumbnailer \
docs \
examples \
plugins
......
......@@ -119,8 +119,8 @@ dnl *** Check for standard headers ***
dnl **********************************
AC_CHECK_HEADERS([ctype.h errno.h fcntl.h grp.h limits.h locale.h memory.h \
paths.h pwd.h sched.h signal.h stdarg.h stdio.h stdlib.h \
string.h sys/mman.h sys/stat.h sys/time.h sys/types.h \
sys/uio.h sys/wait.h time.h])
string.h sys/mman.h sys/resource.h sys/stat.h sys/time.h \
sys/types.h sys/uio.h sys/wait.h time.h])
dnl ************************************
dnl *** Check for standard functions ***
......@@ -287,8 +287,7 @@ thunar/Makefile
thunarx/Makefile
thunarx/thunarx-2.pc
thunarx/thunarx-config.h
tumbler-plugins/Makefile
tumbler-plugins/thunar-vfs-thumbnailer/Makefile
thunar-vfs-thumbnailer/Makefile
])
dnl ***************************
......
......@@ -105,12 +105,14 @@ thunar_vfs_thumbnailer_provider_get_thumbnailers (TumblerThumbnailerProvider *pr
{
ThunarVfsThumbnailer *thumbnailer;
GList *thumbnailers = NULL;
const gchar *uri_schemes[] = { NULL, };
const gchar *uri_schemes[] = { "file", NULL };
const gchar *mime_types[] = { NULL, };
/* create the pixbuf thumbnailer */
thumbnailer = g_object_new (TYPE_THUNAR_VFS_THUMBNAILER, "mime-types", mime_types,
"uri-schemes", uri_schemes, NULL);
thumbnailer = g_object_new (TYPE_THUNAR_VFS_THUMBNAILER,
"mime-types", mime_types,
"uri-schemes", uri_schemes,
NULL);
/* add the thumbnailer to the list */
thumbnailers = g_list_append (thumbnailers, thumbnailer);
......
/* vi:set et ai sw=2 sts=2 ts=2: */
/*-
* Copyright (c) 2004-2007 Benedikt Meurer <benny@xfce.org>
* Copyright (c) 2009 Jannis Pohlmann <jannis@xfce.org>
*
* This library is free software; you can redistribute it and/or
......@@ -25,6 +26,9 @@
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
......@@ -111,6 +115,7 @@ static void thunar_vfs_thumbnailer_cache_watch_destroy (gpointer
static void thunar_vfs_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer,
GCancellable *cancellable,
TumblerFileInfo *info);
static void thunar_vfs_thumbnailer_update_supported (ThunarVfsThumbnailer *thumbnailer);
......@@ -325,6 +330,9 @@ thunar_vfs_thumbnailer_cache_load (ThunarVfsThumbnailer *thumbnailer)
}
g_free (cache_path);
/* compute new hash keys and notify supported-changed listeners */
thunar_vfs_thumbnailer_update_supported (thumbnailer);
}
......@@ -598,3 +606,27 @@ thunar_vfs_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer,
g_object_unref (pixbuf);
g_object_unref (source_pixbuf);
}
static void
thunar_vfs_thumbnailer_update_supported (ThunarVfsThumbnailer *thumbnailer)
{
const gchar **mime_types;
gint num_mime_types;
gint n;
g_return_if_fail (IS_THUNAR_VFS_THUMBNAILER (thumbnailer));
num_mime_types = CACHE_READ32 (thumbnailer->cache, 8);
mime_types = g_slice_alloc0 (sizeof (const gchar *) * num_mime_types + 1);
mime_types[num_mime_types] = NULL;
for (n = 0; n < num_mime_types; ++n)
mime_types[n] = thumbnailer->cache + CACHE_READ32 (cache, 16 + 8 * n + 4);
tumbler_thumbnailer_set_mime_types (thumbnailer, mime_types);
g_strfreev (mime_types);
}
if HAVE_TUMBLER
SUBDIRS = \
thunar-vfs-thumbnailer
endif
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment