[Slim-Checkins] r10032 - in /trunk/server: Changelog7.html
Slim/Display/Graphics.pm
Slim/Display/Squeezebox2.pm Slim/Display/SqueezeboxG.pm
Slim/Display/Transporter.pm
adrian at svn.slimdevices.com
adrian at svn.slimdevices.com
Mon Sep 25 12:34:08 PDT 2006
Author: adrian
Date: Mon Sep 25 12:34:05 2006
New Revision: 10032
URL: http://svn.slimdevices.com?rev=10032&view=rev
Log:
Bug: 4132
Desciption: verify fonts stored in prefs are right size for screen,
else reset to default fonts for screen type - avoids problems with old
prefs for same mac address (e.g. old softsqueeze)
Modified:
trunk/server/Changelog7.html
trunk/server/Slim/Display/Graphics.pm
trunk/server/Slim/Display/Squeezebox2.pm
trunk/server/Slim/Display/SqueezeboxG.pm
trunk/server/Slim/Display/Transporter.pm
Modified: trunk/server/Changelog7.html
URL: http://svn.slimdevices.com/trunk/server/Changelog7.html?rev=10032&r1=10031&r2=10032&view=diff
==============================================================================
--- trunk/server/Changelog7.html (original)
+++ trunk/server/Changelog7.html Mon Sep 25 12:34:05 2006
@@ -61,6 +61,7 @@
<li>Bug Fixes:
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4104">#4104</a> - link to FAQ under help shouldn't put ?player=[MACADDY] at end of url</li>
+ <li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4132">#4132</a> - Upgrading softsqueeze can lead to garbled fonts</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4145">#4145</a> - Display station name instead of album name in overlay text visualizers on transporter second screen</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4159">#4159</a> - second screen needs to be blank when prompting for software update on transporter</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4190">#4190</a> - xmlbrower transition problem</li>
Modified: trunk/server/Slim/Display/Graphics.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Display/Graphics.pm?rev=10032&r1=10031&r2=10032&view=diff
==============================================================================
--- trunk/server/Slim/Display/Graphics.pm (original)
+++ trunk/server/Slim/Display/Graphics.pm Mon Sep 25 12:34:05 2006
@@ -39,6 +39,31 @@
my $display = shift;
Slim::Utils::Prefs::initClientPrefs($display->client, $defaultPrefs);
$display->SUPER::init();
+}
+
+sub validateFonts {
+ # validate that all fonts defined by the prefs for this player are of the correct height for player
+ # otherwise reset to the default fonts [prevents display corruption for softsqueeze when switching emulations]
+ my $display = shift;
+ my $defaultFontPrefs = shift;
+
+ my $client = $display->client;
+ my $height = $display->displayHeight;
+
+ my $fontsOK = 1;
+
+ foreach my $font (@{$client->prefGet('activeFont')}, @{$client->prefGet('idleFont')}) {
+ my $fontheight = Slim::Display::Lib::Fonts::fontheight($font.".2");
+ if (!$fontheight || $fontheight != $height) {
+ $fontsOK = 0;
+ }
+ }
+
+ unless ($fontsOK) {
+ foreach my $pref (keys %{$defaultFontPrefs}) {
+ $client->prefSet($pref, $defaultFontPrefs->{$pref});
+ }
+ }
}
sub linesPerScreen {
Modified: trunk/server/Slim/Display/Squeezebox2.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Display/Squeezebox2.pm?rev=10032&r1=10031&r2=10032&view=diff
==============================================================================
--- trunk/server/Slim/Display/Squeezebox2.pm (original)
+++ trunk/server/Slim/Display/Squeezebox2.pm Mon Sep 25 12:34:05 2006
@@ -117,13 +117,16 @@
my $nmodes = $#modes;
our $defaultPrefs = {
+ 'idleBrightness' => 2,
+ 'playingDisplayMode' => 5,
+ 'playingDisplayModes' => [0..11]
+};
+
+our $defaultFontPrefs = {
'activeFont' => [qw(light standard full)],
'activeFont_curr' => 1,
'idleFont' => [qw(light standard full)],
'idleFont_curr' => 1,
- 'idleBrightness' => 2,
- 'playingDisplayMode' => 5,
- 'playingDisplayModes' => [0..11]
};
sub init {
@@ -136,7 +139,11 @@
}
Slim::Utils::Prefs::initClientPrefs($display->client, $defaultPrefs);
+ Slim::Utils::Prefs::initClientPrefs($display->client, $defaultFontPrefs);
+
$display->SUPER::init();
+
+ $display->validateFonts($defaultFontPrefs);
}
sub resetDisplay {
Modified: trunk/server/Slim/Display/SqueezeboxG.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Display/SqueezeboxG.pm?rev=10032&r1=10031&r2=10032&view=diff
==============================================================================
--- trunk/server/Slim/Display/SqueezeboxG.pm (original)
+++ trunk/server/Slim/Display/SqueezeboxG.pm Mon Sep 25 12:34:05 2006
@@ -30,13 +30,16 @@
my $GRAPHICS_FRAMEBUF_LIVE = (1 * 280 * 2);
our $defaultPrefs = {
+ 'idleBrightness' => 2,
+ 'playingDisplayMode' => 0,
+ 'playingDisplayModes' => [0..5]
+};
+
+our $defaultFontPrefs = {
'activeFont' => [qw(small medium large huge)],
'activeFont_curr' => 1,
'idleFont' => [qw(small medium large huge)],
'idleFont_curr' => 1,
- 'idleBrightness' => 2,
- 'playingDisplayMode' => 0,
- 'playingDisplayModes' => [0..5]
};
# Display Modes
@@ -77,7 +80,11 @@
}
Slim::Utils::Prefs::initClientPrefs($display->client, $defaultPrefs);
+ Slim::Utils::Prefs::initClientPrefs($display->client, $defaultFontPrefs);
+
$display->SUPER::init();
+
+ $display->validateFonts($defaultFontPrefs);
}
sub resetDisplay {
Modified: trunk/server/Slim/Display/Transporter.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Display/Transporter.pm?rev=10032&r1=10031&r2=10032&view=diff
==============================================================================
--- trunk/server/Slim/Display/Transporter.pm (original)
+++ trunk/server/Slim/Display/Transporter.pm Mon Sep 25 12:34:05 2006
@@ -29,10 +29,6 @@
my $display_maxLine = 2; # render up to 3 lines [0..$display_maxLine]
our $defaultPrefs = {
- 'activeFont' => [qw(light standard full)],
- 'activeFont_curr' => 1,
- 'idleFont' => [qw(light standard full)],
- 'idleFont_curr' => 1,
'idleBrightness' => 2,
'playingDisplayMode' => 5,
'playingDisplayModes' => [0..5],
More information about the checkins
mailing list