Skip to content

Commit

Permalink
Cleanup the generic object inspector, fix issues in GormDocument, add…
Browse files Browse the repository at this point in the history
… outlets to IBInspector
  • Loading branch information
gcasa committed Jan 1, 2025
1 parent 42bab95 commit f6d8c39
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
Binary file modified GormCore/English.lproj/GormObjectInspector.gorm/data.info
Binary file not shown.
Binary file modified GormCore/English.lproj/GormObjectInspector.gorm/objects.gorm
Binary file not shown.
4 changes: 3 additions & 1 deletion GormCore/GormDocument.m
Original file line number Diff line number Diff line change
Expand Up @@ -4069,7 +4069,9 @@ - (id) outlineView: (NSOutlineView *)ov
if ([item respondsToSelector: @selector(title)])
{
title = [item title];
value = [NSString stringWithFormat: @"%@ : %@", title, (name != nil)?name:@"*Unnamed*"];
value = [NSString stringWithFormat: @"%@ : %@",
(title != nil && ![title isEqualToString: @""]) ? title : @"*Untitled*",
(name != nil) ? name : @"*Unnamed*"];
}
else
{
Expand Down
8 changes: 1 addition & 7 deletions GormCore/GormObjectInspector.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,7 @@ - (id) init
sets = [[NSMutableArray alloc] init];
gets = [[NSMutableDictionary alloc] init];
types = [[NSMutableDictionary alloc] init];

okButton = [[NSButton alloc] initWithFrame: NSMakeRect(0,0,90,20)];
[okButton setAutoresizingMask: NSViewMaxYMargin | NSViewMinXMargin];
[okButton setAction: @selector(ok:)];
[okButton setTarget: self];
[okButton setTitle: _(@"OK")];

[okButton setEnabled: NO];

revertButton = nil;
Expand Down Expand Up @@ -96,7 +91,6 @@ - (void) dealloc
RELEASE(gets);
RELEASE(sets);
RELEASE(types);
RELEASE(okButton);
[super dealloc];
}

Expand Down
2 changes: 1 addition & 1 deletion GormCore/Resources/ClassInformation.plist
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
};
IBInspector = {
Actions = ("ok:", "revert:", "touch:");
Outlets = (window);
Outlets = (window, okButton, revertButton);
Super = NSObject;
};
IBPalette = {Actions = (); Outlets = (originalWindow); Super = NSObject; };
Expand Down

0 comments on commit f6d8c39

Please sign in to comment.