mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-14 06:31:31 +00:00
* GNUmakefile,
* Framework/GNUmakefile: Change versions to 0.5.3. * Modules/Preferences/Build/PCBuildPrefs.m: Cleanup. * Modules/Preferences/EditorFSC/PCEditorFSCPrefs.m: Implement editor color preferences. * Modules/Preferences/Saving/PCSavingPrefs.m: Cleanup. * Modules/Preferences/Misc/PCMiscPrefs.m: Cleanup. * Documentation/TODO: Update. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28079 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7756df5dbf
commit
f8d2b38fe4
11 changed files with 106 additions and 23 deletions
|
@ -50,7 +50,7 @@ ProjectCenter 0.6
|
|||
- More options for file creation [done!]
|
||||
- Review all situations when dialogs must be popped up [done!]
|
||||
- Check all textfields if 'scrollable' attribute set [done!]
|
||||
- Rewrite Preferences (3rd party sections etc.) stoyan
|
||||
- Rewrite Preferences (3rd party sections etc.) [done!]
|
||||
--- Project Builder --------------------------------------------
|
||||
- Finish parsing gcc output (make errors, etc.) stoyan
|
||||
- Implement interaction with Editor (errors, warnings) stoyan
|
||||
|
@ -60,6 +60,7 @@ ProjectCenter 0.6
|
|||
- Implement interaction with Builder (errors, warnings) stoyan
|
||||
- Implement indentation stoyan
|
||||
- implement undo inside editor stoyan
|
||||
- Add and use basic editor preferences (fonts, colors, sizes) [25% done]
|
||||
- Think about imlementing pending adding/removal of files ???
|
||||
- Split "Application" to "Application GORM" and
|
||||
"Application Renaissance" project types ???
|
||||
|
|
|
@ -7,9 +7,9 @@ include $(GNUSTEP_MAKEFILES)/common.make
|
|||
#
|
||||
# Framework
|
||||
#
|
||||
VERSION = 0.5.0
|
||||
VERSION = 0.5.3
|
||||
FRAMEWORK_NAME = ProjectCenter
|
||||
ProjectCenter_CURRENT_VERSION_NAME = 0.5.0
|
||||
ProjectCenter_CURRENT_VERSION_NAME = 0.5.3
|
||||
ProjectCenter_DEPLOY_WITH_CURRENT_VERSION = yes
|
||||
ProjectCenter_HEADER_FILES_DIR = ../Headers/ProjectCenter
|
||||
|
||||
|
|
|
@ -214,9 +214,6 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
{
|
||||
NSTimeInterval interval;
|
||||
|
||||
/* interval = [[[PCPrefController sharedPCPreferences]
|
||||
objectForKey:AutoSavePeriod] intValue];*/
|
||||
|
||||
interval = [[prefController stringForKey:AutoSavePeriod] intValue];
|
||||
|
||||
if (interval > 0 && saveTimer == nil)
|
||||
|
|
|
@ -16,7 +16,7 @@ include $(GNUSTEP_MAKEFILES)/common.make
|
|||
#
|
||||
# Main application
|
||||
#
|
||||
VERSION = 0.5.1
|
||||
VERSION = 0.5.3
|
||||
APP_NAME = ProjectCenter
|
||||
ProjectCenter_APPLICATION_ICON = Images/ProjectCenter.tiff
|
||||
|
||||
|
|
|
@ -54,15 +54,11 @@
|
|||
forKey:(NSString *)aKey
|
||||
notify:(BOOL)notify;
|
||||
|
||||
//- (id)objectForKey:(NSString *)key;
|
||||
//- (void)setObject:(id)anObject forKey:(NSString *)aKey notify:(BOOL)notify;
|
||||
|
||||
@end
|
||||
|
||||
@protocol PCPrefsSection <NSObject>
|
||||
|
||||
- (id)initWithPrefController:(id <PCPreferences>)aPrefs;
|
||||
//- (void)setDefaults;
|
||||
- (void)readPreferences;
|
||||
- (NSView *)view;
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCFileManager.h>
|
||||
|
||||
#import "PCBuildPrefs.h"
|
||||
|
|
|
@ -59,6 +59,9 @@
|
|||
|
||||
NSFont *currentPlainFont;
|
||||
NSFont *currentRichFont;
|
||||
NSColor *currentBackgroundColor;
|
||||
NSColor *currentForegroundColor;
|
||||
NSColor *currentSelectionColor;
|
||||
}
|
||||
|
||||
- (void)setEditorPlainTextFont:(id)sender;
|
||||
|
|
|
@ -23,8 +23,7 @@
|
|||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCFileManager.h>
|
||||
#import <AppKit/NSColorSpace.h>
|
||||
|
||||
#import "PCEditorFSCPrefs.h"
|
||||
|
||||
|
@ -147,6 +146,33 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (NSColor *)colorFromString:(NSString *)colorString
|
||||
{
|
||||
NSArray *colorComponents;
|
||||
NSString *colorSpaceName;
|
||||
NSColor *color;
|
||||
|
||||
colorComponents = [colorString componentsSeparatedByString:@" "];
|
||||
colorSpaceName = [colorComponents objectAtIndex:0];
|
||||
|
||||
if ([colorSpaceName isEqualToString:@"White"]) // Treat as WhiteColorSpace
|
||||
{
|
||||
color = [NSColor
|
||||
colorWithCalibratedWhite:[[colorComponents objectAtIndex:1] floatValue]
|
||||
alpha:1.0];
|
||||
}
|
||||
else if ([colorSpaceName isEqualToString:@"RGB"]) // Treat as RGBColorSpace
|
||||
{
|
||||
color = [NSColor
|
||||
colorWithCalibratedRed:[[colorComponents objectAtIndex:1] floatValue]
|
||||
green:[[colorComponents objectAtIndex:2] floatValue]
|
||||
blue:[[colorComponents objectAtIndex:3] floatValue]
|
||||
alpha:1.0];
|
||||
}
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// --- Protocol
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -183,6 +209,19 @@
|
|||
[editorLinesField setStringValue:val];
|
||||
val = [prefs stringForKey:EditorColumns defaultValue:@"80"];
|
||||
[editorColumnsField setStringValue:val];
|
||||
|
||||
// Colors
|
||||
val = [prefs stringForKey:EditorForegroundColor defaultValue:@"White 0.0"];
|
||||
currentForegroundColor = [self colorFromString:val];
|
||||
[foregroundColorWell setColor:currentForegroundColor];
|
||||
|
||||
val = [prefs stringForKey:EditorBackgroundColor defaultValue:@"White 1.0"];
|
||||
currentBackgroundColor = [self colorFromString:val];
|
||||
[backgroundColorWell setColor:currentBackgroundColor];
|
||||
|
||||
val = [prefs stringForKey:EditorSelectionColor defaultValue:@"White 0.66"];
|
||||
currentSelectionColor = [self colorFromString:val];
|
||||
[selectionColorWell setColor:currentSelectionColor];
|
||||
}
|
||||
|
||||
- (NSView *)view
|
||||
|
@ -227,6 +266,63 @@
|
|||
|
||||
- (void)setEditorColor:(id)sender
|
||||
{
|
||||
NSColor *color;
|
||||
NSColor *currentColor;
|
||||
NSString *colorString;
|
||||
NSString *key;
|
||||
NSString *colorSpaceName;
|
||||
|
||||
if (sender == foregroundColorWell)
|
||||
{
|
||||
NSLog(@"foregroundColorWell");
|
||||
color = [foregroundColorWell color];
|
||||
currentColor = currentForegroundColor;
|
||||
key = EditorForegroundColor;
|
||||
}
|
||||
else if (sender == backgroundColorWell)
|
||||
{
|
||||
NSLog(@"backgroundColorWell");
|
||||
color = [backgroundColorWell color];
|
||||
currentColor = currentBackgroundColor;
|
||||
key = EditorBackgroundColor;
|
||||
}
|
||||
else if (sender == selectionColorWell)
|
||||
{
|
||||
NSLog(@"selectionColorWell");
|
||||
color = [selectionColorWell color];
|
||||
currentColor = currentSelectionColor;
|
||||
key = EditorSelectionColor;
|
||||
}
|
||||
|
||||
colorSpaceName = [color colorSpaceName];
|
||||
NSLog(@"Color's colorspace name: '%@'", colorSpaceName);
|
||||
if ([colorSpaceName isEqualToString:@"NSCalibratedRGBColorSpace"])
|
||||
{
|
||||
/* [sender setColor:currentColor];
|
||||
NSRunAlertPanel(@"Set Color",
|
||||
@"Please, use RGB color.\n"
|
||||
@"Color in color well left unchanged",
|
||||
@"Close", nil, nil);*/
|
||||
colorString = [NSString stringWithFormat:@"RGB %0.1f %0.1f %0.1f",
|
||||
[color redComponent],
|
||||
[color greenComponent],
|
||||
[color blueComponent]];
|
||||
}
|
||||
else if ([colorSpaceName isEqualToString:@"NSCalibratedWhiteColorSpace"])
|
||||
{
|
||||
colorString = [NSString stringWithFormat:@"White %0.1f",
|
||||
[color whiteComponent]];
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
currentColor = color;
|
||||
|
||||
NSLog(@"Selected color: '%@'", colorString);
|
||||
|
||||
[prefs setString:colorString forKey:key notify:YES];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCFileManager.h>
|
||||
|
||||
#import "PCMiscPrefs.h"
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCFileManager.h>
|
||||
|
||||
#import "PCSavingPrefs.h"
|
||||
|
||||
@implementation PCSavingPrefs
|
||||
|
@ -135,8 +132,6 @@
|
|||
periodString = [autosaveField stringValue];
|
||||
[prefs setString:periodString forKey:AutoSavePeriod notify:YES];
|
||||
|
||||
// TODO: Check if this can be replaced with generic notification
|
||||
// posted by PCPrefsController
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:PCSavePeriodDidChangeNotification
|
||||
object:periodString];
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
#import "PCPrefController.h"
|
||||
#import <Protocols/Preferences.h>
|
||||
|
||||
// TODO: rewrite it as PCPreferences, use +sharedPreferences instead of
|
||||
// [NSUserDefaults standardUserDefaults] in every part of ProjectCenter
|
||||
|
||||
@implementation PCPrefController
|
||||
|
||||
// ===========================================================================
|
||||
|
|
Loading…
Reference in a new issue