Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
gnome-desktop2
gnome-desktop2-one-slide-slideshow.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gnome-desktop2-one-slide-slideshow.patch of Package gnome-desktop2
commit adf18a2cf78c26a33c7a00210fc29020e935e0c1 Author: Vincent Untz <vuntz@gnome.org> Date: Wed Feb 9 13:10:48 2011 +0100 gnome-bg: Do not add timeout for one-slide slideshows If a slideshow is made of only one slide, then there's no animation. So we just override the duration of the slide to G_MAXUINT, and we do not add timeouts for such durations. https://bugzilla.gnome.org/show_bug.cgi?id=630498 diff --git a/libgnome-desktop/gnome-bg.c b/libgnome-desktop/gnome-bg.c index d6829ad..dc26cc1 100644 --- a/libgnome-desktop/gnome-bg.c +++ b/libgnome-desktop/gnome-bg.c @@ -1930,10 +1930,13 @@ ensure_timeout (GnomeBG *bg, { if (!bg->timeout_id) { double timeout = get_slide_timeout (slide); - bg->timeout_id = g_timeout_add_full ( - G_PRIORITY_LOW, - timeout * 1000, on_timeout, bg, NULL); + /* G_MAXUINT means "only one slide" */ + if (timeout < G_MAXUINT) { + bg->timeout_id = g_timeout_add_full ( + G_PRIORITY_LOW, + timeout * 1000, on_timeout, bg, NULL); + } } } @@ -2880,16 +2883,24 @@ read_slideshow_file (const char *filename, g_markup_parse_context_free (context); if (show) { + int len; + t = mktime (&show->start_tm); show->start_time = (double)t; dump_bg (show); + len = g_queue_get_length (show->slides); + /* no slides, that's not a slideshow */ - if (g_queue_get_length (show->slides) == 0) { + if (len == 0) { slideshow_unref (show); show = NULL; + /* one slide, there's no transition */ + } else if (len == 1) { + Slide *slide = show->slides->head->data; + slide->duration = G_MAXUINT; } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor