mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
Now shows selection of window/panel when title bar is clicked.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21502 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7192134d1c
commit
3d4490ef38
3 changed files with 48 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2005-07-18 23:54 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
|
* Palettes/1Windows/GormNSPanel.m
|
||||||
|
* Palettes/1Windows/GormNSWindow.m: Added override for
|
||||||
|
orderWindow:relativeTo: which causes selection of the window
|
||||||
|
by Gorm, if the title bar is clicked.
|
||||||
|
|
||||||
2005-07-17 15:47 Gregory John Casamento <greg_casamento@yahoo.com>
|
2005-07-17 15:47 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* GormCore/GormClassEditor.m: Added code to prevent memory leak
|
* GormCore/GormClassEditor.m: Added code to prevent memory leak
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
#include <GNUstepGUI/GSNibTemplates.h>
|
#include <GNUstepGUI/GSNibTemplates.h>
|
||||||
|
#include <InterfaceBuilder/InterfaceBuilder.h>
|
||||||
#include "GormNSPanel.h"
|
#include "GormNSPanel.h"
|
||||||
|
|
||||||
static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
|
static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
|
||||||
|
@ -108,4 +109,23 @@ static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
|
||||||
{
|
{
|
||||||
autoPositionMask = mask;
|
autoPositionMask = mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) orderWindow: (NSWindowOrderingMode)place relativeTo: (int)otherWin
|
||||||
|
{
|
||||||
|
id<IBDocuments> document = [(id<IB>)NSApp documentForObject: self];
|
||||||
|
[super orderWindow: place relativeTo: otherWin];
|
||||||
|
if([NSApp isConnecting] == NO)
|
||||||
|
{
|
||||||
|
id editor = [document editorForObject: self create: NO];
|
||||||
|
|
||||||
|
// select myself.
|
||||||
|
if([editor respondsToSelector: @selector(selectObjects:)])
|
||||||
|
{
|
||||||
|
[editor selectObjects: [NSArray arrayWithObject: self]];
|
||||||
|
}
|
||||||
|
|
||||||
|
[document setSelectionFromEditor: editor];
|
||||||
|
[editor makeSelectionVisible: YES];
|
||||||
|
}
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -22,7 +22,9 @@
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <AppKit/AppKit.h>
|
||||||
#include <GNUstepGUI/GSNibTemplates.h>
|
#include <GNUstepGUI/GSNibTemplates.h>
|
||||||
|
#include <InterfaceBuilder/InterfaceBuilder.h>
|
||||||
#include "GormNSWindow.h"
|
#include "GormNSWindow.h"
|
||||||
|
|
||||||
// the default style mask we start with.
|
// the default style mask we start with.
|
||||||
|
@ -129,4 +131,23 @@ static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
|
||||||
{
|
{
|
||||||
autoPositionMask = mask;
|
autoPositionMask = mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) orderWindow: (NSWindowOrderingMode)place relativeTo: (int)otherWin
|
||||||
|
{
|
||||||
|
id<IBDocuments> document = [(id<IB>)NSApp documentForObject: self];
|
||||||
|
[super orderWindow: place relativeTo: otherWin];
|
||||||
|
if([NSApp isConnecting] == NO)
|
||||||
|
{
|
||||||
|
id editor = [document editorForObject: self create: NO];
|
||||||
|
|
||||||
|
// select myself.
|
||||||
|
if([editor respondsToSelector: @selector(selectObjects:)])
|
||||||
|
{
|
||||||
|
[editor selectObjects: [NSArray arrayWithObject: self]];
|
||||||
|
}
|
||||||
|
|
||||||
|
[document setSelectionFromEditor: editor];
|
||||||
|
[editor makeSelectionVisible: YES];
|
||||||
|
}
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in a new issue