| 1 | package Gapp::StatusIcon; | ||
| 2 | { | ||
| 3 | $Gapp::StatusIcon::VERSION = '0.60'; | ||
| 4 | } | ||
| 5 | |||
| 6 | use Moose; | ||
| 7 | use MooseX::SemiAffordanceAccessor; | ||
| 8 | |||
| 9 | |||
| 10 | extends 'Gapp::Widget'; | ||
| 11 | |||
| 12 | has '+gclass' => ( | ||
| 13 | default => 'Gtk2::StatusIcon', | ||
| 14 | ); | ||
| 15 | |||
| 16 | sub BUILDARGS { | ||
| 17 | my $class = shift; | ||
| 18 | my %args = @_ == 1 && is_HashRef( $_[0] ) ? %{$_[0]} : @_; | ||
| 19 | |||
| 20 | for ( qw[pixbuf stock icon_name] ) { | ||
| 21 | $args{properties}{$_} = delete $args{$_} if exists $args{$_}; | ||
| 22 | } | ||
| 23 | if ( exists $args{tooltip} ) { | ||
| 24 | $args{properties}{has_tooltip} = 1; | ||
| 25 | $args{properties}{tooltip_text} = delete $args{tooltip}; | ||
| 26 | } | ||
| 27 | |||
| 28 | |||
| 29 | |||
| 30 | __PACKAGE__->SUPER::BUILDARGS( %args ); | ||
| 31 | } | ||
| 32 | |||
| 33 | 1; | ||
| 34 | |||
| 35 | __END__ |