mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
Set target/action for all NSForms in inspectors.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@11290 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1da155b9d1
commit
c9b7a1cc94
15 changed files with 30 additions and 153 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2001-11-01 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* GormDocument.m ([GormDocument -openDocument:]): Open file
|
||||
from current dir.
|
||||
|
||||
* Palettes/1Windows/main.m: Set action/target to ok: in NSForms in
|
||||
GormWindowInspector and GormWindowSizeInspector. Remove all
|
||||
TextDidEndEditing Notifications.
|
||||
* Palettes/2Controls/inspectors.m: Likewise for all control
|
||||
inspectors. Also make sure all setStringValue: messages get sent
|
||||
a non-nil string.
|
||||
|
||||
2001-10-30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* GormWindowEditor.m: Fixed various drawing glitches when managing
|
||||
|
|
|
@ -1277,7 +1277,7 @@ static NSImage *classesImage = nil;
|
|||
[oPanel setAllowsMultipleSelection: NO];
|
||||
[oPanel setCanChooseFiles: YES];
|
||||
[oPanel setCanChooseDirectories: NO];
|
||||
result = [oPanel runModalForDirectory: NSHomeDirectory()
|
||||
result = [oPanel runModalForDirectory: nil
|
||||
file: nil
|
||||
types: fileTypes];
|
||||
if (result == NSOKButton)
|
||||
|
|
Binary file not shown.
|
@ -11,6 +11,9 @@
|
|||
};
|
||||
IBInspector = {
|
||||
Actions = (
|
||||
ok:,
|
||||
revert:,
|
||||
touch:
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
|
@ -27,11 +30,11 @@
|
|||
};
|
||||
NSControl = {
|
||||
Actions = (
|
||||
"takeDoubleValueFrom:",
|
||||
"takeFloatValueFrom:",
|
||||
"takeIntValueFrom:",
|
||||
"takeObjectValueFrom:",
|
||||
"takeStringValueFrom:"
|
||||
takeDoubleValueFrom:,
|
||||
takeFloatValueFrom:,
|
||||
takeIntValueFrom:,
|
||||
takeObjectValueFrom:,
|
||||
takeStringValueFrom:
|
||||
);
|
||||
Outlets = (
|
||||
target
|
||||
|
|
Binary file not shown.
|
@ -283,15 +283,8 @@ NSwindow inspector
|
|||
|
||||
}
|
||||
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
||||
{
|
||||
id notifier = [aNotification object];
|
||||
[self _setValuesFromControl: notifier];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
RELEASE(window);
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -306,12 +299,6 @@ NSwindow inspector
|
|||
NSLog(@"Could not gorm GormWindowInspector");
|
||||
return nil;
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(controlTextDidEndEditing:)
|
||||
name: NSControlTextDidEndEditingNotification
|
||||
object: nil];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -378,12 +365,6 @@ NSwindow inspector
|
|||
[[minForm cellAtIndex: 1] setFloatValue: size.height];
|
||||
}
|
||||
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
||||
{
|
||||
id notifier = [aNotification object];
|
||||
[self _setValuesFromControl: notifier];
|
||||
}
|
||||
|
||||
- (void) windowChangeNotification: (NSNotification*)aNotification
|
||||
{
|
||||
id notifier = [aNotification object];
|
||||
|
@ -418,11 +399,6 @@ NSwindow inspector
|
|||
selector: @selector(windowChangeNotification:)
|
||||
name: NSWindowDidResizeNotification
|
||||
object: object];
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(controlTextDidEndEditing:)
|
||||
name: NSControlTextDidEndEditingNotification
|
||||
object: nil];
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -26,6 +26,9 @@
|
|||
#include <AppKit/AppKit.h>
|
||||
#include "../../GormPrivate.h"
|
||||
|
||||
/* This macro makes sure that the string contains a value, even if @"" */
|
||||
#define VSTR(str) ({id _str = str; (_str) ? _str : @"";})
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* NSBox
|
||||
*/
|
||||
|
@ -84,21 +87,13 @@
|
|||
}
|
||||
[positionMatrix selectCellWithTag: [anObject titlePosition]];
|
||||
[borderMatrix selectCellWithTag: [anObject borderType]];
|
||||
[[titleField cellAtIndex: 0] setStringValue: [anObject title]];
|
||||
[[titleField cellAtIndex: 0] setStringValue: VSTR([anObject title])];
|
||||
[horizontalSlider setFloatValue: [anObject contentViewMargins].width];
|
||||
[verticalSlider setFloatValue: [anObject contentViewMargins].height];
|
||||
}
|
||||
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
||||
{
|
||||
id notifier = [aNotification object];
|
||||
|
||||
[self _setValuesFromControl: notifier];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
RELEASE(window);
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -114,11 +109,6 @@
|
|||
NSLog(@"Could not gorm GormBoxInspector");
|
||||
return nil;
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(controlTextDidEndEditing:)
|
||||
name: NSControlTextDidEndEditingNotification
|
||||
object: nil];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -296,7 +286,7 @@
|
|||
}
|
||||
[alignMatrix selectCellWithTag: [anObject alignment]];
|
||||
[iconMatrix selectCellWithTag: [anObject imagePosition]];
|
||||
[[keyField cellAtIndex: 0] setStringValue: [anObject keyEquivalent]];
|
||||
[[keyField cellAtIndex: 0] setStringValue: VSTR([anObject keyEquivalent])];
|
||||
|
||||
[optionMatrix deselectAllCells];
|
||||
if ([anObject isBordered])
|
||||
|
@ -312,13 +302,13 @@
|
|||
|
||||
[[tagField cellAtIndex: 0] setIntValue: [anObject tag]];
|
||||
|
||||
[[titleForm cellAtIndex: 0] setStringValue: [anObject title]];
|
||||
[[titleForm cellAtIndex: 1] setStringValue: [anObject alternateTitle]];
|
||||
[[titleForm cellAtIndex: 0] setStringValue: VSTR([anObject title])];
|
||||
[[titleForm cellAtIndex: 1] setStringValue: VSTR([anObject alternateTitle])];
|
||||
|
||||
image = [anObject image];
|
||||
if (image != nil)
|
||||
{
|
||||
[[titleForm cellAtIndex: 2] setStringValue: [image name]];
|
||||
[[titleForm cellAtIndex: 2] setStringValue: VSTR([image name])];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -328,7 +318,7 @@
|
|||
image = [anObject alternateImage];
|
||||
if (image != nil)
|
||||
{
|
||||
[[titleForm cellAtIndex: 3] setStringValue: [image name]];
|
||||
[[titleForm cellAtIndex: 3] setStringValue: VSTR([image name])];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -339,16 +329,8 @@
|
|||
[typeButton indexOfItemWithTag: [self buttonTypeForObject: anObject]]];
|
||||
}
|
||||
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
||||
{
|
||||
id notifier = [aNotification object];
|
||||
|
||||
[self _setValuesFromControl: notifier];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
RELEASE(window);
|
||||
RELEASE(okButton);
|
||||
[super dealloc];
|
||||
|
@ -365,11 +347,6 @@
|
|||
NSLog(@"Could not gorm GormButtonInspector");
|
||||
return nil;
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(controlTextDidEndEditing:)
|
||||
name: NSControlTextDidEndEditingNotification
|
||||
object: nil];
|
||||
|
||||
/* Need to set up popup button */
|
||||
[typeButton removeAllItems];
|
||||
|
@ -474,16 +451,8 @@
|
|||
[[tagForm cellAtRow: 0 column: 0] setIntValue: [anObject tag]];
|
||||
}
|
||||
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
||||
{
|
||||
id notifier = [aNotification object];
|
||||
|
||||
[self _setValuesFromControl: notifier];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
RELEASE(window);
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -499,11 +468,6 @@
|
|||
NSLog(@"Could not gorm GormCellInspector");
|
||||
return nil;
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(controlTextDidEndEditing:)
|
||||
name: NSControlTextDidEndEditingNotification
|
||||
object: nil];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -656,16 +620,8 @@
|
|||
[[tagForm cellAtRow: 0 column: 0] setIntValue: [anObject tag]];
|
||||
}
|
||||
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
||||
{
|
||||
id notifier = [aNotification object];
|
||||
|
||||
[self _setValuesFromControl: notifier];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
RELEASE(window);
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -681,11 +637,6 @@
|
|||
NSLog(@"Could not gorm GormFormInspector");
|
||||
return nil;
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(controlTextDidEndEditing:)
|
||||
name: NSControlTextDidEndEditingNotification
|
||||
object: nil];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -834,16 +785,8 @@
|
|||
[[tagForm cellAtIndex: 0] setIntValue: [anObject tag]];
|
||||
}
|
||||
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
||||
{
|
||||
id notifier = [aNotification object];
|
||||
|
||||
[self _setValuesFromControl: notifier];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
RELEASE(window);
|
||||
RELEASE(okButton);
|
||||
[super dealloc];
|
||||
|
@ -860,11 +803,6 @@
|
|||
NSLog(@"Could not gorm GormMatrixInspector");
|
||||
return nil;
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(controlTextDidEndEditing:)
|
||||
name: NSControlTextDidEndEditingNotification
|
||||
object: nil];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -931,16 +869,8 @@
|
|||
[[tagForm cellAtRow: 0 column: 0] setIntValue: [anObject tag]];
|
||||
}
|
||||
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
||||
{
|
||||
id notifier = [aNotification object];
|
||||
|
||||
[self _setValuesFromControl: notifier];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
RELEASE(window);
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -956,11 +886,6 @@
|
|||
NSLog(@"Could not gorm GormPopUpButtonInspector");
|
||||
return nil;
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(controlTextDidEndEditing:)
|
||||
name: NSControlTextDidEndEditingNotification
|
||||
object: nil];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -1066,16 +991,8 @@
|
|||
[[tagForm cellAtIndex: 0] setIntValue: [[anObject cell] tag]];
|
||||
}
|
||||
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
||||
{
|
||||
id notifier = [aNotification object];
|
||||
|
||||
[self _setValuesFromControl: notifier];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
RELEASE(window);
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -1091,11 +1008,6 @@
|
|||
NSLog(@"Could not gorm GormSliderInspector");
|
||||
return nil;
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(controlTextDidEndEditing:)
|
||||
name: NSControlTextDidEndEditingNotification
|
||||
object: nil];
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -1209,16 +1121,8 @@
|
|||
[valueWrapsButton setState: 0];
|
||||
}
|
||||
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
||||
{
|
||||
id notifier = [aNotification object];
|
||||
|
||||
[self _setValuesFromControl: notifier];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
RELEASE(window);
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -1235,11 +1139,6 @@
|
|||
return nil;
|
||||
}
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(controlTextDidEndEditing:)
|
||||
name: NSControlTextDidEndEditingNotification
|
||||
object: nil];
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -1402,16 +1301,8 @@
|
|||
[[tagForm cellAtIndex: 0] setIntValue: [anObject tag]];
|
||||
}
|
||||
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
||||
{
|
||||
id notifier = [aNotification object];
|
||||
|
||||
[self _setValuesFromControl: notifier];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
RELEASE(window);
|
||||
RELEASE(okButton);
|
||||
[super dealloc];
|
||||
|
@ -1429,11 +1320,6 @@
|
|||
NSLog(@"Could not gorm GormTextFieldInspector");
|
||||
return nil;
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(controlTextDidEndEditing:)
|
||||
name: NSControlTextDidEndEditingNotification
|
||||
object: nil];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue