[gthumb/ext] [slideshow] remove the special "none" effect from the random list



commit 5f62458fff6d6c7914385fc33af6f78b06402a22
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri Sep 4 00:46:33 2009 +0200

    [slideshow] remove the special "none" effect from the random list

 extensions/slideshow/actions.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/extensions/slideshow/actions.c b/extensions/slideshow/actions.c
index 5e9a4fa..7033396 100644
--- a/extensions/slideshow/actions.c
+++ b/extensions/slideshow/actions.c
@@ -52,7 +52,18 @@ gth_browser_activate_action_view_slideshow (GtkAction  *action,
 
 	transition_id = eel_gconf_get_string (PREF_SLIDESHOW_TRANSITION, DEFAULT_TRANSITION);
 	if (strcmp (transition_id, "random") == 0) {
+		GList *scan;
+
 		transitions = gth_main_get_registered_objects (GTH_TYPE_TRANSITION);
+		for (scan = transitions; scan; scan = scan->next) {
+			GthTransition *transition = scan->data;
+
+			if (strcmp (gth_transition_get_id (transition), "none") == 0) {
+				transitions = g_list_remove_link (transitions, scan);
+				_g_object_list_unref (scan);
+				break;
+			}
+		}
 	}
 	else {
 		GthTransition *transition = gth_main_get_registered_object (GTH_TYPE_TRANSITION, transition_id);



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