X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=thumbnailer%2Fevince-thumbnailer.c;h=457ceeaa0c9f341658ea783cb15f1182b1da4beb;hb=db6ebaefea5b1a367fce51e2d7726f8ee850dc70;hp=da0f5d45ed0ae9bfc6bf844922d00e2a3915e3ea;hpb=fe69e587ffdd60b3cc23f4258c61670e8021605d;p=evince.git diff --git a/thumbnailer/evince-thumbnailer.c b/thumbnailer/evince-thumbnailer.c index da0f5d45..457ceeaa 100644 --- a/thumbnailer/evince-thumbnailer.c +++ b/thumbnailer/evince-thumbnailer.c @@ -25,6 +25,16 @@ #include #include +#ifdef G_OS_WIN32 +#ifdef DATADIR +#undef DATADIR +#endif +#include +#include +#define _WIN32_WINNT 0x0500 +#include +#endif + #define THUMBNAIL_SIZE 128 static gint size = THUMBNAIL_SIZE; @@ -88,7 +98,13 @@ evince_thumbnail_pngenc_get (EvDocument *document, const char *thumbnail, int si if (overlaid_icon_name) { GdkPixbuf *overlaid_pixbuf; +#ifdef G_OS_WIN32 + gchar *dir = g_win32_get_package_installation_directory_of_module (NULL); + gchar *overlaid_icon_path = g_build_filename (dir, "share", "evince", overlaid_icon_name, NULL); + g_free (dir); +#else gchar *overlaid_icon_path = g_strdup_printf ("%s/%s", DATADIR, overlaid_icon_name); +#endif overlaid_pixbuf = gdk_pixbuf_new_from_file (overlaid_icon_path, NULL); g_free (overlaid_icon_path); if (overlaid_pixbuf != NULL) { @@ -180,8 +196,8 @@ main (int argc, char *argv[]) g_option_context_free (context); - if (size < 40) { - g_print ("Size cannot be smaller than 40 pixels\n"); + if (size < 1) { + g_print ("Size cannot be smaller than 1 pixel\n"); return -1; }