diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2008-10-17 17:23:45 +0000 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@src.gnome.org> | 2008-10-17 17:23:45 +0000 |
commit | 4dae6e781dd5e7c6794463b98fd27de76e878c50 (patch) | |
tree | 3a632371c1508dde4f55c0579995b1faba0acc48 | |
parent | afd55113b969a539a75ba93170d0333bdeb132b9 (diff) | |
download | cheese-4dae6e781dd5e7c6794463b98fd27de76e878c50.tar.gz |
Drop libgnome/libgnome-vfs dependencies (#556580).
2008-10-17 Cosimo Cecchi <cosimoc@gnome.org>
* configure.ac:
* src/Makefile.am:
* src/cheese-thumb-view.c: (cheese_thumb_view_thread_append_item),
(cheese_thumb_view_init):
* src/cheese.c: (main):
* src/eog-thumbnail.c: (art_rgb_run_alpha):
Drop libgnome/libgnome-vfs dependencies (#556580).
svn path=/trunk/; revision=1112
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/cheese-thumb-view.c | 15 | ||||
-rw-r--r-- | src/cheese.c | 4 | ||||
-rw-r--r-- | src/eog-thumbnail.c | 21 |
6 files changed, 40 insertions, 17 deletions
@@ -1,3 +1,13 @@ +2008-10-17 Cosimo Cecchi <cosimoc@gnome.org> + + * configure.ac: + * src/Makefile.am: + * src/cheese-thumb-view.c: (cheese_thumb_view_thread_append_item), + (cheese_thumb_view_init): + * src/cheese.c: (main): + * src/eog-thumbnail.c: (art_rgb_run_alpha): + Drop libgnome/libgnome-vfs dependencies (#556580). + 2008-10-13 daniel g. siegel <dgsiegel@gmail.com> * src/cheese.c: diff --git a/configure.ac b/configure.ac index 87eb3dc0..16c7c708 100644 --- a/configure.ac +++ b/configure.ac @@ -61,10 +61,9 @@ GOBJECT_REQUIRED=2.12.0 GIO_REQUIRED=2.16.0 GTK_REQUIRED=2.10.0 GDK_REQUIRED=2.12.0 -LIBGNOMEUI_REQUIRED=2.20.0 +LIBGNOMEDESKTOP_REQUIRED=2.25.1 GCONF_REQUIRED=2.16.0 GSTREAMER_REQUIRED=0.10.20 -GNOME_VFS_REQUIRED=2.18.0 LIBEBOOK_REQUIRED=1.12.0 CAIRO_REQUIRED=1.4.0 DBUS_REQUIRED=1.0 @@ -79,11 +78,10 @@ PKG_CHECK_MODULES(CHEESE, \ gio-2.0 >= $GIO_REQUIRED \ gtk+-2.0 >= $GTK_REQUIRED \ gdk-2.0 >= $GDK_REQUIRED \ - libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED \ + gnome-desktop-2.0 >= $LIBGNOMEDESKTOP_REQUIRED \ gconf-2.0 >= $GCONF_REQUIRED \ gstreamer-0.10 >= $GSTREAMER_REQUIRED \ gstreamer-plugins-base-0.10 >= $GSTREAMER_REQUIRED \ - gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED \ libebook-1.2 >= $LIBEBOOK_REQUIRED \ cairo >= $CAIRO_REQUIRED \ dbus-1 >= $DBUS_REQUIRED \ diff --git a/src/Makefile.am b/src/Makefile.am index efff3c71..beb97ffb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,6 +7,7 @@ INCLUDES = \ -DPACKAGE_DATADIR=\""$(datadir)/cheese"\" \ -DPACKAGE_LOCALEDIR=\""$(datadir)/locale"\" \ -DAPPNAME_DATA_DIR=\"$(pkgdatadir)\" \ + -DGNOME_DESKTOP_USE_UNSTABLE_API=1 \ $(CHEESE_CFLAGS) bin_PROGRAMS = cheese diff --git a/src/cheese-thumb-view.c b/src/cheese-thumb-view.c index be51cd42..67beb3b0 100644 --- a/src/cheese-thumb-view.c +++ b/src/cheese-thumb-view.c @@ -25,7 +25,8 @@ #include <glib.h> #include <gtk/gtk.h> -#include <libgnomeui/libgnomeui.h> +#include <libgnomeui/gnome-desktop-thumbnail.h> +#include <string.h> #include "cheese-fileutil.h" #include "eog-thumbnail.h" @@ -45,7 +46,7 @@ typedef struct CheeseFileUtil *fileutil; GFileMonitor *photo_file_monitor; GFileMonitor *video_file_monitor; - GnomeThumbnailFactory *factory; + GnomeDesktopThumbnailFactory *factory; gboolean multiplex_thumbnail_generator; } CheeseThumbViewPrivate; @@ -82,7 +83,7 @@ cheese_thumb_view_thread_append_item (gpointer data) CheeseThumbView *thumb_view = item->thumb_view; CheeseThumbViewPrivate *priv = CHEESE_THUMB_VIEW_GET_PRIVATE (thumb_view); - GnomeThumbnailFactory *factory = priv->factory; + GnomeDesktopThumbnailFactory *factory = priv->factory; GFile *file = item->file; GtkTreeIter iter = item->iter; GdkPixbuf *pixbuf = NULL; @@ -106,18 +107,18 @@ cheese_thumb_view_thread_append_item (gpointer data) uri = g_file_get_uri (file); filename = g_file_get_path (file); - thumb_loc = gnome_thumbnail_factory_lookup (factory, uri, mtime.tv_sec); + thumb_loc = gnome_desktop_thumbnail_factory_lookup (factory, uri, mtime.tv_sec); if (!thumb_loc) { - pixbuf = gnome_thumbnail_factory_generate_thumbnail (factory, uri, mime_type); + pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (factory, uri, mime_type); if (!pixbuf) { g_warning ("could not generate thumbnail for %s (%s)\n", filename, mime_type); } else { - gnome_thumbnail_factory_save_thumbnail (factory, pixbuf, uri, mtime.tv_sec); + gnome_desktop_thumbnail_factory_save_thumbnail (factory, pixbuf, uri, mtime.tv_sec); } } else @@ -584,7 +585,7 @@ cheese_thumb_view_init (CheeseThumbView *thumb_view) g_mkdir_with_parents (path_videos, 0775); g_mkdir_with_parents (path_photos, 0775); - priv->factory = gnome_thumbnail_factory_new (GNOME_THUMBNAIL_SIZE_NORMAL); + priv->factory = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL); /* connect signal to video path */ file = g_file_new_for_path (path_videos); diff --git a/src/cheese.c b/src/cheese.c index c2351578..65f8eab4 100644 --- a/src/cheese.c +++ b/src/cheese.c @@ -29,7 +29,6 @@ #include <gio/gio.h> #include <gtk/gtk.h> #include <gst/gst.h> -#include <libgnomevfs/gnome-vfs.h> #include "cheese-fileutil.h" #include "cheese-window.h" @@ -198,9 +197,6 @@ main (int argc, char **argv) return -1; } - /* Needed for gnome_thumbnail functions */ - gnome_vfs_init (); - g_set_print_handler ((GPrintFunc) cheese_print_handler); gtk_window_set_default_icon_name ("cheese"); diff --git a/src/eog-thumbnail.c b/src/eog-thumbnail.c index 83295aa0..e74de717 100644 --- a/src/eog-thumbnail.c +++ b/src/eog-thumbnail.c @@ -29,8 +29,6 @@ #include <cheese-config.h> #endif -#include <libart_lgpl/art_rgb.h> - #include "eog-thumbnail.h" @@ -103,6 +101,25 @@ draw_frame_column (GdkPixbuf *frame_image, } } +/* copied from libart_lgpl/art_rgb.c */ + +static void +art_rgb_run_alpha (guint8 *buf, guint8 r, guint8 g, guint8 b, int alpha, int n) +{ + int i; + int v; + + for (i = 0; i < n; i++) + { + v = *buf; + *buf++ = v + (((r - v) * alpha + 0x80) >> 8); + v = *buf; + *buf++ = v + (((g - v) * alpha + 0x80) >> 8); + v = *buf; + *buf++ = v + (((b - v) * alpha + 0x80) >> 8); + } +} + static GdkPixbuf * eog_thumbnail_stretch_frame_image (GdkPixbuf *frame_image, gint left_offset, |