Remove libgnome usage by Cosimo Cecchi. Partially fixes bug #586527.
This commit is contained in:
parent
70bc572a79
commit
40d465c3db
3 changed files with 15 additions and 12 deletions
|
@ -22,7 +22,6 @@
|
|||
|
||||
#include <glib/gi18n.h>
|
||||
#include <string.h>
|
||||
#include <libgnomeui/gnome-icon-lookup.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "slab-gnome-util.h"
|
||||
|
@ -413,7 +412,8 @@ load_image (DocumentTile *tile)
|
|||
|
||||
gchar *icon_id = NULL;
|
||||
gboolean free_icon_id = TRUE;
|
||||
GnomeThumbnailFactory *thumbnail_factory;
|
||||
GnomeDesktopThumbnailFactory *thumbnail_factory;
|
||||
GIcon *icon;
|
||||
|
||||
libslab_checkpoint ("document-tile.c: load_image(): start for %s", TILE (tile)->uri);
|
||||
|
||||
|
@ -429,12 +429,14 @@ load_image (DocumentTile *tile)
|
|||
|
||||
thumbnail_factory = libslab_thumbnail_factory_get ();
|
||||
|
||||
icon_id = gnome_thumbnail_factory_lookup (thumbnail_factory, TILE (tile)->uri, priv->modified);
|
||||
icon_id = gnome_desktop_thumbnail_factory_lookup (thumbnail_factory, TILE (tile)->uri, priv->modified);
|
||||
|
||||
if (! icon_id)
|
||||
icon_id = gnome_icon_lookup (
|
||||
gtk_icon_theme_get_default (), thumbnail_factory,
|
||||
TILE (tile)->uri, NULL, NULL, priv->mime_type, 0, NULL);
|
||||
if (! icon_id) {
|
||||
icon = g_content_type_get_icon (priv->mime_type);
|
||||
g_object_get (icon, "name", &icon_id, NULL);
|
||||
|
||||
g_object_unref (icon);
|
||||
}
|
||||
|
||||
exit:
|
||||
|
||||
|
|
|
@ -571,7 +571,7 @@ libslab_spawn_command (const gchar *cmd)
|
|||
}
|
||||
|
||||
static guint thumbnail_factory_idle_id;
|
||||
static GnomeThumbnailFactory *thumbnail_factory;
|
||||
static GnomeDesktopThumbnailFactory *thumbnail_factory;
|
||||
|
||||
static void
|
||||
create_thumbnail_factory (void)
|
||||
|
@ -584,7 +584,7 @@ create_thumbnail_factory (void)
|
|||
|
||||
libslab_checkpoint ("create_thumbnail_factory(): start");
|
||||
|
||||
thumbnail_factory = gnome_thumbnail_factory_new (GNOME_THUMBNAIL_SIZE_NORMAL);
|
||||
thumbnail_factory = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL);
|
||||
|
||||
libslab_checkpoint ("create_thumbnail_factory(): end");
|
||||
}
|
||||
|
@ -603,7 +603,7 @@ libslab_thumbnail_factory_preinit (void)
|
|||
thumbnail_factory_idle_id = g_idle_add (init_thumbnail_factory_idle_cb, NULL);
|
||||
}
|
||||
|
||||
GnomeThumbnailFactory *
|
||||
GnomeDesktopThumbnailFactory *
|
||||
libslab_thumbnail_factory_get (void)
|
||||
{
|
||||
if (thumbnail_factory_idle_id != 0) {
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
#include <gtk/gtk.h>
|
||||
#include <gconf/gconf-client.h>
|
||||
#include <libgnome/gnome-desktop-item.h>
|
||||
#include <libgnomeui/gnome-thumbnail.h>
|
||||
#define GNOME_DESKTOP_USE_UNSTABLE_API 1
|
||||
#include <libgnomeui/gnome-desktop-thumbnail.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -29,7 +30,7 @@ gchar *libslab_string_replace_once (const gchar *string, const gchar
|
|||
void libslab_spawn_command (const gchar *cmd);
|
||||
|
||||
void libslab_thumbnail_factory_preinit (void);
|
||||
GnomeThumbnailFactory *libslab_thumbnail_factory_get (void);
|
||||
GnomeDesktopThumbnailFactory *libslab_thumbnail_factory_get (void);
|
||||
|
||||
void libslab_checkpoint_init (const char *checkpoint_config_file_basename, const char *checkpoint_file_basename);
|
||||
void libslab_checkpoint (const char *format, ...);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue