[Slim-Checkins] r9244 - in /trunk/server:
HTML/EN/html/docs/display.html
Slim/Buttons/Common.pm Slim/Player/Client.pm
adrian at svn.slimdevices.com
adrian at svn.slimdevices.com
Tue Aug 29 10:18:38 PDT 2006
Author: adrian
Date: Tue Aug 29 10:18:34 2006
New Revision: 9244
URL: http://svn.slimdevices.com?rev=9244&view=rev
Log:
Bug: N/A
Description: add ability to suppress some status messages by policy as
well as when screen2 is displaying now playing [use with custom
playlist lines - doesn't look very good otherwise!]
Modified:
trunk/server/HTML/EN/html/docs/display.html
trunk/server/Slim/Buttons/Common.pm
trunk/server/Slim/Player/Client.pm
Modified: trunk/server/HTML/EN/html/docs/display.html
URL: http://svn.slimdevices.com/trunk/server/HTML/EN/html/docs/display.html?rev=9244&r1=9243&r2=9244&view=diff
==============================================================================
--- trunk/server/HTML/EN/html/docs/display.html (original)
+++ trunk/server/HTML/EN/html/docs/display.html Tue Aug 29 10:18:34 2006
@@ -775,7 +775,11 @@
<p>A plugin should register alternative lines function at client
connect time with the client methods customVolumeLines and
-customPlaylistLines. For example:</p>
+customPlaylistLines.</p>
+
+<p>To avoid server status messages appearing on top of a custom
+screen, a plugin can also turn off the common play/stop/pause status
+messages by setting $client->suppressStatus().</p>
<pre>
sub initPlugin {
@@ -786,6 +790,7 @@
my $client = shift->client || return;
$client->customVolumeLines( \&volumeLines );
$client->customPlaylistLines( \&playlistLines );
+ $client->suppressStatus(1);
}
sub volumeLines {
Modified: trunk/server/Slim/Buttons/Common.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Buttons/Common.pm?rev=9244&r1=9243&r2=9244&view=diff
==============================================================================
--- trunk/server/Slim/Buttons/Common.pm (original)
+++ trunk/server/Slim/Buttons/Common.pm Tue Aug 29 10:18:34 2006
@@ -419,7 +419,7 @@
Slim::Buttons::Common::pushMode($client, 'playlist');
- $client->showBriefly($client->string('STOPPING'), "");
+ $client->showBriefly($client->string('STOPPING'), "") unless suppressStatus($client);
}
},
@@ -1800,6 +1800,10 @@
sub suppressStatus {
my $client = shift;
+ my $suppress = $client->suppressStatus();
+
+ return $suppress if (defined ($suppress));
+
return undef unless $client->display->hasScreen2();
my $screen2 = $client->modeParam('screen2active');
Modified: trunk/server/Slim/Player/Client.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Player/Client.pm?rev=9244&r1=9243&r2=9244&view=diff
==============================================================================
--- trunk/server/Slim/Player/Client.pm (original)
+++ trunk/server/Slim/Player/Client.pm Tue Aug 29 10:18:34 2006
@@ -78,7 +78,7 @@
# The following indexes are unused:
# 2, 3, 8, 11, 12, 13, 16, 23, 24, 25, 26, 27, 33, 34, 53
- # 64, 65, 66, 67, 68, 72, 82, 83
+ # 64, 65, 66, 67, 68, 72, 82,
$client->[0] = $id;
$client->[1] = Slim::Utils::Prefs::getClientPrefs($id); # _prefs
@@ -145,6 +145,7 @@
$client->[79] = undef; # irRefTimeStored
$client->[80] = undef; # syncSelection
$client->[81] = []; # syncSelections
+ $client->[83] = undef; # suppressStatus
$client->[84] = 0; # songBytes
$client->[85] = 0; # pauseTime
$client->[87] = 0; # bytesReceivedOffset
@@ -1517,6 +1518,11 @@
@_ ? ($r->[81]->[$i] = shift) : $r->[81]->[$i];
}
+sub suppressStatus {
+ my $r = shift;
+ @_ ? ($r->[83] = shift) : $r->[83];
+}
+
sub songBytes {
my $r = shift;
@_ ? ($r->[84] = shift) : $r->[84];
More information about the checkins
mailing list