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 941c5da..437a11d 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 0a135c1..9d1a71e 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 {