bless ($self, $class);
- $self->{'logo'} = Clutter::Texture->new("$Bin/share/Asterisk.png");
+ $self->{'logo'} = "$Bin/share/Asterisk.png";
$self->{'kernel'}->state('asterisk_delayed_start', $self, 'delayed_start');
},
inline_states => {
- # When we're connected to Asterisk, post back to the main session for the rest of
- # our states to be setup in asterisk_start. This is to make sure the states are
- # created in the correct session with a reference to $self.
+ # When we're connected to Asterisk, post back to the main session for
+ # the rest of our states to be setup in asterisk_start. This is to
+ # make sure the states are created in the correct session with a
+ # reference to $self.
_connected => sub { $self->{'kernel'}->post('display' => 'asterisk_delayed_start') },
asterisk_start => sub {
my ($kernel, $self) = @_[KERNEL, ARG0];
print STDERR "Other input - $input->{Event}\n";
print Dumper($input);
+
+# $kernel->post('display', 'notifications_add', "Event: " . $input->{Event}, $self->{'logo'});
}
sub hangup {
my $dest = $input->{Destination};
$dest =~ s/(.*)-.*/$1/;
- my $text = Clutter::Label->new('Sans 20', "Call from " . $input->{CallerIDName} . "\n " . $input->{CallerID} . "\nFor $dest");
- $text->set_color(Clutter::Color->parse('White'));
- $text->set_ellipsize('end');
+ my $text = "Call from " . $input->{CallerIDName} . "\n " . $input->{CallerID} . "\nFor $dest";
$kernel->post('display', 'notifications_add', $text, $self->{'logo'});
}