mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
New form/section for miniwindow icon.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20508 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cfa2fe4385
commit
01a4bfe708
4 changed files with 52 additions and 45 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-12-31 14:29 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Palettes/1Windows/GormNSWindowInspector.gorm: Added form
|
||||
to allow setting of the miniaturized image by name.
|
||||
* Palettes/1Windows/main.m: Changes to use the form added to the
|
||||
UI.
|
||||
|
||||
2004-12-31 08:22 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormDocument.h: Added GormFilesOwner to @class declaration.
|
||||
|
|
|
@ -2,23 +2,7 @@
|
|||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"capitalizeWord:",
|
||||
"changeFont:",
|
||||
"delete:",
|
||||
"deleteWordBackward:",
|
||||
"loosenKerning:",
|
||||
"moveDown:",
|
||||
"moveToBeginningOfParagraph:",
|
||||
"moveWordForward:",
|
||||
"orderFrontDataLinkPanel:",
|
||||
"pasteAsPlainText:",
|
||||
"raiseBaseline:",
|
||||
"scrollLineDown:",
|
||||
"selectParagraph:",
|
||||
"showWindow:",
|
||||
"takeObjectValueFrom:",
|
||||
"toggleTraditionalCharacterShape:",
|
||||
"unscript:"
|
||||
"changeFont:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
|
@ -29,7 +13,9 @@
|
|||
backingMatrix,
|
||||
controlMatrix,
|
||||
optionMatrix,
|
||||
titleForm
|
||||
titleForm,
|
||||
iconNameForm,
|
||||
clearButton
|
||||
);
|
||||
Super = IBInspector;
|
||||
};
|
||||
|
|
Binary file not shown.
|
@ -213,6 +213,8 @@ NSwindow inspector
|
|||
id backingMatrix;
|
||||
id optionMatrix;
|
||||
id controlMatrix;
|
||||
id iconNameForm;
|
||||
id clearButton;
|
||||
}
|
||||
@end
|
||||
|
||||
|
@ -220,11 +222,31 @@ NSwindow inspector
|
|||
|
||||
- (void) _setValuesFromControl: control
|
||||
{
|
||||
|
||||
if (control == titleForm)
|
||||
{
|
||||
[object setTitle: [[control cellAtIndex: 0] stringValue] ];
|
||||
}
|
||||
else if (control == iconNameForm)
|
||||
{
|
||||
NSString *string = [[control cellAtIndex: 0] stringValue];
|
||||
NSImage *image;
|
||||
|
||||
if ([string length] > 0)
|
||||
{
|
||||
image = [NSImage imageNamed: string];
|
||||
[object setMiniwindowImage: image];
|
||||
}
|
||||
else
|
||||
{
|
||||
// use the default, if the string is empty.
|
||||
[object setMiniwindowImage: nil];
|
||||
}
|
||||
}
|
||||
else if (control == clearButton)
|
||||
{
|
||||
[[iconNameForm cellAtIndex: 0] setStringValue: nil];
|
||||
[object setMiniwindowImage: nil];
|
||||
}
|
||||
else if (control == backingMatrix)
|
||||
{
|
||||
[object setBackingType: [[control selectedCell] tag] ];
|
||||
|
@ -252,7 +274,8 @@ NSwindow inspector
|
|||
else if (control == optionMatrix)
|
||||
{
|
||||
BOOL flag;
|
||||
|
||||
GormDocument *doc = (GormDocument*)[(id<IB>)NSApp activeDocument];
|
||||
|
||||
// Release When Closed
|
||||
flag = ([[control cellAtRow: 0 column: 0] state] == NSOnState) ? YES : NO;
|
||||
[object _setReleasedWhenClosed: flag];
|
||||
|
@ -261,19 +284,13 @@ NSwindow inspector
|
|||
flag = ([[control cellAtRow: 1 column: 0] state] == NSOnState) ? YES : NO;
|
||||
[object setHidesOnDeactivate: flag];
|
||||
|
||||
// Visible at launch time. (not an object property. Stored in a Gorm dictionnary)
|
||||
// Visible at launch time. (not an object property. Stored in a Gorm dictionary)
|
||||
flag = ([[control cellAtRow: 2 column: 0] state] == NSOnState) ? YES : NO;
|
||||
{
|
||||
GormDocument *doc = (GormDocument*)[(id<IB>)NSApp activeDocument];
|
||||
[doc setObject: object isVisibleAtLaunch: flag];
|
||||
}
|
||||
[doc setObject: object isVisibleAtLaunch: flag];
|
||||
|
||||
// Deferred
|
||||
flag = ([[control cellAtRow: 3 column: 0] state] == NSOnState) ? YES : NO;
|
||||
{
|
||||
GormDocument *doc = (GormDocument*)[(id<IB>)NSApp activeDocument];
|
||||
[doc setObject: object isDeferred: flag];
|
||||
}
|
||||
[doc setObject: object isDeferred: flag];
|
||||
|
||||
// One shot
|
||||
flag = ([[control cellAtRow: 4 column: 0] state] == NSOnState) ? YES : NO;
|
||||
|
@ -285,7 +302,7 @@ NSwindow inspector
|
|||
|
||||
// wants to be color
|
||||
// FIXME: probably means window depth > 2 bits per pixel but don't know
|
||||
// exactly what NSWindow method to use to enforce that.
|
||||
// exactly what NSWindow method to use to enforce that.
|
||||
flag = ([[control cellAtRow: 6 column: 0] state] == NSOnState) ? YES : NO;
|
||||
}
|
||||
}
|
||||
|
@ -293,6 +310,7 @@ NSwindow inspector
|
|||
|
||||
- (void) _getValuesFromObject: anObject
|
||||
{
|
||||
GormDocument *doc = (GormDocument*)[(id<IB>)NSApp activeDocument];
|
||||
if (anObject != object)
|
||||
return;
|
||||
|
||||
|
@ -316,22 +334,16 @@ NSwindow inspector
|
|||
[optionMatrix selectCellAtRow: 1 column: 0];
|
||||
|
||||
// visible at launch time.
|
||||
{
|
||||
GormDocument *doc = (GormDocument*)[(id<IB>)NSApp activeDocument];
|
||||
if ([doc objectIsVisibleAtLaunch: anObject])
|
||||
{
|
||||
[optionMatrix selectCellAtRow: 2 column: 0];
|
||||
}
|
||||
}
|
||||
if ([doc objectIsVisibleAtLaunch: anObject])
|
||||
{
|
||||
[optionMatrix selectCellAtRow: 2 column: 0];
|
||||
}
|
||||
|
||||
// defer comes here.
|
||||
{
|
||||
GormDocument *doc = (GormDocument*)[(id<IB>)NSApp activeDocument];
|
||||
if ([doc objectIsDeferred: anObject])
|
||||
{
|
||||
[optionMatrix selectCellAtRow: 3 column: 0];
|
||||
}
|
||||
}
|
||||
if ([doc objectIsDeferred: anObject])
|
||||
{
|
||||
[optionMatrix selectCellAtRow: 3 column: 0];
|
||||
}
|
||||
|
||||
if ([anObject isOneShot])
|
||||
[optionMatrix selectCellAtRow: 4 column: 0];
|
||||
|
@ -340,7 +352,9 @@ NSwindow inspector
|
|||
[optionMatrix selectCellAtRow: 5 column: 0];
|
||||
|
||||
// FIXME: wants to be color comes here
|
||||
|
||||
|
||||
// icon name
|
||||
[[iconNameForm cellAtIndex: 0] setStringValue: [[object miniwindowImage] name]];
|
||||
}
|
||||
|
||||
- (void) _validate: (id)anObject
|
||||
|
|
Loading…
Reference in a new issue