mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Usability change.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21473 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0e4671f628
commit
5c90039127
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-07-14 12:39 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormDocument.m: Minor change to changeView: to
|
||||
switch to the appropriate toolbar item when the view changes
|
||||
automatically while dragging. Also a change to awakeFromNib
|
||||
to select the correct item on startup.
|
||||
|
||||
2005-07-14 09:03 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormDocument.m: Implement toolbarSelectableItemIdentifiers
|
||||
|
|
|
@ -431,6 +431,7 @@ static NSImage *fileImage = nil;
|
|||
[window setToolbar: toolbar];
|
||||
RELEASE(toolbar);
|
||||
[toolbar setUsesStandardBackgroundColor: YES];
|
||||
[toolbar setSelectedItemIdentifier: @"ObjectsItem"]; // set initial selection.
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -824,24 +825,29 @@ static NSImage *fileImage = nil;
|
|||
- (void) changeToTopLevelEditorAcceptingTypes: (NSArray *)types
|
||||
andFileType: (NSString *)fileType
|
||||
{
|
||||
// NSToolbar *toolbar = [window toolbar];
|
||||
if([objectsView acceptsTypeFromArray: types] &&
|
||||
fileType == nil)
|
||||
{
|
||||
[toolbar setSelectedItemIdentifier: @"ObjectsItem"];
|
||||
[self changeToViewWithTag: 0];
|
||||
}
|
||||
else if([imagesView acceptsTypeFromArray: types] &&
|
||||
[[imagesView fileTypes] containsObject: fileType])
|
||||
{
|
||||
[toolbar setSelectedItemIdentifier: @"ImagesItem"];
|
||||
[self changeToViewWithTag: 1];
|
||||
}
|
||||
else if([soundsView acceptsTypeFromArray: types] &&
|
||||
[[soundsView fileTypes] containsObject: fileType])
|
||||
{
|
||||
[toolbar setSelectedItemIdentifier: @"SoundsItem"];
|
||||
[self changeToViewWithTag: 2];
|
||||
}
|
||||
else if([classesView acceptsTypeFromArray: types] &&
|
||||
[[classesView fileTypes] containsObject: fileType])
|
||||
{
|
||||
[toolbar setSelectedItemIdentifier: @"ClassesItem"];
|
||||
[self changeToViewWithTag: 3];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue