]> www.fi.muni.cz Git - evince.git/blobdiff - thumbnailer/evince-thumbnailer.c
On Windows, determine the data directory on runtime.
[evince.git] / thumbnailer / evince-thumbnailer.c
index 9cc572f368ce242ab222783281ef010723301460..3598fdf6aa9e82aac099d864ca5e4fcea02fe51e 100644 (file)
@@ -88,7 +88,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) {