diff --git a/ChangeLog b/ChangeLog index 5729658d..4f1bed37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-02 17:13-EST Gregory John Casamento + + * Palettes/2Controls/GormButtonAttributesInspector.[hm]: + Added code to handle button style. + * Palettes/2Controls/GormNSButtonInspector.gorm: Added button + style popup to the inspector. + 2009-02-01 09:20-EST Gregory John Casamento * GormCore/GormBoxEditor.m diff --git a/Palettes/2Controls/GormButtonAttributesInspector.h b/Palettes/2Controls/GormButtonAttributesInspector.h index 12298f23..0a2aa8f2 100644 --- a/Palettes/2Controls/GormButtonAttributesInspector.h +++ b/Palettes/2Controls/GormButtonAttributesInspector.h @@ -51,6 +51,7 @@ NSForm *tagForm; NSForm *titleForm; NSPopUpButton *typeButton; + NSPopUpButton *bezelButton; NSPopUpButton *keyEquiv; NSSwitch *altMod; NSSwitch *shiftMod; diff --git a/Palettes/2Controls/GormButtonAttributesInspector.m b/Palettes/2Controls/GormButtonAttributesInspector.m index dae97794..923a40c0 100644 --- a/Palettes/2Controls/GormButtonAttributesInspector.m +++ b/Palettes/2Controls/GormButtonAttributesInspector.m @@ -136,12 +136,12 @@ NSString *rtString = nil; { if (sender == alignMatrix) { - [object setAlignment: (NSTextAlignment)[[sender selectedCell] tag]]; + [(NSButton *)object setAlignment: (NSTextAlignment)[[sender selectedCell] tag]]; } else if (sender == iconMatrix) { - [object setImagePosition: - (NSCellImagePosition)[[sender selectedCell] tag]]; + [(NSButton *)object setImagePosition: + (NSCellImagePosition)[[sender selectedCell] tag]]; } else if (sender == keyForm) { @@ -222,7 +222,7 @@ NSString *rtString = nil; } else if (sender == tagForm) { - [object setTag: [[sender cellAtIndex: 0] intValue]]; + [(NSButton *)object setTag: [[sender cellAtIndex: 0] intValue]]; } else if (sender == titleForm) { @@ -249,6 +249,10 @@ NSString *rtString = nil; { [object setButtonType: [[sender selectedItem] tag]]; } + else if (sender == bezelButton) + { + [object setBezelStyle: [[sender selectedItem] tag]]; + } else if ([sender isKindOfClass: [NSMenuItem class]] ) { /* @@ -257,7 +261,7 @@ NSString *rtString = nil; * FIXME: Ideally we should also test if the menu item belongs * to the 'type button' control. How to do that? */ - [object setButtonType: [sender tag]]; + [(NSButton *)object setButtonType: [sender tag]]; } else if (sender == altMod) { @@ -369,7 +373,7 @@ NSString *rtString = nil; if ([object isTransparent]) [optionMatrix selectCellAtRow: 4 column: 0]; - [[tagForm cellAtIndex: 0] setIntValue: [object tag]]; + [[tagForm cellAtIndex: 0] setIntValue: [(NSButton *)object tag]]; [[titleForm cellAtIndex: 0] setStringValue: VSTR([object title])]; [[titleForm cellAtIndex: 1] setStringValue: VSTR([object alternateTitle])]; @@ -419,6 +423,9 @@ NSString *rtString = nil; [typeButton selectItemAtIndex: [typeButton indexOfItemWithTag: [self buttonTypeForObject: object]]]; + + [bezelButton selectItemAtIndex: + [bezelButton indexOfItemWithTag: [object bezelStyle]]]; } } diff --git a/Palettes/2Controls/GormNSButtonInspector.gorm/data.classes b/Palettes/2Controls/GormNSButtonInspector.gorm/data.classes index 7aa78ca1..8aee5600 100644 --- a/Palettes/2Controls/GormNSButtonInspector.gorm/data.classes +++ b/Palettes/2Controls/GormNSButtonInspector.gorm/data.classes @@ -15,7 +15,8 @@ altMod, ctrlMod, shiftMod, - cmdMod + cmdMod, + bezelButton ); Super = IBInspector; }; diff --git a/Palettes/2Controls/GormNSButtonInspector.gorm/data.info b/Palettes/2Controls/GormNSButtonInspector.gorm/data.info index e233f826..da98e432 100644 Binary files a/Palettes/2Controls/GormNSButtonInspector.gorm/data.info and b/Palettes/2Controls/GormNSButtonInspector.gorm/data.info differ diff --git a/Palettes/2Controls/GormNSButtonInspector.gorm/objects.gorm b/Palettes/2Controls/GormNSButtonInspector.gorm/objects.gorm index 8d8a5b23..e1cded56 100644 Binary files a/Palettes/2Controls/GormNSButtonInspector.gorm/objects.gorm and b/Palettes/2Controls/GormNSButtonInspector.gorm/objects.gorm differ