Updates to fix minor issues with outline view and translation.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21305 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-06-13 03:14:57 +00:00
parent 3d9eb1203b
commit 56110eebb2
4 changed files with 29 additions and 10 deletions

View file

@ -1,3 +1,13 @@
2005-06-12 23:07 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormClassEditor.m: Modified the data source method
outlineView:setObjectValue:forItem: to reject outlet/action changes
when the item and the objectValue are the same.
* GormCore/GormDocument.m: Changed collectAllObjects to
_collectAllObjects, since it is private.
* GormCore/GormOutlineView.m: In mouseDown: only send to the super
class under certain conditions.
2005-06-11 14:10 Gregory John Casamento <greg_casamento@yahoo.com>
* English.lproj/Gorm.gorm: Addition of "Translation" submenu as well

View file

@ -886,7 +886,8 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
if ([item isKindOfClass: [GormOutletActionHolder class]])
{
if (![anObject isEqualToString: @""])
if (![anObject isEqualToString: @""] &&
![anObject isEqualToString: [item getName]])
{
NSString *name = [item getName];
@ -958,7 +959,8 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
}
else
{
if ( ( ![anObject isEqualToString: @""] ) && ( ! [anObject isEqualToString:item] ) )
if((![anObject isEqualToString: @""]) &&
(![anObject isEqualToString:item]))
{
BOOL rename;

View file

@ -3811,11 +3811,9 @@ static NSImage *fileImage = nil;
// language translation methods.
/**
* This method is used to translate all of the strings in the file from one language
* into another. This is helpful when attempting to translate an application for use
* in different locales.
* This method collects all of the objects in the document.
*/
- (NSArray *) collectAllObjects
- (NSArray *) _collectAllObjects
{
NSMutableArray *allObjects = [NSMutableArray arrayWithArray: [topLevelObjects allObjects]];
NSEnumerator *en = [topLevelObjects objectEnumerator];
@ -3866,6 +3864,11 @@ static NSImage *fileImage = nil;
return allObjects;
}
/**
* This method is used to translate all of the strings in the file from one language
* into another. This is helpful when attempting to translate an application for use
* in different locales.
*/
- (void) translate
{
NSArray *fileTypes = [NSArray arrayWithObjects: @"strings", nil];
@ -3880,7 +3883,7 @@ static NSImage *fileImage = nil;
types: fileTypes];
if (result == NSOKButton)
{
NSMutableArray *allObjects = [self collectAllObjects];
NSMutableArray *allObjects = [self _collectAllObjects];
NSString *filename = [oPanel filename];
NSDictionary *dictionary = [[NSString stringWithContentsOfFile: filename] propertyListFromStringsFileFormat];
NSEnumerator *en = [allObjects objectEnumerator];
@ -3928,6 +3931,7 @@ static NSImage *fileImage = nil;
else if([obj isKindOfClass: [NSWindow class]])
{
[obj setViewsNeedDisplay: YES];
[obj orderFront: self];
}
[self touch];
@ -3952,7 +3956,7 @@ static NSImage *fileImage = nil;
file: nil];
if (result == NSOKButton)
{
NSMutableArray *allObjects = [self collectAllObjects];
NSMutableArray *allObjects = [self _collectAllObjects];
NSString *filename = [sp filename];
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
NSEnumerator *en = [allObjects objectEnumerator];

View file

@ -537,6 +537,7 @@ static NSColor *darkGreyBlueColor = nil;
[self _openOutlets: _clickedItem];
}
}
[super mouseDown: theEvent];
}
else if (_isEditing && !isActionOrOutlet)
{
@ -563,8 +564,10 @@ static NSColor *darkGreyBlueColor = nil;
}
}
}
[super mouseDown: theEvent];
else
{
[super mouseDown: theEvent];
}
}
// additional methods for subclass