use POE::Component::EasyDBI;
my $default_f_spot_db = "$ENV{HOME}/.gnome2/f-spot/photos.db";
+my $delay = 10;
sub new {
my $proto = shift;
return;
}
+ #warn "Loading $file\n";
+ $self->{'new'}->set_opacity(0);
$self->{'new'}->set_from_file($file);
+ #$self->{'stage'}->add($self->{'new'});
if ($self->{'last_file'} eq '') {
- fade_in($self->{'new'});
-# } else {
-#warn "Fade out old\n";
-# my $old_effect = Clutter::EffectTemplate->new_for_duration(1000, 'main::smoothstep_dec' );
-# my $old = Clutter::Effect->fade($old_effect, $self->{'old'}, 0, $self->can('fade_in'), $self->{'new'});
-# $old->start();
+ fade_in(undef, $self);
+ } else {
+warn "Fade out old\n";
+ my $old_effect = Clutter::EffectTemplate->new_for_duration(2000, 'main::smoothstep_dec' );
+ my $old = Clutter::Effect->fade($old_effect, $self->{'new'}, 0, $self->can('fade_in'), $self);
+ $old->start();
+
+ sleep 10;
}
-# my $temp = $self->{'old'};
-# $self->{'old'} = $self->{'new'};
-# $self->{'new'} = $temp;
$self->{'last_file'} = $file;
-
- $self->{'kernel'}->delay(fspot_display, 30);
+ $self->{'kernel'}->delay(fspot_display, $delay);
}
sub fade_in {
- my $new_pic = shift;
+ my ($actor, $self) = @_;
- my $new_effect = Clutter::EffectTemplate->new_for_duration(1000, 'main::smoothstep_inc');
- my $new = Clutter::Effect->fade($new_effect, $new_pic, 255);
+warn "Fade in new\n";
+ my $new_effect = Clutter::EffectTemplate->new_for_duration(2000, 'main::smoothstep_inc');
+ my $new = Clutter::Effect->fade($new_effect, $self->{'new'}, 255);
$new->start();
+
+ my $temp = $self->{'old'};
+ $self->{'old'} = $self->{'new'};
+ $self->{'new'} = $temp;
}
sub display {
$self->{'stage'}->add($self->{$age});
}
- $self->display();
+ $self->{'kernel'}->yield('fspot_display');
}
1;