mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-19 00:51:51 +00:00
*** empty log message ***
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@16840 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1ff9f6f15b
commit
ed6a04b56c
7 changed files with 38 additions and 20 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2003-05-30 Serg Stoyan <stoyan@hologr.com>
|
||||
|
||||
* PCLib/PCEditor.[hm]: Added becomeFirstResponder.
|
||||
* PCLib/PCEditorController.[hm]: Rename setBrowser: to
|
||||
setBrowserPath:category:.
|
||||
* PCLib/PCEditorController.m:
|
||||
(activeEditor): Don't count on [project isEditorActive].
|
||||
* PCLib/PCEditorView.m:
|
||||
(becomeFirstResponder): Call editor's becomeFirstResponder.
|
||||
|
||||
2003-05-29 Serg Stoyan <stoyan@hologr.com>
|
||||
|
||||
* PCMenuController.m:
|
||||
|
|
|
@ -41,17 +41,19 @@
|
|||
- (void)click:(id)sender
|
||||
{
|
||||
if ([[sender selectedCell] isLeaf] && [[self selectedFiles] count] == 1)
|
||||
{
|
||||
NSString *ltitle = [[sender selectedCell] stringValue];
|
||||
NSString *category = [[sender selectedCellInColumn:0] stringValue];
|
||||
|
||||
if ([self isEditableCategory:category file: ltitle])
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"FileBecomesEditedNotification" object:ltitle];
|
||||
|
||||
[project browserDidClickFile:ltitle category:category];
|
||||
NSString *ltitle = [[sender selectedCell] stringValue];
|
||||
NSString *category = [[sender selectedCellInColumn:0] stringValue];
|
||||
|
||||
if ([self isEditableCategory:category file: ltitle])
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:@"FileBecomesEditedNotification"
|
||||
object:ltitle];
|
||||
|
||||
[project browserDidClickFile:ltitle category:category];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)doubleClick:(id)sender
|
||||
|
|
|
@ -62,12 +62,14 @@
|
|||
- (void)windowDidResignKey:(NSNotification *)aNotification;
|
||||
|
||||
- (void)textDidChange:(NSNotification *)aNotification;
|
||||
- (BOOL)becomeFirstResponder;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSObject (PCEditorDelegate)
|
||||
|
||||
- (void)editorDidClose:(id)sender;
|
||||
- (void)setBrowserPath:(NSString *)file category:(NSString *)category;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -323,5 +323,16 @@ NSString *PCEditorDidResignKeyNotification=@"PCEditorDidResignKeyNotification";
|
|||
[self setIsEdited:YES];
|
||||
}
|
||||
|
||||
- (BOOL)becomeFirstResponder
|
||||
{
|
||||
if (_delegate
|
||||
&& [_delegate respondsToSelector:@selector(setBrowserPath:category:)])
|
||||
{
|
||||
[_delegate setBrowserPath:[_path lastPathComponent] category:_category];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -65,8 +65,7 @@
|
|||
// ===========================================================================
|
||||
|
||||
- (void)editorDidClose:(id)sender;
|
||||
|
||||
- (void)setBrowserPath:(NSString *)file;
|
||||
- (void)setBrowserPath:(NSString *)file category:(NSString *)category;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -153,7 +153,6 @@
|
|||
|
||||
if (([window isVisible] && [window isKeyWindow])
|
||||
|| ([[editor internalView] superview]
|
||||
&& [project isEditorActive]
|
||||
&& [[project projectWindow] isKeyWindow]))
|
||||
{
|
||||
return editor;
|
||||
|
@ -297,10 +296,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)setBrowserPath:(NSString *)file
|
||||
- (void)setBrowserPath:(NSString *)file category:(NSString *)category
|
||||
{
|
||||
[[project browserController] setPathForFile:file
|
||||
category:[[self activeEditor] category]];
|
||||
[[project browserController] setPathForFile:file category:category];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -36,11 +36,7 @@ static int _tabFlags = PCTab4Sp;
|
|||
|
||||
- (BOOL) becomeFirstResponder
|
||||
{
|
||||
NSString *file = [[editor path] lastPathComponent];
|
||||
|
||||
[(PCEditorController *)[self delegate] setBrowserPath:file];
|
||||
|
||||
return YES;
|
||||
return [editor becomeFirstResponder];
|
||||
}
|
||||
|
||||
+ (void)setTabBehaviour:(int)tabFlags
|
||||
|
|
Loading…
Reference in a new issue