]> www.fi.muni.cz Git - evince.git/commitdiff
On Windows, determine the data directory on runtime.
authorFridrich Strba <fridrich.strba@bluewin.ch>
Tue, 23 Jun 2009 07:13:56 +0000 (09:13 +0200)
committerFridrich Strba <fridrich.strba@bluewin.ch>
Tue, 23 Jun 2009 07:13:56 +0000 (09:13 +0200)
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) {