]> www.fi.muni.cz Git - evince.git/blobdiff - thumbnailer/evince-thumbnailer.c
Updated Malayalam Translations
[evince.git] / thumbnailer / evince-thumbnailer.c
index da0f5d45ed0ae9bfc6bf844922d00e2a3915e3ea..457ceeaa0c9f341658ea783cb15f1182b1da4beb 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
 #include <stdlib.h>
 #include <string.h>
 
+#ifdef G_OS_WIN32
+#ifdef DATADIR
+#undef DATADIR
+#endif
+#include <io.h>
+#include <conio.h>
+#define _WIN32_WINNT 0x0500
+#include <windows.h>
+#endif
+
 #define THUMBNAIL_SIZE 128
 
 static gint size = THUMBNAIL_SIZE;
 #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;
 
                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);
                        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) {
                        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);
 
        
        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;
        }
 
                return -1;
        }