Revision: 3377
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3377&view=rev
Author:   hofman
Date:     2008-01-23 08:35:30 -0800 (Wed, 23 Jan 2008)

Log Message:
-----------
Use NSLocale to decide whether to use metric units, as the pref is private and 
may not be set.

Modified Paths:
--------------
    trunk/SKInfoWindowController.m

Modified: trunk/SKInfoWindowController.m
===================================================================
--- trunk/SKInfoWindowController.m      2008-01-22 23:18:02 UTC (rev 3376)
+++ trunk/SKInfoWindowController.m      2008-01-23 16:35:30 UTC (rev 3377)
@@ -177,7 +177,7 @@
 
 static inline 
 NSString *SKSizeString(NSSize size, NSSize altSize) {
-    BOOL useMetric = [[NSUserDefaults standardUserDefaults] 
boolForKey:@"AppleMetricUnits"];
+    BOOL useMetric = [[NSLocale currentLocale] 
objectForKey:NSLocaleUsesMetricSystem];
     NSString *units = useMetric ? @"cm" : @"in";
     float factor = useMetric ? 0.035277778 : 0.013888889;
     return [NSString stringWithFormat:@"%.1f x %.1f %@  (%.1f x %.1f %@)", 
size.width * factor, size.height * factor, units, altSize.width * factor, 
altSize.height * factor, units];


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to