mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-15 16:11:25 +00:00
keep an Undo manager for the Editor and return that to the window
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@30527 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
00ca943852
commit
7928e2b4e5
3 changed files with 22 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-06-01 Riccardo Mottola <rmottola@users.sf.net>
|
||||
|
||||
* Modules\Editors\ProjectCenter\PCEditor.m,
|
||||
* Modules\Editors\ProjectCenter\PCEditor.m:
|
||||
keep an undoManager for the Editor and return that to the window
|
||||
|
||||
2010-05-30 03:42-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Modules/Projects/Application/Resources/main.m: Same as below.
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2002-2004 Free Software Foundation
|
||||
Copyright (C) 2002-2010 Free Software Foundation
|
||||
|
||||
Authors: Philippe C.D. Robert
|
||||
Serg Stoyan
|
||||
Riccardo Mottola
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
|
@ -95,6 +96,9 @@
|
|||
// further changes to the text view and infinite recursive invocations
|
||||
// of this method.
|
||||
BOOL editorTextViewIsPressingKey;
|
||||
|
||||
// keep one undo manager for the editor
|
||||
NSUndoManager *undoManager;
|
||||
}
|
||||
|
||||
- (BOOL)editorShouldClose;
|
||||
|
|
|
@ -199,6 +199,8 @@
|
|||
isCharacterHighlit = NO;
|
||||
highlited_chars[0] = -1;
|
||||
highlited_chars[1] = -1;
|
||||
|
||||
undoManager = [[NSUndoManager alloc] init];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -229,6 +231,8 @@
|
|||
RELEASE(backgroundColor);
|
||||
RELEASE(readOnlyColor);
|
||||
|
||||
RELEASE(undoManager);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -795,6 +799,13 @@
|
|||
[self resignFirstResponder:_extEditorView];
|
||||
}
|
||||
|
||||
|
||||
- (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)window
|
||||
{
|
||||
return undoManager;
|
||||
}
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
// ==== TextView (_intEditorView, _extEditorView) delegate
|
||||
// ===========================================================================
|
||||
|
@ -806,13 +817,6 @@
|
|||
if ([object isKindOfClass:[PCEditorView class]]
|
||||
&& (object == _intEditorView || object == _extEditorView))
|
||||
{
|
||||
/*
|
||||
if (![self hasUndoManager])
|
||||
{
|
||||
[self updateChangeCount: NSChangeDone];
|
||||
}
|
||||
*/
|
||||
|
||||
if (_isEdited == NO)
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
|
|
Loading…
Reference in a new issue