0.8.11claws145
[claws.git] / src / plugins / image_viewer / viewer.c
index 68a1f9b3b4186951d4517593fec1ec34547f7d9b..66846d2b960cfb18ccb589144cbafc4dcabf882e 100644 (file)
@@ -287,12 +287,18 @@ MimeViewerFactory image_viewer_factory =
        image_viewer_create,
 };
 
-void image_viewer_init()
+void image_viewer_init(void)
 {
+#if HAVE_GDK_IMLIB
+       gdk_imlib_init();
+       gtk_widget_push_visual(gdk_imlib_get_visual());
+       gtk_widget_push_colormap(gdk_imlib_get_colormap());
+#endif
+
        mimeview_register_viewer_factory(&image_viewer_factory);
 }
 
-void image_viewer_done()
+void image_viewer_done(void)
 {
        mimeview_unregister_viewer_factory(&image_viewer_factory);
 }