[gnome-desktop] Add slideshow api



commit 62f11468d5d338828237eca0490d641255172e4c
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Aug 15 00:10:45 2009 -0400

    Add slideshow api
    
    Add a function to determine if a GnomeBG is a slideshow or not,
    in analogy to the existing function that determines if a GnomeBG
    is a multi-resolution image. See bug 591633.

 libgnome-desktop/gnome-bg.c            |   14 ++++++++++++++
 libgnome-desktop/libgnomeui/gnome-bg.h |    1 +
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/libgnome-desktop/gnome-bg.c b/libgnome-desktop/gnome-bg.c
index 1df349c..e8a05a7 100644
--- a/libgnome-desktop/gnome-bg.c
+++ b/libgnome-desktop/gnome-bg.c
@@ -2636,3 +2636,17 @@ slideshow_changes_with_size (SlideShow *show)
 	return show->changes_with_size;
 }
 
+gboolean
+gnome_bg_changes_with_time (GnomeBG *bg)
+{
+	SlideShow *show;
+
+	g_return_val_if_fail (bg != NULL, FALSE);
+
+	show = get_as_slideshow (bg, bg->filename);
+	if (show)
+		return g_queue_get_length (show->slides) > 1;
+
+	return FALSE;
+}
+
diff --git a/libgnome-desktop/libgnomeui/gnome-bg.h b/libgnome-desktop/libgnomeui/gnome-bg.h
index aa7c21c..99361c1 100644
--- a/libgnome-desktop/libgnomeui/gnome-bg.h
+++ b/libgnome-desktop/libgnomeui/gnome-bg.h
@@ -104,6 +104,7 @@ GdkPixbuf *      gnome_bg_create_thumbnail      (GnomeBG               *bg,
 						 int                    dest_height);
 gboolean         gnome_bg_is_dark               (GnomeBG               *bg);
 gboolean         gnome_bg_changes_with_size     (GnomeBG               *bg);
+gboolean         gnome_bg_changes_with_time     (GnomeBG               *bg);
 
 
 /* Set a pixmap as root - not a GnomeBG method. At some point



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]