mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Correction for issue #9683.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19906 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fc97b591db
commit
57c523f577
6 changed files with 70 additions and 26 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2004-08-23 15:06 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Palettes/1Windows/GormNSPanel.[hm]:
|
||||
* Palettes/1Windows/GormNSWindow.[hm]: Changed the name
|
||||
of the styleMask method to _styleMask. Since this serves
|
||||
as a "proxy" of the original value so that it can be edited
|
||||
without effecting the window, it shouldn't have the same
|
||||
name as the method in the parent class anyway. The new
|
||||
window decoration code was calling this method.
|
||||
* Palettes/1Windows/main.m: [GormWindowAttributesInspector
|
||||
_setValuesFromControl:] and [GormWindowAttributesInspector
|
||||
_getValuesFromObject] changed to use new method name.
|
||||
|
||||
2004-08-21 00:20 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Palettes/1Windows/GormNSPanel.m:
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
unsigned _gormStyleMask;
|
||||
BOOL _gormReleasedWhenClosed;
|
||||
}
|
||||
- (void) setStyleMask: (unsigned)newStyleMask;
|
||||
- (unsigned) styleMask;
|
||||
- (void) _setStyleMask: (unsigned int)newStyleMask;
|
||||
- (unsigned int) _styleMask;
|
||||
- (void) _setReleasedWhenClosed: (BOOL) flag;
|
||||
- (BOOL) _isReleasedWhenClosed;
|
||||
@end
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include <AppKit/AppKit.h>
|
||||
#include "GormNSPanel.h"
|
||||
|
||||
static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
|
||||
| NSResizableWindowMask | NSMiniaturizableWindowMask;
|
||||
|
||||
@implementation GormNSPanel
|
||||
- (void)encodeWithCoder: (NSCoder*) aCoder
|
||||
|
@ -50,20 +52,27 @@
|
|||
screen: (NSScreen*)aScreen
|
||||
{
|
||||
_gormStyleMask = aStyle;
|
||||
[self setReleasedWhenClosed: NO];
|
||||
return [super initWithContentRect: contentRect
|
||||
styleMask: NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask
|
||||
backing: bufferingType
|
||||
defer: flag
|
||||
screen: aScreen];
|
||||
self = [super initWithContentRect: contentRect
|
||||
styleMask: defaultStyleMask
|
||||
backing: bufferingType
|
||||
defer: flag
|
||||
screen: aScreen];
|
||||
if(self != nil)
|
||||
{
|
||||
// Don't release when the window is closed, a window being edited may
|
||||
// be periodically opened and closed.
|
||||
[self setReleasedWhenClosed: NO];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setStyleMask: (unsigned) newStyleMask
|
||||
- (void) _setStyleMask: (unsigned int) newStyleMask
|
||||
{
|
||||
_gormStyleMask = newStyleMask;
|
||||
}
|
||||
|
||||
- (unsigned)styleMask
|
||||
- (unsigned int) _styleMask
|
||||
{
|
||||
return _gormStyleMask;
|
||||
}
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
unsigned _gormStyleMask;
|
||||
BOOL _gormReleasedWhenClosed;
|
||||
}
|
||||
- (void) setStyleMask: (unsigned)newStyleMask;
|
||||
- (unsigned) styleMask;
|
||||
- (void) _setStyleMask: (unsigned int)newStyleMask;
|
||||
- (unsigned int) _styleMask;
|
||||
- (void) _setReleasedWhenClosed: (BOOL) flag;
|
||||
- (BOOL) _isReleasedWhenClosed;
|
||||
@end
|
||||
|
|
|
@ -24,7 +24,22 @@
|
|||
|
||||
#include "GormNSWindow.h"
|
||||
|
||||
// the default style mask we start with.
|
||||
static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
|
||||
| NSResizableWindowMask | NSMiniaturizableWindowMask;
|
||||
|
||||
@implementation GormNSWindow
|
||||
/*
|
||||
- (void) setFrameForMask: (unsigned int)mask
|
||||
{
|
||||
NSRect newFrame;
|
||||
|
||||
// Reset the frame with the style...
|
||||
newFrame = [NSWindow frameRectForContentRect: contentRect styleMask: mask];
|
||||
[window setFrame: newFrame display: NO];
|
||||
}
|
||||
*/
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
unsigned oldStyleMask;
|
||||
|
@ -47,21 +62,28 @@
|
|||
screen: (NSScreen*)aScreen
|
||||
{
|
||||
_gormStyleMask = aStyle;
|
||||
[self setReleasedWhenClosed: NO];
|
||||
return [super initWithContentRect: contentRect
|
||||
styleMask: NSTitledWindowMask | NSClosableWindowMask
|
||||
| NSResizableWindowMask | NSMiniaturizableWindowMask
|
||||
backing: bufferingType
|
||||
defer: flag
|
||||
screen: aScreen];
|
||||
// _originalContentRect = contentRect;
|
||||
self = [super initWithContentRect: contentRect
|
||||
styleMask: defaultStyleMask
|
||||
backing: bufferingType
|
||||
defer: flag
|
||||
screen: aScreen];
|
||||
if(self != nil)
|
||||
{
|
||||
// Don't release when the window is closed, a window being edited may
|
||||
// be periodically opened and closed.
|
||||
[self setReleasedWhenClosed: NO];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) setStyleMask: (unsigned)newStyleMask
|
||||
- (void) _setStyleMask: (unsigned int)newStyleMask
|
||||
{
|
||||
_gormStyleMask = newStyleMask;
|
||||
}
|
||||
|
||||
- (unsigned) styleMask
|
||||
- (unsigned int) _styleMask
|
||||
{
|
||||
return _gormStyleMask;
|
||||
}
|
||||
|
|
|
@ -233,7 +233,7 @@ NSwindow inspector
|
|||
|
||||
[control getNumberOfRows:&rows columns:&cols];
|
||||
|
||||
newStyleMask = [object styleMask];
|
||||
newStyleMask = [object _styleMask];
|
||||
for (i=0;i<rows;i++) {
|
||||
if ([[control cellAtRow: i column: 0] state] == NSOnState)
|
||||
newStyleMask |= [[control cellAtRow: i column: 0] tag];
|
||||
|
@ -241,7 +241,7 @@ NSwindow inspector
|
|||
newStyleMask &= ~[[control cellAtRow: i column: 0] tag];
|
||||
}
|
||||
|
||||
[object setStyleMask: newStyleMask];
|
||||
[object _setStyleMask: newStyleMask];
|
||||
// FIXME: This doesn't refresh the window decoration. How to do that?
|
||||
// (currently needs manual hide/unhide to update decorations)
|
||||
[object display];
|
||||
|
@ -299,11 +299,11 @@ NSwindow inspector
|
|||
|
||||
|
||||
[controlMatrix deselectAllCells];
|
||||
if ([anObject styleMask] & NSMiniaturizableWindowMask)
|
||||
if ([anObject _styleMask] & NSMiniaturizableWindowMask)
|
||||
[controlMatrix selectCellAtRow: 0 column: 0];
|
||||
if ([anObject styleMask] & NSClosableWindowMask)
|
||||
if ([anObject _styleMask] & NSClosableWindowMask)
|
||||
[controlMatrix selectCellAtRow: 1 column: 0];
|
||||
if ([anObject styleMask] & NSResizableWindowMask)
|
||||
if ([anObject _styleMask] & NSResizableWindowMask)
|
||||
[controlMatrix selectCellAtRow: 2 column: 0];
|
||||
|
||||
[optionMatrix deselectAllCells];
|
||||
|
|
Loading…
Reference in a new issue