Use GnomeDesktopThumbnailFactory instead of GnomeThumbnailFactory
Fri Oct 24 14:44:16 2008 Søren Sandmann <sandmann@redhat.com> * Use GnomeDesktopThumbnailFactory instead of GnomeThumbnailFactory svn path=/trunk/; revision=9093
This commit is contained in:
parent
6de2389398
commit
bba36b9e37
11 changed files with 29 additions and 22 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Oct 24 14:44:16 2008 Søren Sandmann <sandmann@redhat.com>
|
||||||
|
|
||||||
|
* Use GnomeDesktopThumbnailFactory instead of
|
||||||
|
GnomeThumbnailFactory
|
||||||
|
|
||||||
2008-10-19 Matthias Clasen <mclasen@redhat.com>
|
2008-10-19 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Bug 556977 – avoid duplicate custom keybindings
|
Bug 556977 – avoid duplicate custom keybindings
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#include <libgnomeui/gnome-thumbnail.h>
|
#include <libgnomeui/gnome-desktop-thumbnail.h>
|
||||||
#include <gconf/gconf-client.h>
|
#include <gconf/gconf-client.h>
|
||||||
#include <glade/glade.h>
|
#include <glade/glade.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
@ -52,7 +52,7 @@ typedef struct {
|
||||||
|
|
||||||
GdkScreen *screen;
|
GdkScreen *screen;
|
||||||
GtkIconTheme *theme;
|
GtkIconTheme *theme;
|
||||||
GnomeThumbnailFactory *thumbs;
|
GnomeDesktopThumbnailFactory *thumbs;
|
||||||
|
|
||||||
EContactAddress *addr1;
|
EContactAddress *addr1;
|
||||||
EContactAddress *addr2;
|
EContactAddress *addr2;
|
||||||
|
@ -680,7 +680,7 @@ about_me_update_preview (GtkFileChooser *chooser,
|
||||||
GFileInfo *file_info;
|
GFileInfo *file_info;
|
||||||
|
|
||||||
if (!me->thumbs)
|
if (!me->thumbs)
|
||||||
me->thumbs = gnome_thumbnail_factory_new (GNOME_THUMBNAIL_SIZE_NORMAL);
|
me->thumbs = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL);
|
||||||
|
|
||||||
file = g_file_new_for_uri (uri);
|
file = g_file_new_for_uri (uri);
|
||||||
file_info = g_file_query_info (file,
|
file_info = g_file_query_info (file,
|
||||||
|
@ -698,7 +698,7 @@ about_me_update_preview (GtkFileChooser *chooser,
|
||||||
|
|
||||||
mime_type = g_content_type_get_mime_type (content_type);
|
mime_type = g_content_type_get_mime_type (content_type);
|
||||||
|
|
||||||
pixbuf = gnome_thumbnail_factory_generate_thumbnail (me->thumbs,
|
pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (me->thumbs,
|
||||||
uri,
|
uri,
|
||||||
mime_type);
|
mime_type);
|
||||||
g_free (mime_type);
|
g_free (mime_type);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gconf/gconf-client.h>
|
#include <gconf/gconf-client.h>
|
||||||
#include <libgnomeui/gnome-thumbnail.h>
|
#include <libgnomeui/gnome-desktop-thumbnail.h>
|
||||||
#define GNOME_DESKTOP_USE_UNSTABLE_API
|
#define GNOME_DESKTOP_USE_UNSTABLE_API
|
||||||
#include <libgnomeui/gnome-bg.h>
|
#include <libgnomeui/gnome-bg.h>
|
||||||
|
|
||||||
|
@ -858,7 +858,7 @@ wp_update_preview (GtkFileChooser *chooser,
|
||||||
|
|
||||||
if (mime_type)
|
if (mime_type)
|
||||||
{
|
{
|
||||||
pixbuf = gnome_thumbnail_factory_generate_thumbnail (data->thumb_factory,
|
pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (data->thumb_factory,
|
||||||
uri,
|
uri,
|
||||||
mime_type);
|
mime_type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include <libgnome/libgnome.h>
|
#include <libgnome/libgnome.h>
|
||||||
#include <libgnomeui/gnome-ui-init.h>
|
#include <libgnomeui/gnome-ui-init.h>
|
||||||
/* ---------------------------------- */
|
/* ---------------------------------- */
|
||||||
#include <libgnomeui/gnome-thumbnail.h>
|
#include <libgnomeui/gnome-desktop-thumbnail.h>
|
||||||
|
|
||||||
static AppearanceData *
|
static AppearanceData *
|
||||||
init_appearance_data (int *argc, char ***argv)
|
init_appearance_data (int *argc, char ***argv)
|
||||||
|
@ -60,7 +60,7 @@ init_appearance_data (int *argc, char ***argv)
|
||||||
data = g_new (AppearanceData, 1);
|
data = g_new (AppearanceData, 1);
|
||||||
data->client = gconf_client_get_default ();
|
data->client = gconf_client_get_default ();
|
||||||
data->xml = ui;
|
data->xml = ui;
|
||||||
data->thumb_factory = gnome_thumbnail_factory_new (GNOME_THUMBNAIL_SIZE_NORMAL);
|
data->thumb_factory = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <libwindow-settings/gnome-wm-manager.h>
|
#include <libwindow-settings/gnome-wm-manager.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <libgnomeui/gnome-thumbnail.h>
|
#include <libgnomeui/gnome-desktop-thumbnail.h>
|
||||||
|
|
||||||
#define CUSTOM_THEME_NAME "__custom__"
|
#define CUSTOM_THEME_NAME "__custom__"
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ theme_thumbnail_update (GdkPixbuf *pixbuf,
|
||||||
/* try to share thumbs with nautilus, use themes:/// */
|
/* try to share thumbs with nautilus, use themes:/// */
|
||||||
path = g_strconcat ("themes:///", theme_name, NULL);
|
path = g_strconcat ("themes:///", theme_name, NULL);
|
||||||
|
|
||||||
gnome_thumbnail_factory_save_thumbnail (data->thumb_factory,
|
gnome_desktop_thumbnail_factory_save_thumbnail (data->thumb_factory,
|
||||||
pixbuf, path, mtime);
|
pixbuf, path, mtime);
|
||||||
|
|
||||||
g_free (path);
|
g_free (path);
|
||||||
|
@ -136,7 +136,7 @@ theme_get_thumbnail_from_cache (GnomeThemeMetaInfo *info, AppearanceData *data)
|
||||||
|
|
||||||
/* try to share thumbs with nautilus, use themes:/// */
|
/* try to share thumbs with nautilus, use themes:/// */
|
||||||
path = g_strconcat ("themes:///", info->name, NULL);
|
path = g_strconcat ("themes:///", info->name, NULL);
|
||||||
thumb_filename = gnome_thumbnail_factory_lookup (data->thumb_factory,
|
thumb_filename = gnome_desktop_thumbnail_factory_lookup (data->thumb_factory,
|
||||||
path, mtime);
|
path, mtime);
|
||||||
g_free (path);
|
g_free (path);
|
||||||
|
|
||||||
|
|
|
@ -24,14 +24,14 @@
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <glade/glade.h>
|
#include <glade/glade.h>
|
||||||
#include <gconf/gconf-client.h>
|
#include <gconf/gconf-client.h>
|
||||||
#include <libgnomeui/gnome-thumbnail.h>
|
#include <libgnomeui/gnome-desktop-thumbnail.h>
|
||||||
|
|
||||||
#include "gnome-theme-info.h"
|
#include "gnome-theme-info.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GConfClient *client;
|
GConfClient *client;
|
||||||
GladeXML *xml;
|
GladeXML *xml;
|
||||||
GnomeThumbnailFactory *thumb_factory;
|
GnomeDesktopThumbnailFactory *thumb_factory;
|
||||||
|
|
||||||
/* desktop */
|
/* desktop */
|
||||||
GHashTable *wp_hash;
|
GHashTable *wp_hash;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "gnome-wp-info.h"
|
#include "gnome-wp-info.h"
|
||||||
|
|
||||||
GnomeWPInfo * gnome_wp_info_new (const gchar * uri,
|
GnomeWPInfo * gnome_wp_info_new (const gchar * uri,
|
||||||
GnomeThumbnailFactory * thumbs) {
|
GnomeDesktopThumbnailFactory * thumbs) {
|
||||||
GnomeWPInfo *wp;
|
GnomeWPInfo *wp;
|
||||||
GFile *file;
|
GFile *file;
|
||||||
GFileInfo *info;
|
GFileInfo *info;
|
||||||
|
@ -64,7 +64,7 @@ GnomeWPInfo * gnome_wp_info_new (const gchar * uri,
|
||||||
wp->mtime = g_file_info_get_attribute_uint64 (info,
|
wp->mtime = g_file_info_get_attribute_uint64 (info,
|
||||||
G_FILE_ATTRIBUTE_TIME_MODIFIED);
|
G_FILE_ATTRIBUTE_TIME_MODIFIED);
|
||||||
|
|
||||||
wp->thumburi = gnome_thumbnail_factory_lookup (thumbs,
|
wp->thumburi = gnome_desktop_thumbnail_factory_lookup (thumbs,
|
||||||
uri,
|
uri,
|
||||||
wp->mtime);
|
wp->mtime);
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#define _GNOME_WP_INFO_H_
|
#define _GNOME_WP_INFO_H_
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <libgnomeui/gnome-thumbnail.h>
|
#include <libgnomeui/gnome-desktop-thumbnail.h>
|
||||||
|
|
||||||
typedef struct _GnomeWPInfo GnomeWPInfo;
|
typedef struct _GnomeWPInfo GnomeWPInfo;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ struct _GnomeWPInfo {
|
||||||
};
|
};
|
||||||
|
|
||||||
GnomeWPInfo * gnome_wp_info_new (const gchar * uri,
|
GnomeWPInfo * gnome_wp_info_new (const gchar * uri,
|
||||||
GnomeThumbnailFactory * thumbs);
|
GnomeDesktopThumbnailFactory * thumbs);
|
||||||
void gnome_wp_info_free (GnomeWPInfo * info);
|
void gnome_wp_info_free (GnomeWPInfo * info);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -125,7 +125,7 @@ void gnome_wp_item_update (GnomeWPItem *item) {
|
||||||
|
|
||||||
GnomeWPItem * gnome_wp_item_new (const gchar * filename,
|
GnomeWPItem * gnome_wp_item_new (const gchar * filename,
|
||||||
GHashTable * wallpapers,
|
GHashTable * wallpapers,
|
||||||
GnomeThumbnailFactory * thumbnails) {
|
GnomeDesktopThumbnailFactory * thumbnails) {
|
||||||
GnomeWPItem *item = g_new0 (GnomeWPItem, 1);
|
GnomeWPItem *item = g_new0 (GnomeWPItem, 1);
|
||||||
|
|
||||||
item->filename = g_strdup (filename);
|
item->filename = g_strdup (filename);
|
||||||
|
@ -181,7 +181,7 @@ void gnome_wp_item_free (GnomeWPItem * item) {
|
||||||
#define LIST_IMAGE_WIDTH 108
|
#define LIST_IMAGE_WIDTH 108
|
||||||
|
|
||||||
GdkPixbuf * gnome_wp_item_get_thumbnail (GnomeWPItem * item,
|
GdkPixbuf * gnome_wp_item_get_thumbnail (GnomeWPItem * item,
|
||||||
GnomeThumbnailFactory * thumbs) {
|
GnomeDesktopThumbnailFactory * thumbs) {
|
||||||
GdkPixbuf *pixbuf;
|
GdkPixbuf *pixbuf;
|
||||||
double aspect =
|
double aspect =
|
||||||
(double)gdk_screen_get_height (gdk_screen_get_default()) /
|
(double)gdk_screen_get_height (gdk_screen_get_default()) /
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
#include <gtk/gtktreeview.h>
|
#include <gtk/gtktreeview.h>
|
||||||
#include <libgnomeui/gnome-thumbnail.h>
|
#include <libgnomeui/gnome-desktop-thumbnail.h>
|
||||||
#define GNOME_DESKTOP_USE_UNSTABLE_API
|
#define GNOME_DESKTOP_USE_UNSTABLE_API
|
||||||
#include <libgnomeui/gnome-bg.h>
|
#include <libgnomeui/gnome-bg.h>
|
||||||
|
|
||||||
|
@ -68,11 +68,11 @@ struct _GnomeWPItem {
|
||||||
|
|
||||||
GnomeWPItem * gnome_wp_item_new (const gchar *filename,
|
GnomeWPItem * gnome_wp_item_new (const gchar *filename,
|
||||||
GHashTable *wallpapers,
|
GHashTable *wallpapers,
|
||||||
GnomeThumbnailFactory *thumbnails);
|
GnomeDesktopThumbnailFactory *thumbnails);
|
||||||
|
|
||||||
void gnome_wp_item_free (GnomeWPItem *item);
|
void gnome_wp_item_free (GnomeWPItem *item);
|
||||||
GdkPixbuf * gnome_wp_item_get_thumbnail (GnomeWPItem *item,
|
GdkPixbuf * gnome_wp_item_get_thumbnail (GnomeWPItem *item,
|
||||||
GnomeThumbnailFactory *thumbs);
|
GnomeDesktopThumbnailFactory *thumbs);
|
||||||
void gnome_wp_item_update (GnomeWPItem *item);
|
void gnome_wp_item_update (GnomeWPItem *item);
|
||||||
void gnome_wp_item_update_description (GnomeWPItem *item);
|
void gnome_wp_item_update_description (GnomeWPItem *item);
|
||||||
void gnome_wp_item_ensure_gnome_bg (GnomeWPItem *item);
|
void gnome_wp_item_ensure_gnome_bg (GnomeWPItem *item);
|
||||||
|
|
|
@ -33,6 +33,8 @@ if test "x$GCC" = "xyes"; then
|
||||||
fi
|
fi
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS -DGNOME_DESKTOP_USE_UNSTABLE_API"
|
||||||
|
|
||||||
# Internationalization support
|
# Internationalization support
|
||||||
|
|
||||||
IT_PROG_INTLTOOL([0.37.1])
|
IT_PROG_INTLTOOL([0.37.1])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue