]> git.etc.gen.nz Git - picture-display.git/commitdiff
Move the Glib::Timeout into the module, since most modules will want differing timeouts.
authorAndrew Ruthven <puck@catalyst.net.nz>
Wed, 17 Sep 2008 21:28:18 +0000 (09:28 +1200)
committerAndrew Ruthven <puck@dirk.wgtn.cat-it.co.nz>
Wed, 17 Sep 2008 21:28:18 +0000 (09:28 +1200)
lib/Display/Plugins/FSpot.pm
picture.pl

index 941c5da332aac30a02f26d1af554b114032e5ac8..437a11df8d6aec29ec5a121caf7f6b689a945717 100644 (file)
@@ -74,6 +74,8 @@ LIMIT 1
   $self->{'picture'}->set('sync-size' => 1);
   $self->display();
   $self->{'stage'}->add($self->{'picture'});
+
+  Glib::Timeout->add_seconds(30, $self->can('display'), $self);
 }
 
 1;
index 0a135c15802dd56772a6d9491f05744168f8fec7..9d1a71ecb2c6107b478db1cafa4ab9a8cf74c70c 100755 (executable)
@@ -28,15 +28,12 @@ my @modules = loadModules();
 
 $stage->show_all();
 
-Glib::Timeout->add_seconds(30, \&update_screen);
-
 Clutter->main();
 
 sub update_screen {
   for my $module (@modules) {
     $module->display();
   }
-  Glib::Timeout->add_seconds(30, \&update_screen);
 }
 
 sub loadModules {