@@ -82,7 +82,7 @@ our %Widgets=
nbsongs => 10,
click3 => sub { ::ChooseSongs(undef ,::GetNextSongs($_ [0]{nbsongs })); },
},
Playlist =>
OpenBrowser =>
{ class => ' Layout::Button' ,
oldopt1 => ' toggle' ,
options => ' toggle' ,
@@ -91,7 +91,7 @@ our %Widgets=
activate => sub { ::OpenSpecialWindow(' Browser' ,$_ [0]{toggle }); },
click3 => sub { ::OpenSpecialWindow(' Browser' ); },
},
BContext =>
OpenContext =>
{ class => ' Layout::Button' ,
oldopt1 => ' toggle' ,
options => ' toggle' ,
@@ -199,7 +199,7 @@ our %Widgets=
event => ' Queue QueueAction' ,
dragdest => [::DRAG_ID,sub {shift ;shift ;::Enqueue(@_ );}],
},
Vol =>
VolumeIcon =>
{ class => ' Layout::Button' ,
button => 0,
state => sub { ::GetMute() ? ' m' : ::GetVol() },
@@ -216,7 +216,7 @@ our %Widgets=
{ class => ' Layout::Button' ,
button => 0,
},
Label =>
Text =>
{ class => ' Layout::Label' ,
oldopt1 => sub { ' text' ,$_ [0] },
group => ' Play' ,
@@ -271,7 +271,7 @@ our %Widgets=
dragsrc => [::DRAG_ALBUM,\&DragCurrentAlbum],
cursor => ' hand2' ,
},
Date =>
Year =>
{ class => ' Layout::Label' ,
group => ' Play' ,
markup => ' %y' ,
@@ -290,7 +290,7 @@ our %Widgets=
markup_empty => ::__x( _" of {length}" , ' length' => " 0:00" ),
# font => 'Monospace',
},
LabelTime =>
PlayingTime =>
{ class => ' Layout::Label::Time' ,
group => ' Play' ,
markup => ' %s' ,
@@ -302,6 +302,13 @@ our %Widgets=
click1 => sub { $_ [0]{remaining }=!$_ [0]{remaining }; $_ [0]-> update_time; },
update => sub { $_ [0]-> update_time unless $_ [0]{busy }; },
},
Time =>
{ parent => ' PlayingTime' ,
xalign => .5,
markup => ' %s' . ::__x( _" of {length}" , ' length' => " %m " ),
markup_empty => ' %s' . ::__x( _" of {length}" , ' length' => " 0:00" ),
initsize => ' -XX:XX' . ::__x( _" of {length}" , ' length' => " XX:XX" ),
},
TimeBar =>
{ class => ' Layout::Bar' ,
group => ' Play' ,
@@ -314,7 +321,7 @@ our %Widgets=
set_preview => \&Layout::Bar::update_preview_Time,
cursor => ' hand2' ,
},
Scale =>
TimeSlider =>
{ class => ' Layout::Bar::Scale' ,
parent => ' TimeBar' ,
cursor => undef ,
@@ -329,13 +336,13 @@ our %Widgets=
max => 100,
cursor => ' hand2' ,
},
VolSlider =>
VolumeSlider =>
{ class => ' Layout::Bar::Scale' ,
orientation => ' bottom-to-top' ,
parent => ' VolBar' ,
cursor => undef ,
},
LabelVol =>
Volume =>
{ class => ' Layout::Label' ,
initsize => ' 000' ,
event => ' Vol' ,
@@ -438,7 +445,15 @@ our %Widgets=
{ class => ' GMB::AABox' ,
oldopt1 => sub { ' aa=' .( $_ [0] ? ' artist' : ' album' ) },
},
FPane =>
ArtistBox =>
{ class => ' GMB::AABox' ,
aa => ' artists' ,
},
AlbumBox =>
{ class => ' GMB::AABox' ,
aa => ' album' ,
},
FilterPane =>
{ class => ' FilterPane' ,
oldopt1 => sub
{ my ($nb ,$hide ,@pages )=split ' ,' ,$_ [0];
@@ -450,11 +465,11 @@ our %Widgets=
oldopt1 => ' mode' ,
saveoptions => ' mode' ,
},
FBox =>
FilterBox =>
{ New => \&Browser::makeFilterBox,
dragdest => [::DRAG_FILTER,sub { ::SetFilter($_ [0],$_ [2]);}],
},
FLock => { New => \&Browser::makeLockToggle,},
FilterLock => { New => \&Browser::makeLockToggle,},
HistItem => { New => \&Layout::MenuItem::new,
label => _" Recent Filters" ,
updatemenu => \&Browser::fill_history_menu,
@@ -527,7 +542,7 @@ our %Widgets=
tip => _" Reset filter" ,
activate => sub { ::SetFilter($_ [0],undef ); },
},
TogButton =>
ToggleButton =>
{ class => ' Layout::TogButton' ,
size => ' menu' ,
},
@@ -554,6 +569,14 @@ our %Widgets=
AASearch =>
{ class => ' AASearch' ,
},
ArtistSearch =>
{ class => ' AASearch' ,
aa => ' artists' ,
},
AlbumSearch =>
{ class => ' AASearch' ,
aa => ' album' ,
},
SongSearch =>
{ class => ' SongSearch' ,
},
@@ -612,7 +635,7 @@ our %Widgets=
{ class => ' Layout::Progress' ,
compact => 1,
},
ProgressV =>
VProgress =>
{ class => ' Layout::Progress' ,
vertical => 1,
},
@@ -626,6 +649,30 @@ our %Widgets=
# },
);
# aliases for previous widget names
{ my %aliases =
( Playlist => ' OpenBrowser' ,
BContext => ' OpenContext' ,
Date => ' Year' ,
Label => ' Text' ,
Vol => ' VolumeIcon' ,
LabelVol => ' Volume' ,
FLock => ' FilterLock' ,
TogButton => ' ToggleButton' ,
ProgressV => ' VProgress' ,
FBox => ' FilterBox' ,
Scale => ' TimeSlider' ,
VolSlider => ' VolumeSlider' ,
FPane => ' FilterPane' ,
LabelTime => ' PlayingTime' ,
# Pos => 'PlaylistPosition', 'Position', ?
# SimpleSearch => 'Search', ?
);
while ( my ($alias ,$real )= each %aliases )
{ $Widgets {$alias }||=$Widgets {$real };
}
}
our %Layouts ;
sub get_layout_list