Redesign of widget options handling, of ExtraWidget,TabbedLists and C…
…ontext widgets
Lots of modifications, among them :
-Wipe all previously saved layout/widget options (like window size,
displayed columns, ...)
-Change layout 'Default' line format, so that saved options can contain
spaces, also all these default options may now be specified with the
normal widget options.
-TabbedList and Context widgets are now implemented by the same code,
that also implement a new NB (NoteBook) container that supercede the TB
container.
For the NB container, the title of the tab and optional icon must be
passed as options 'tabtitle' and 'tabicon' of the children :
NBexample = Artist(tabtitle="artist name",tabicon=gtk-image) VBchild
VBchild = (tabtitle="a container") _SongList AABox
-Some changes to the lyrics and webcontext plugin to update them to the
new system
-It is now possible to embed layouts inside other layout by simply
adding "@name_of_embeded_layout" to a container (not all characters are
supported in embeded layouts names)
example :
[example_layout]
HBmain = Play Stop Pref
VBmain = HBmain Title _@embedded_example
[embedded_example]
VBmain = Title _SongTree
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1534,7 +1531,6 @@ sub ReadSavedTags #load tags _and_ settings
else
{ my%lines;
my$section;
no warnings 'utf8'; # to prevent 'utf8 "\xE9" does not map to Unicode' type warnings about path and file which are stored as they are on the filesystem #FIXME find a better way to read lines containing both utf8 and unknown encoding
while (<$fh>)
{ if (m/^\[([^]]+)\]/) {$section=$1; next}
nextunless$section;
@@ -1549,6 +1545,7 @@ sub ReadSavedTags #load tags _and_ settings
$Options{ArtistSplit}||=' & |, |;';
$re_artist=qr/$Options{ArtistSplit}/;
$Options{Labels}=[ split"\x1D",$Options{Labels} ] unlessref$Options{Labels}; #for version <1.1.2 #DELME in v1.1.3/4
if ($oldversion<1.1003) { delete$Options{$_} forgrepm/^Layout(?:LastSeen)?_/, keys%Options } #for version <1.1.2 #DELME in v1.1.3/4
Post_Options_init();
@@ -1628,12 +1625,11 @@ sub SaveTags #save tags _and_ settings
$tooold=pop@sessionsif@sessions>20;
$Options{Sessions}=join'',@sessions;
}
formy$key (grepm/^Layout_/, keys%Options) #cleanup options for layout that haven't been seen for a while
{ $key=~s/^Layout_//;
my$key2='LayoutLastSeen_'.$key;
if (exists$Layout::Layouts{$key}) { delete$Options{$key2}; }
my$fullbutton=NewPrefCheckButton(AddFullscreenButton=> _"Add a fullscreen button",\&AddFullscreenButton,_"Add a fullscreen button to layouts that can accept extra buttons");
my$fullbutton=NewPrefCheckButton(AddFullscreenButton=> _"Add a fullscreen button",sub { Layout::WidgetChangedAutoAdd('Fullscreen'); },_"Add a fullscreen button to layouts that can accept extra buttons");