Actually use the background color preference

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38421 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2015-03-22 18:26:50 +00:00
parent e287500b99
commit 2bb51c8462
2 changed files with 21 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2015-03-22 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditor.m
Actually use the background color preference.
2015-03-22 Riccardo Mottola <rm@gnu.org>
* Headers/Protocols/Preferences.h

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2002-2010 Free Software Foundation
Copyright (C) 2002-2015 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -27,6 +27,8 @@
#import "PCEditor.h"
#import "PCEditorView.h"
#import "Modules/Preferences/EditorFSC/PCEditorFSCPrefs.h"
@implementation PCEditor (UInterface)
- (void)_createWindow
@ -260,6 +262,7 @@
NSAttributedString *attributedString = [NSAttributedString alloc];
NSMutableDictionary *attributes = [NSMutableDictionary new];
NSFont *font;
id <PCPreferences> prefs;
// Inform about future file opening
[[NSNotificationCenter defaultCenter]
@ -269,12 +272,23 @@
_editorManager = editorManager;
_path = [filePath copy];
_isEditable = editable;
prefs = [[_editorManager projectManager] prefController];
// Prepare
font = [NSFont userFixedPitchFontOfSize:0.0];
if (editable)
{
textBackground = backgroundColor;
NSColor *col;
NSString *str;
str = [prefs stringForKey:EditorBackgroundColor];
if (str)
{
col = [prefs colorFromString:str];
}
else
col = backgroundColor;
textBackground = col;
}
else
{