From 5c734fde1a25c9ddcc13fe4958da3f7cff3550a0 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Thu, 18 Sep 2008 09:28:18 +1200 Subject: [PATCH] Move the Glib::Timeout into the module, since most modules will want differing timeouts. --- lib/Display/Plugins/FSpot.pm | 2 ++ picture.pl | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Display/Plugins/FSpot.pm b/lib/Display/Plugins/FSpot.pm index 941c5da..437a11d 100644 --- a/lib/Display/Plugins/FSpot.pm +++ b/lib/Display/Plugins/FSpot.pm @@ -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; diff --git a/picture.pl b/picture.pl index 0a135c1..9d1a71e 100755 --- a/picture.pl +++ b/picture.pl @@ -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 { -- 2.30.2