Revision: 17922
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=17922&view=rev
Author: hofman
Date: 2011-06-02 17:51:46 +0000 (Thu, 02 Jun 2011)
Log Message:
-----------
use double instead of float in preferences
Modified Paths:
--------------
trunk/bibdesk/BDSKEditor.m
trunk/bibdesk/BDSKEditorTextView.m
trunk/bibdesk/BDSKOutlineView.m
trunk/bibdesk/BDSKPreviewer.m
trunk/bibdesk/BDSKTableView.m
trunk/bibdesk/BDSKTeXTask.m
trunk/bibdesk/BibDocument.m
trunk/bibdesk/BibDocument_Actions.m
trunk/bibdesk/BibDocument_UI.m
trunk/bibdesk/BibPref_Display.m
Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m 2011-06-02 11:45:55 UTC (rev 17921)
+++ trunk/bibdesk/BDSKEditor.m 2011-06-02 17:51:46 UTC (rev 17922)
@@ -268,7 +268,7 @@
[[fileView enclosingScrollView] setBackgroundColor:[fileView
backgroundColor]];
[fileView setDisplayMode:[[NSUserDefaults standardUserDefaults]
integerForKey:BDSKEditorFileViewDisplayModeKey]];
- [fileView setIconScale:[[NSUserDefaults standardUserDefaults]
floatForKey:BDSKEditorFileViewIconScaleKey]];
+ [fileView setIconScale:[[NSUserDefaults standardUserDefaults]
doubleForKey:BDSKEditorFileViewIconScaleKey]];
[fileView addObserver:self forKeyPath:@"iconScale" options:0
context:&BDSKEditorObservationContext];
[fileView addObserver:self forKeyPath:@"displayMode" options:0
context:&BDSKEditorObservationContext];
[fileView setEditable:editorFlags.isEditable];
@@ -1816,7 +1816,7 @@
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
change:(NSDictionary *)change context:(void *)context {
if (context == &BDSKEditorObservationContext) {
[[NSUserDefaults standardUserDefaults] setInteger:[fileView
displayMode] forKey:BDSKEditorFileViewDisplayModeKey];
- [[NSUserDefaults standardUserDefaults] setFloat:[fileView iconScale]
forKey:BDSKEditorFileViewIconScaleKey];
+ [[NSUserDefaults standardUserDefaults] setDouble:[fileView iconScale]
forKey:BDSKEditorFileViewIconScaleKey];
} else {
[super observeValueForKeyPath:keyPath ofObject:object change:change
context:context];
}
Modified: trunk/bibdesk/BDSKEditorTextView.m
===================================================================
--- trunk/bibdesk/BDSKEditorTextView.m 2011-06-02 11:45:55 UTC (rev 17921)
+++ trunk/bibdesk/BDSKEditorTextView.m 2011-06-02 17:51:46 UTC (rev 17922)
@@ -95,7 +95,7 @@
NSFont *font = [[NSFontManager sharedFontManager] convertFont:[self font]];
// save it to prefs for next time
- [[NSUserDefaults standardUserDefaults] setFloat:[font pointSize]
forKey:BDSKEditorFontSizeKey];
+ [[NSUserDefaults standardUserDefaults] setDouble:[font pointSize]
forKey:BDSKEditorFontSizeKey];
[[NSUserDefaults standardUserDefaults] setObject:[font fontName]
forKey:BDSKEditorFontNameKey];
}
@@ -121,7 +121,7 @@
- (void)updateFontFromPreferences;
{
NSString *fontName = [[NSUserDefaults standardUserDefaults]
objectForKey:BDSKEditorFontNameKey];
- CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
floatForKey:BDSKEditorFontSizeKey];
+ CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
doubleForKey:BDSKEditorFontSizeKey];
NSFont *font = nil;
if(fontName != nil)
Modified: trunk/bibdesk/BDSKOutlineView.m
===================================================================
--- trunk/bibdesk/BDSKOutlineView.m 2011-06-02 11:45:55 UTC (rev 17921)
+++ trunk/bibdesk/BDSKOutlineView.m 2011-06-02 17:51:46 UTC (rev 17922)
@@ -159,7 +159,7 @@
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
NSString *fontName = [sud objectForKey:fontNamePrefKey];
- CGFloat fontSize = [sud floatForKey:fontSizePrefKey];
+ CGFloat fontSize = [sud doubleForKey:fontSizePrefKey];
NSFont *font = nil;
if(fontName != nil)
@@ -168,14 +168,14 @@
font = [NSFont controlContentFontOfSize:[NSFont
systemFontSizeForControlSize:[self cellControlSize]]];
font = [fontManager convertFont:font];
- [sud setFloat:[font pointSize] forKey:fontSizePrefKey];
+ [sud setDouble:[font pointSize] forKey:fontSizePrefKey];
[sud setObject:[font fontName] forKey:fontNamePrefKey];
}
- (void)outlineViewFontChanged {
if (fontNamePreferenceKey && fontSizePreferenceKey) {
NSString *fontName = [[NSUserDefaults standardUserDefaults]
objectForKey:fontNamePreferenceKey];
- CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
floatForKey:fontSizePreferenceKey];
+ CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
doubleForKey:fontSizePreferenceKey];
NSFont *font = nil;
if(fontName != nil)
@@ -202,7 +202,7 @@
- (void)updateFontPanel:(NSNotification *)notification {
if ([[[self window] firstResponder] isEqual:self] && fontNamePreferenceKey
&& fontSizePreferenceKey) {
NSString *fontName = [[NSUserDefaults standardUserDefaults]
objectForKey:fontNamePreferenceKey];
- CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
floatForKey:fontSizePreferenceKey];
+ CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
doubleForKey:fontSizePreferenceKey];
[[NSFontManager sharedFontManager] setSelectedFont:[NSFont
fontWithName:fontName size:fontSize] isMultiple:NO];
}
}
Modified: trunk/bibdesk/BDSKPreviewer.m
===================================================================
--- trunk/bibdesk/BDSKPreviewer.m 2011-06-02 11:45:55 UTC (rev 17921)
+++ trunk/bibdesk/BDSKPreviewer.m 2011-06-02 17:51:46 UTC (rev 17922)
@@ -176,8 +176,8 @@
// overlay the progressIndicator over the contentView
[progressOverlay overlayView:[[self window] contentView]];
- pdfScaleFactor = [[NSUserDefaults standardUserDefaults]
floatForKey:BDSKPreviewPDFScaleFactorKey];
- rtfScaleFactor = [[NSUserDefaults standardUserDefaults]
floatForKey:BDSKPreviewRTFScaleFactorKey];
+ pdfScaleFactor = [[NSUserDefaults standardUserDefaults]
doubleForKey:BDSKPreviewPDFScaleFactorKey];
+ rtfScaleFactor = [[NSUserDefaults standardUserDefaults]
doubleForKey:BDSKPreviewRTFScaleFactorKey];
// register to observe when the preview needs to be updated (handle
this here rather than on a per document basis as the preview is currently
global for the application)
[[NSNotificationCenter defaultCenter] addObserver:self
@@ -535,11 +535,11 @@
// save the scalefactors of the views
CGFloat scaleFactor = ([pdfView autoScales] ? 0.0 : [pdfView scaleFactor]);
- if (fabs(scaleFactor - [[NSUserDefaults standardUserDefaults]
floatForKey:BDSKPreviewPDFScaleFactorKey]) > 0.01)
- [[NSUserDefaults standardUserDefaults] setFloat:scaleFactor
forKey:BDSKPreviewPDFScaleFactorKey];
+ if (fabs(scaleFactor - [[NSUserDefaults standardUserDefaults]
doubleForKey:BDSKPreviewPDFScaleFactorKey]) > 0.01)
+ [[NSUserDefaults standardUserDefaults] setDouble:scaleFactor
forKey:BDSKPreviewPDFScaleFactorKey];
scaleFactor = [(BDSKZoomableTextView *)rtfPreviewView scaleFactor];
- if (fabs(scaleFactor - [[NSUserDefaults standardUserDefaults]
floatForKey:BDSKPreviewRTFScaleFactorKey]) > 0.01)
- [[NSUserDefaults standardUserDefaults] setFloat:scaleFactor
forKey:BDSKPreviewRTFScaleFactorKey];
+ if (fabs(scaleFactor - [[NSUserDefaults standardUserDefaults]
doubleForKey:BDSKPreviewRTFScaleFactorKey]) > 0.01)
+ [[NSUserDefaults standardUserDefaults] setDouble:scaleFactor
forKey:BDSKPreviewRTFScaleFactorKey];
// make sure we don't process anything else; the TeX task will take care
of its own cleanup
[server stopDOServer];
Modified: trunk/bibdesk/BDSKTableView.m
===================================================================
--- trunk/bibdesk/BDSKTableView.m 2011-06-02 11:45:55 UTC (rev 17921)
+++ trunk/bibdesk/BDSKTableView.m 2011-06-02 17:51:46 UTC (rev 17922)
@@ -146,7 +146,7 @@
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
NSString *fontName = [sud objectForKey:fontNamePrefKey];
- CGFloat fontSize = [sud floatForKey:fontSizePrefKey];
+ CGFloat fontSize = [sud doubleForKey:fontSizePrefKey];
NSFont *font = nil;
if(fontName != nil)
@@ -155,14 +155,14 @@
font = [NSFont controlContentFontOfSize:[NSFont
systemFontSizeForControlSize:[self cellControlSize]]];
font = [fontManager convertFont:font];
- [sud setFloat:[font pointSize] forKey:fontSizePrefKey];
+ [sud setDouble:[font pointSize] forKey:fontSizePrefKey];
[sud setObject:[font fontName] forKey:fontNamePrefKey];
}
- (void)tableViewFontChanged {
if (fontNamePreferenceKey && fontSizePreferenceKey) {
NSString *fontName = [[NSUserDefaults standardUserDefaults]
objectForKey:fontNamePreferenceKey];
- CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
floatForKey:fontSizePreferenceKey];
+ CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
doubleForKey:fontSizePreferenceKey];
NSFont *font = nil;
if(fontName != nil)
@@ -189,7 +189,7 @@
- (void)updateFontPanel:(NSNotification *)notification {
if ([[[self window] firstResponder] isEqual:self] && fontNamePreferenceKey
&& fontSizePreferenceKey) {
NSString *fontName = [[NSUserDefaults standardUserDefaults]
objectForKey:fontNamePreferenceKey];
- CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
floatForKey:fontSizePreferenceKey];
+ CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
doubleForKey:fontSizePreferenceKey];
[[NSFontManager sharedFontManager] setSelectedFont:[NSFont
fontWithName:fontName size:fontSize] isMultiple:NO];
}
}
Modified: trunk/bibdesk/BDSKTeXTask.m
===================================================================
--- trunk/bibdesk/BDSKTeXTask.m 2011-06-02 11:45:55 UTC (rev 17921)
+++ trunk/bibdesk/BDSKTeXTask.m 2011-06-02 17:51:46 UTC (rev 17922)
@@ -125,8 +125,8 @@
BDSKINITIALIZE;
// returns 0 if the key doesn't exist
- if ([[NSUserDefaults standardUserDefaults]
floatForKey:BDSKTeXTaskRunLoopTimeoutKey] > 1)
- runLoopTimeout = [[NSUserDefaults standardUserDefaults]
floatForKey:BDSKTeXTaskRunLoopTimeoutKey];
+ if ([[NSUserDefaults standardUserDefaults]
doubleForKey:BDSKTeXTaskRunLoopTimeoutKey] > 1)
+ runLoopTimeout = [[NSUserDefaults standardUserDefaults]
doubleForKey:BDSKTeXTaskRunLoopTimeoutKey];
upgradeTemplate();
Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2011-06-02 11:45:55 UTC (rev 17921)
+++ trunk/bibdesk/BibDocument.m 2011-06-02 17:51:46 UTC (rev 17922)
@@ -521,8 +521,8 @@
[bottomFileView setBackgroundColor:[[NSColor
controlAlternatingRowBackgroundColors] lastObject]];
[[bottomFileView enclosingScrollView] setBackgroundColor:[bottomFileView
backgroundColor]];
- CGFloat iconScale = [xattrDefaults
doubleForKey:BDSKSideFileViewIconScaleKey defaultValue:[sud
floatForKey:BDSKSideFileViewIconScaleKey]];
- FVDisplayMode displayMode = [xattrDefaults
doubleForKey:BDSKSideFileViewDisplayModeKey defaultValue:[sud
floatForKey:BDSKSideFileViewDisplayModeKey]];
+ CGFloat iconScale = [xattrDefaults
doubleForKey:BDSKSideFileViewIconScaleKey defaultValue:[sud
doubleForKey:BDSKSideFileViewIconScaleKey]];
+ FVDisplayMode displayMode = [xattrDefaults
doubleForKey:BDSKSideFileViewDisplayModeKey defaultValue:[sud
doubleForKey:BDSKSideFileViewDisplayModeKey]];
[sideFileView setDisplayMode:displayMode];
if (displayMode == FVDisplayModeGrid) {
if (iconScale < 0.00001)
@@ -531,7 +531,7 @@
[sideFileView setIconScale:iconScale];
}
- iconScale = [xattrDefaults doubleForKey:BDSKBottomFileViewIconScaleKey
defaultValue:[sud floatForKey:BDSKBottomFileViewIconScaleKey]];
+ iconScale = [xattrDefaults doubleForKey:BDSKBottomFileViewIconScaleKey
defaultValue:[sud doubleForKey:BDSKBottomFileViewIconScaleKey]];
displayMode = [xattrDefaults
integerForKey:BDSKBottomFileViewDisplayModeKey defaultValue:[sud
integerForKey:BDSKBottomFileViewDisplayModeKey]];
[bottomFileView setDisplayMode:displayMode];
if (displayMode == FVDisplayModeGrid) {
Modified: trunk/bibdesk/BibDocument_Actions.m
===================================================================
--- trunk/bibdesk/BibDocument_Actions.m 2011-06-02 11:45:55 UTC (rev 17921)
+++ trunk/bibdesk/BibDocument_Actions.m 2011-06-02 17:51:46 UTC (rev 17922)
@@ -1261,7 +1261,7 @@
- (IBAction)changeMainTableFont:(id)sender{
NSString *fontName = [[NSUserDefaults standardUserDefaults]
objectForKey:BDSKMainTableViewFontNameKey];
- CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
floatForKey:BDSKMainTableViewFontSizeKey];
+ CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
doubleForKey:BDSKMainTableViewFontSizeKey];
[[NSFontManager sharedFontManager] setSelectedFont:[NSFont
fontWithName:fontName size:fontSize] isMultiple:NO];
[[NSFontManager sharedFontManager] orderFrontFontPanel:sender];
@@ -1272,7 +1272,7 @@
- (IBAction)changeGroupTableFont:(id)sender{
NSString *fontName = [[NSUserDefaults standardUserDefaults]
objectForKey:BDSKGroupTableViewFontNameKey];
- CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
floatForKey:BDSKGroupTableViewFontSizeKey];
+ CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
doubleForKey:BDSKGroupTableViewFontSizeKey];
[[NSFontManager sharedFontManager] setSelectedFont:[NSFont
fontWithName:fontName size:fontSize] isMultiple:NO];
[[NSFontManager sharedFontManager] orderFrontFontPanel:sender];
Modified: trunk/bibdesk/BibDocument_UI.m
===================================================================
--- trunk/bibdesk/BibDocument_UI.m 2011-06-02 11:45:55 UTC (rev 17921)
+++ trunk/bibdesk/BibDocument_UI.m 2011-06-02 17:51:46 UTC (rev 17922)
@@ -1262,12 +1262,12 @@
if (object == sideFileView) {
FVDisplayMode displayMode = [sideFileView displayMode];
CGFloat iconScale = displayMode == FVDisplayModeGrid ?
[sideFileView iconScale] : 0.0;
- [[NSUserDefaults standardUserDefaults] setFloat:iconScale
forKey:BDSKSideFileViewIconScaleKey];
+ [[NSUserDefaults standardUserDefaults] setDouble:iconScale
forKey:BDSKSideFileViewIconScaleKey];
[[NSUserDefaults standardUserDefaults] setInteger:displayMode
forKey:BDSKSideFileViewDisplayModeKey];
} else if (object == bottomFileView) {
FVDisplayMode displayMode = [bottomFileView displayMode];
CGFloat iconScale = displayMode == FVDisplayModeGrid ?
[bottomFileView iconScale] : 0.0;
- [[NSUserDefaults standardUserDefaults] setFloat:iconScale
forKey:BDSKBottomFileViewIconScaleKey];
+ [[NSUserDefaults standardUserDefaults] setDouble:iconScale
forKey:BDSKBottomFileViewIconScaleKey];
[[NSUserDefaults standardUserDefaults] setInteger:displayMode
forKey:BDSKBottomFileViewDisplayModeKey];
}
} else if (context == &BDSKDocumentDefaultsObservationContext) {
Modified: trunk/bibdesk/BibPref_Display.m
===================================================================
--- trunk/bibdesk/BibPref_Display.m 2011-06-02 11:45:55 UTC (rev 17921)
+++ trunk/bibdesk/BibPref_Display.m 2011-06-02 17:51:46 UTC (rev 17922)
@@ -78,13 +78,13 @@
}
- (void)updateFontDisplayUI{
- [publicationsFontWell setFontSize:[sud
floatForKey:BDSKMainTableViewFontSizeKey]];
+ [publicationsFontWell setFontSize:[sud
doubleForKey:BDSKMainTableViewFontSizeKey]];
[publicationsFontWell setFontName:[sud
stringForKey:BDSKMainTableViewFontNameKey]];
- [groupsFontWell setFontSize:[sud
floatForKey:BDSKGroupTableViewFontSizeKey]];
+ [groupsFontWell setFontSize:[sud
doubleForKey:BDSKGroupTableViewFontSizeKey]];
[groupsFontWell setFontName:[sud
stringForKey:BDSKGroupTableViewFontNameKey]];
- [personsFontWell setFontSize:[sud
floatForKey:BDSKPersonTableViewFontSizeKey]];
+ [personsFontWell setFontSize:[sud
doubleForKey:BDSKPersonTableViewFontSizeKey]];
[personsFontWell setFontName:[sud
stringForKey:BDSKPersonTableViewFontNameKey]];
- [abstractFontWell setFontSize:[sud floatForKey:BDSKEditorFontSizeKey]];
+ [abstractFontWell setFontSize:[sud doubleForKey:BDSKEditorFontSizeKey]];
[abstractFontWell setFontName:[sud stringForKey:BDSKEditorFontNameKey]];
}
@@ -139,22 +139,22 @@
}
- (IBAction)changePublicationsFont:(id)sender {
- [sud setFloat:[sender fontSize] forKey:BDSKMainTableViewFontSizeKey];
+ [sud setDouble:[sender fontSize] forKey:BDSKMainTableViewFontSizeKey];
[sud setObject:[sender fontName] forKey:BDSKMainTableViewFontNameKey];
}
- (IBAction)changeGroupsFont:(id)sender {
- [sud setFloat:[sender fontSize] forKey:BDSKGroupTableViewFontSizeKey];
+ [sud setDouble:[sender fontSize] forKey:BDSKGroupTableViewFontSizeKey];
[sud setObject:[sender fontName] forKey:BDSKGroupTableViewFontNameKey];
}
- (IBAction)changePersonsFont:(id)sender {
- [sud setFloat:[sender fontSize] forKey:BDSKPersonTableViewFontSizeKey];
+ [sud setDouble:[sender fontSize] forKey:BDSKPersonTableViewFontSizeKey];
[sud setObject:[sender fontName] forKey:BDSKPersonTableViewFontNameKey];
}
- (IBAction)changeAbstractFont:(id)sender {
- [sud setFloat:[sender fontSize] forKey:BDSKEditorFontNameKey];
+ [sud setDouble:[sender fontSize] forKey:BDSKEditorFontNameKey];
[sud setObject:[sender fontName] forKey:BDSKEditorFontNameKey];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today.
http://p.sf.net/sfu/quest-dev2dev2
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit