From: Emmanuel Rodriguez Date: Fri, 18 Sep 2009 12:11:50 +0000 (+0200) Subject: Fix a clutter warning when cloning the default icon for pending flickr images. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52b7ab2aa88f90a2c34d23232ac868eec6ea7225;p=libchamplain 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. --- 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);