From 03d439d49c9abad29654f61a3134ee45421d0f2f Mon Sep 17 00:00:00 2001 From: Riccardo Mottola Date: Tue, 7 Apr 2015 21:16:28 +0000 Subject: [PATCH] Use constants and not strings as keys. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38450 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Modules/Editors/ProjectCenter/PCEditorView.m | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a586510..8cf3a4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-04-07 Riccardo Mottola + + * Modules/Editors/ProjectCenter/PCEditorView.m + Use constants and not strings as keys. + 2015-03-22 Riccardo Mottola * Modules/Preferences/EditorFSC/PCEditorFSCPrefs.m diff --git a/Modules/Editors/ProjectCenter/PCEditorView.m b/Modules/Editors/ProjectCenter/PCEditorView.m index 5721eaa..223419c 100644 --- a/Modules/Editors/ProjectCenter/PCEditorView.m +++ b/Modules/Editors/ProjectCenter/PCEditorView.m @@ -43,6 +43,7 @@ #import "PCEditor.h" #import "SyntaxHighlighter.h" #import "LineJumper.h" +#import "Modules/Preferences/EditorFSC/PCEditorFSCPrefs.h" static inline float my_abs(float aValue) { @@ -379,10 +380,10 @@ static int ComputeIndentingOffset(NSString * string, unsigned int start) float fontSize; NSFont *font = nil; - fontName = [df objectForKey:@"EditorTextFont"]; - fontSize = [df floatForKey:@"EditorTextFontSize"]; + fontName = [df objectForKey:EditorTextFont]; + fontSize = [df floatForKey:EditorTextFontSize]; - if (fontName != nil) + if (fontName != nil && fontSize > 0) { font = [NSFont fontWithName:fontName size:fontSize]; }