From 52b7ab2aa88f90a2c34d23232ac868eec6ea7225 Mon Sep 17 00:00:00 2001 From: Emmanuel Rodriguez Date: Fri, 18 Sep 2009 14:11:50 +0200 Subject: [PATCH] Fix a clutter warning when cloning the default icon for pending flickr images. In Clutter 1.0 an actor can only be cloned if it's in the stage. It doesn't have to be visible, just in the stage. --- bindings/perl/Champlain/examples/flickr.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bindings/perl/Champlain/examples/flickr.pl b/bindings/perl/Champlain/examples/flickr.pl index 72997db..dd7944d 100755 --- a/bindings/perl/Champlain/examples/flickr.pl +++ b/bindings/perl/Champlain/examples/flickr.pl @@ -14,7 +14,7 @@ Where I is a valid Flickr key. This sample scripts shows how to interact with the Flickr API and to display thumbnails for pictures near a location. The Flickr API interaction is triggered -when a middle-click in done in a location on the map. +when a middle-click in done in a location on the map. =cut @@ -67,9 +67,21 @@ sub main { $stage->show_all(); + + # + # This is the default icon that will be displayed while the flickr a image + # is being downloaded. This exact actor ($icon) will never be displayed, + # instead copies of it (clones) will be displayed. + # + # Since clutter 1.0 an actor can only be cloned if it is added to the stage. + # It doesn't need to be visible, just to be in the stage. + # my $icon = Clutter::Texture->new( File::Spec->catfile($FindBin::Bin, 'images', 'flickr.png') ); + $stage->add($icon); + $icon->hide(); + # Middle click on a location to trigger the Flickr interaction $map->set_reactive(TRUE); -- 2.39.5