From: Fridrich Strba Date: Tue, 23 Jun 2009 07:13:56 +0000 (+0200) Subject: On Windows, determine the data directory on runtime. X-Git-Tag: EVINCE_2_27_4~12 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=f575f06bfcb2e335f6b2089b3dba570e1da77198;p=evince.git On Windows, determine the data directory on runtime. --- diff --git a/thumbnailer/evince-thumbnailer.c b/thumbnailer/evince-thumbnailer.c index 9cc572f3..3598fdf6 100644 --- a/thumbnailer/evince-thumbnailer.c +++ b/thumbnailer/evince-thumbnailer.c @@ -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) {