Cleanup the generic object inspector, fix issues in GormDocument, add outlets to IBInspector

This commit is contained in:
Gregory John Casamento 2025-01-01 16:20:59 -05:00
parent 42bab95e08
commit f6d8c3999b
5 changed files with 5 additions and 9 deletions

View file

@ -4069,7 +4069,9 @@ willBeInsertedIntoToolbar: (BOOL)flag
if ([item respondsToSelector: @selector(title)]) if ([item respondsToSelector: @selector(title)])
{ {
title = [item 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 else
{ {

View file

@ -43,11 +43,6 @@
gets = [[NSMutableDictionary alloc] init]; gets = [[NSMutableDictionary alloc] init];
types = [[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]; [okButton setEnabled: NO];
revertButton = nil; revertButton = nil;
@ -96,7 +91,6 @@ selectCellWithString: (NSString*)title
RELEASE(gets); RELEASE(gets);
RELEASE(sets); RELEASE(sets);
RELEASE(types); RELEASE(types);
RELEASE(okButton);
[super dealloc]; [super dealloc];
} }

View file

@ -149,7 +149,7 @@
}; };
IBInspector = { IBInspector = {
Actions = ("ok:", "revert:", "touch:"); Actions = ("ok:", "revert:", "touch:");
Outlets = (window); Outlets = (window, okButton, revertButton);
Super = NSObject; Super = NSObject;
}; };
IBPalette = {Actions = (); Outlets = (originalWindow); Super = NSObject; }; IBPalette = {Actions = (); Outlets = (originalWindow); Super = NSObject; };