aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-icon-factory.c8
-rw-r--r--e-util/e-spell-dictionary.c24
-rw-r--r--e-util/e-util-private.h2
-rw-r--r--e-util/e-win32-reloc.c5
4 files changed, 17 insertions, 22 deletions
diff --git a/e-util/e-icon-factory.c b/e-util/e-icon-factory.c
index 43c1239b03..7aac6f61ce 100644
--- a/e-util/e-icon-factory.c
+++ b/e-util/e-icon-factory.c
@@ -29,9 +29,11 @@
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_GNOME_DESKTOP
#define GNOME_DESKTOP_USE_UNSTABLE_API
#include <libgnome-desktop/gnome-desktop-thumbnail.h>
#undef GNOME_DESKTOP_USE_UNSTABLE_API
+#endif
#include <glib/gstdio.h>
#include <gtk/gtk.h>
@@ -147,9 +149,11 @@ e_icon_factory_pixbuf_scale (GdkPixbuf *pixbuf,
if (height <= 0)
height = 1;
+ #ifdef HAVE_GNOME_DESKTOP
/* because this can only scale down, not up */
if (gdk_pixbuf_get_width (pixbuf) > width && gdk_pixbuf_get_height (pixbuf) > height)
return gnome_desktop_thumbnail_scale_down_pixbuf (pixbuf, width, height);
+ #endif
return gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR);
}
@@ -166,6 +170,7 @@ e_icon_factory_pixbuf_scale (GdkPixbuf *pixbuf,
gchar *
e_icon_factory_create_thumbnail (const gchar *filename)
{
+#ifdef HAVE_GNOME_DESKTOP
static GnomeDesktopThumbnailFactory *thumbnail_factory = NULL;
struct stat file_stat;
gchar *thumbnail = NULL;
@@ -211,4 +216,7 @@ e_icon_factory_create_thumbnail (const gchar *filename)
}
return thumbnail;
+#else
+ return NULL;
+#endif /* HAVE_GNOME_DESKTOP */
}
diff --git a/e-util/e-spell-dictionary.c b/e-util/e-spell-dictionary.c
index e6e06b7d9a..12f2b6e568 100644
--- a/e-util/e-spell-dictionary.c
+++ b/e-util/e-spell-dictionary.c
@@ -20,6 +20,7 @@
#include <config.h>
#endif
+#include "e-util-private.h"
#include "e-spell-dictionary.h"
#include "e-spell-checker.h"
@@ -69,27 +70,6 @@ G_DEFINE_TYPE (
#undef DATADIR
#endif
#include <shlobj.h>
-static HMODULE hmodule;
-
-BOOL WINAPI
-DllMain (HINSTANCE hinstDLL,
- DWORD fdwReason,
- LPVOID lpvReserved);
-
-BOOL WINAPI
-DllMain (HINSTANCE hinstDLL,
- DWORD fdwReason,
- LPVOID lpvReserved)
-{
- switch (fdwReason)
- {
- case DLL_PROCESS_ATTACH:
- hmodule = hinstDLL;
- break;
- }
-
- return TRUE;
-}
static gchar *
_get_iso_codes_prefix (void)
@@ -101,7 +81,7 @@ _get_iso_codes_prefix (void)
if (beenhere)
return retval;
- if (!(temp_dir = g_win32_get_package_installation_directory_of_module ((gpointer) hmodule))) {
+ if (!(temp_dir = g_win32_get_package_installation_directory_of_module (_e_get_dll_hmodule ()))) {
strcpy (retval, ISO_CODES_PREFIX);
return retval;
}
diff --git a/e-util/e-util-private.h b/e-util/e-util-private.h
index e0205e933c..030f2b6cbf 100644
--- a/e-util/e-util-private.h
+++ b/e-util/e-util-private.h
@@ -34,6 +34,8 @@
#define fsync(fd) 0
+gpointer _e_get_dll_hmodule (void) G_GNUC_CONST;
+
const gchar *_e_get_bindir (void) G_GNUC_CONST;
const gchar *_e_get_datadir (void) G_GNUC_CONST;
const gchar *_e_get_ecpsdir (void) G_GNUC_CONST;
diff --git a/e-util/e-win32-reloc.c b/e-util/e-win32-reloc.c
index bf03256ae1..2c559cffb4 100644
--- a/e-util/e-win32-reloc.c
+++ b/e-util/e-win32-reloc.c
@@ -178,3 +178,8 @@ GETTER(sounddir)
GETTER(sysconfdir)
GETTER(toolsdir)
GETTER(uidir)
+
+gpointer _e_get_dll_hmodule (void)
+{
+ return hmodule;
+}