Index: Slim/Web/Setup.pm
===================================================================
--- Slim/Web/Setup.pm (revision 5282)
+++ Slim/Web/Setup.pm (working copy)
@@ -124,8 +124,8 @@
$pageref->{'Prefs'}{'idlesaver'}{'options'} = Slim::Buttons::Common::hash_of_savers();
$pageref->{'Prefs'}{'offsaver'}{'options'} = Slim::Buttons::Common::hash_of_savers();
}
- $pageref->{'Prefs'}{'playingDisplayMode'}{'options'} = $client->playingModeOptions();
- $pageref->{'Prefs'}{'playingDisplayMode'}{'validateArgs'} = [0,scalar($pageref->{'Prefs'}{'playingDisplayMode'}{'options'}),1,1]; } else {
+ $pageref->{'Prefs'}{'playingDisplayModes'}{'options'} = $client->playingModeOptions();
+ $pageref->{'Prefs'}{'playingDisplayModes'}{'validateArgs'} = [$pageref->{'Prefs'}{'playingDisplayModes'}{'options'}]; } else {
$pageref->{'GroupOrder'} = ['Default','TitleFormats'];
}
@@ -148,11 +148,6 @@
$paramref->{'macaddress'} = $client->macaddress;
$paramref->{'signalstrength'} = $client->signalStrength;
- if ($client->isPlayer()) {
- $pageref->{'Prefs'}{'playingDisplayMode'}{'options'} = $client->playingModeOptions();
- $pageref->{'Prefs'}{'playingDisplayMode'}{'validateArgs'} = [0,scalar($pageref->{'Prefs'}{'playingDisplayMode'}{'options'}),1,1];
- }
-
$client->update();
}
#,'template' => 'setup_player.html'
@@ -173,13 +168,18 @@
,'GroupLine' => 1
}
,'Display' => {
- 'PrefOrder' => ['playingDisplayMode','showbufferfullness']
+ 'PrefOrder' => ['playingDisplayModes']
+ ,'PrefsInTable' => 1
,'Suppress_PrefHead' => 1
,'Suppress_PrefDesc' => 1
,'Suppress_PrefLine' => 1
+ ,'Suppress_PrefSub' => 1
,'GroupHead' => string('SETUP_PLAYINGDISPLAYMODE')
,'GroupDesc' => string('SETUP_PLAYINGDISPLAYMODE_DESC')
+ ,'GroupPrefHead' => '
' . string('SETUP_CURRENT') .
+ ' | | ' . string('DISPLAY_SETTINGS') . ' | |
'
,'GroupLine' => 1
+ ,'GroupSub' => 1
}
,'ScreenSaver' => {
'PrefOrder' => ['screensaver','idlesaver','offsaver','screensavertimeout']
@@ -204,21 +204,31 @@
'validate' => \&validateInt
,'validateArgs' => [] #will be set by preEval
}
- ,'playingDisplayMode' => {
+ ,'playingDisplayMode' => {
'validate' => \&validateInt
- ,'validateArgs' => undef
- ,'options' => undef
+ ,'validateArgs' => [] # will be set by preEval
+ }
+ ,'playingDisplayModes' => {
+ 'isArray' => 1
+ ,'arrayAddExtra' => 1
+ ,'arrayDeleteNull' => 1
+ ,'arrayDeleteValue' => -1
+ ,'arrayBasicValue' => 0
+ ,'arrayCurrentPref' => 'playingDisplayMode'
+ ,'inputTemplate' => 'setup_input_array_sel.html'
+ ,'validate' => \&validateInHash
+ ,'validateArgs' => [] #filled by initSetup
+ ,'options' => {} #filled by initSetup using hash_of_prefs('titleFormat')
,'optionSort' => 'NK'
- ,'PrefChoose' => string('SETUP_PLAYINGDISPLAYMODE').string('COLON')
- ,'onChange' => sub { shift->update(); }
+ ,'onChange' => sub {
+ my ($client,$changeref,$paramref,$pageref) = @_;
+ if (exists($changeref->{'playingDisplayModes'}{'Processed'})) {
+ return;
+ }
+ processArrayChange($client,'playingDisplayModes',$paramref,$pageref);
+ $changeref->{'playingDisplayModes'}{'Processed'} = 1;
+ }
}
- ,'showbufferfullness' => {
- 'validate' => \&validateTrueFalse
- ,'options' => {
- '0' => string('DISABLED')
- ,'1' => string('ENABLED')
- }
- }
,'titleFormat' => {
'isArray' => 1
,'arrayAddExtra' => 1
Index: Slim/Player/Player.pm
===================================================================
--- Slim/Player/Player.pm (revision 5282)
+++ Slim/Player/Player.pm (working copy)
@@ -42,7 +42,8 @@
,'mp3SilencePrelude' => 0
,'offDisplaySize' => 0
,'pitch' => 100
- ,'playingDisplayMode' => 0
+ ,'playingDisplayMode' => 1
+ ,'playingDisplayModes' => [1..6]
,'power' => 1
,'powerOffBrightness' => 1
,'powerOnBrightness' => 4
@@ -1528,16 +1529,16 @@
sub playingModeOptions {
my $client = shift;
my %options = (
- '0' => $client->string('BLANK')
- ,'1' => $client->string('ELAPSED')
- ,'2' => $client->string('REMAINING')
- ,'3' => $client->string('PROGRESS_BAR')
- ,'4' => $client->string('ELAPSED') . ' ' . $client->string('AND') . ' ' . $client->string('PROGRESS_BAR')
- ,'5' => $client->string('REMAINING') . ' ' . $client->string('AND') . ' ' . $client->string('PROGRESS_BAR')
+ '0' => '',
+ '1' => $client->string('BLANK'),
+ '2' => $client->string('ELAPSED'),
+ '3' => $client->string('REMAINING'),
+ '4' => $client->string('PROGRESS_BAR'),
+ '5' => $client->string('ELAPSED') . ' ' . $client->string('AND') . ' ' . $client->string('PROGRESS_BAR'),
+ '6' => $client->string('REMAINING') . ' ' . $client->string('AND') . ' ' . $client->string('PROGRESS_BAR'),
+ '7' => $client->string('SETUP_SHOWBUFFERFULLNESS'),
);
- $options{'6'} = $client->string('SETUP_SHOWBUFFERFULLNESS') if $client->prefGet('showbufferfullness');
-
return \%options;
}
Index: Slim/Player/Squeezebox2.pm
===================================================================
--- Slim/Player/Squeezebox2.pm (revision 5282)
+++ Slim/Player/Squeezebox2.pm (working copy)
@@ -35,6 +35,7 @@
'transitionDuration' => 0,
'replayGainMode' => '3',
'playingDisplayMode' => 6,
+ 'playingDisplayModes' => [1..12]
};
# Parameters for the vumeter:
@@ -139,23 +140,21 @@
sub playingModeOptions {
my $client = shift;
my %options = (
- '0' => $client->string('BLANK'),
- '1' => $client->string('ELAPSED'),
- '2' => $client->string('REMAINING') ,
- '3' => $client->string('VISUALIZER_VUMETER_SMALL'),
- '4' => $client->string('VISUALIZER_VUMETER_SMALL'). ' ' . $client->string('AND') . ' ' . $client->string('ELAPSED'),
- '5' => $client->string('VISUALIZER_VUMETER_SMALL'). ' ' . $client->string('AND') . ' ' . $client->string('REMAINING'),
- '6' => $client->string('VISUALIZER_SPECTRUM_ANALYZER_SMALL'),
- '7' => $client->string('VISUALIZER_SPECTRUM_ANALYZER_SMALL'). ' ' . $client->string('AND') . ' ' . $client->string('ELAPSED'),
- '8' => $client->string('VISUALIZER_SPECTRUM_ANALYZER_SMALL'). ' ' . $client->string('AND') . ' ' . $client->string('REMAINING'),
- '9' => $client->string('VISUALIZER_SPECTRUM_ANALYZER'),
- '10' => $client->string('VISUALIZER_SPECTRUM_ANALYZER'). ' ' . $client->string('AND') . ' ' . $client->string('ELAPSED'),
- '11' => $client->string('VISUALIZER_SPECTRUM_ANALYZER'). ' ' . $client->string('AND') . ' ' . $client->string('REMAINING'),
+ '0' => '',
+ '1' => $client->string('BLANK'),
+ '2' => $client->string('ELAPSED'),
+ '3' => $client->string('REMAINING') ,
+ '4' => $client->string('VISUALIZER_VUMETER_SMALL'),
+ '5' => $client->string('VISUALIZER_VUMETER_SMALL'). ' ' . $client->string('AND') . ' ' . $client->string('ELAPSED'),
+ '6' => $client->string('VISUALIZER_VUMETER_SMALL'). ' ' . $client->string('AND') . ' ' . $client->string('REMAINING'),
+ '7' => $client->string('VISUALIZER_SPECTRUM_ANALYZER_SMALL'),
+ '8' => $client->string('VISUALIZER_SPECTRUM_ANALYZER_SMALL'). ' ' . $client->string('AND') . ' ' . $client->string('ELAPSED'),
+ '9' => $client->string('VISUALIZER_SPECTRUM_ANALYZER_SMALL'). ' ' . $client->string('AND') . ' ' . $client->string('REMAINING'),
+ '10' => $client->string('VISUALIZER_SPECTRUM_ANALYZER'),
+ '11' => $client->string('VISUALIZER_SPECTRUM_ANALYZER'). ' ' . $client->string('AND') . ' ' . $client->string('ELAPSED'),
+ '12' => $client->string('VISUALIZER_SPECTRUM_ANALYZER'). ' ' . $client->string('AND') . ' ' . $client->string('REMAINING'),
+ '13' => $client->string('SETUP_SHOWBUFFERFULLNESS'),
);
-
- if ($client->prefGet('showbufferfullness')) {
- $options{'12'} = $client->string('SETUP_SHOWBUFFERFULLNESS');
- }
return \%options;
}