[Slim-Checkins] r10113 - in /branches/6.5/server: Changelog6.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
Sat Sep 30 04:18:28 PDT 2006


Author: adrian
Date: Sat Sep 30 04:18:24 2006
New Revision: 10113

URL: http://svn.slimdevices.com?rev=10113&view=rev
Log:
Bug: 4132
Description: merge -r 10031:10032 from trunk

Modified:
    branches/6.5/server/Changelog6.html
    branches/6.5/server/Slim/Display/Graphics.pm
    branches/6.5/server/Slim/Display/Squeezebox2.pm
    branches/6.5/server/Slim/Display/SqueezeboxG.pm
    branches/6.5/server/Slim/Display/Transporter.pm

Modified: branches/6.5/server/Changelog6.html
URL: http://svn.slimdevices.com/branches/6.5/server/Changelog6.html?rev=10113&r1=10112&r2=10113&view=diff
==============================================================================
--- branches/6.5/server/Changelog6.html (original)
+++ branches/6.5/server/Changelog6.html Sat Sep 30 04:18:24 2006
@@ -8,6 +8,7 @@
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4071">#4071</a> - Band Names in mp3 Tags don't always work</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4077">#4077</a> - CUE files YEAR and GENRE not always working</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4116">#4116</a> - &quot;Rescan done&quot; sent prematurely (before rescan is done!)</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=4140">#4140</a> - Problem with the scanner parsing cue sheets in6.5b3</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4142">#4142</a> - ExBrowse3 does not work with Safari</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>

Modified: branches/6.5/server/Slim/Display/Graphics.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Display/Graphics.pm?rev=10113&r1=10112&r2=10113&view=diff
==============================================================================
--- branches/6.5/server/Slim/Display/Graphics.pm (original)
+++ branches/6.5/server/Slim/Display/Graphics.pm Sat Sep 30 04:18:24 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: branches/6.5/server/Slim/Display/Squeezebox2.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Display/Squeezebox2.pm?rev=10113&r1=10112&r2=10113&view=diff
==============================================================================
--- branches/6.5/server/Slim/Display/Squeezebox2.pm (original)
+++ branches/6.5/server/Slim/Display/Squeezebox2.pm Sat Sep 30 04:18:24 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: branches/6.5/server/Slim/Display/SqueezeboxG.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Display/SqueezeboxG.pm?rev=10113&r1=10112&r2=10113&view=diff
==============================================================================
--- branches/6.5/server/Slim/Display/SqueezeboxG.pm (original)
+++ branches/6.5/server/Slim/Display/SqueezeboxG.pm Sat Sep 30 04:18:24 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: branches/6.5/server/Slim/Display/Transporter.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Display/Transporter.pm?rev=10113&r1=10112&r2=10113&view=diff
==============================================================================
--- branches/6.5/server/Slim/Display/Transporter.pm (original)
+++ branches/6.5/server/Slim/Display/Transporter.pm Sat Sep 30 04:18:24 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