* Source/NSSavePanel.m: Fix problem with the title shown in

the save panel's title bar not matching the set title when
        the panel is reused for a different purpose.
        Patch by Doug Simons <doug.simons@testplant.com>
        * Source/NSApplication.m: Adjust modal window position to
        relative window requested.
        Patch by Marcian Lytwyn <gna@advcsi.com> with small change.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38440 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2015-03-27 21:33:24 +00:00
parent 6d27cf76b1
commit a47ee28eae
3 changed files with 28 additions and 3 deletions

View file

@ -1,3 +1,13 @@
2015-03-27 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSSavePanel.m: Fix problem with the title shown in
the save panel's title bar not matching the set title when
the panel is reused for a different purpose.
Patch by Doug Simons <doug.simons@testplant.com>
* Source/NSApplication.m: Adjust modal window position to relative
window requested.
Patch by Marcian Lytwyn <gna@advcsi.com> with small change.
2015-03-16 Fred Kiefer <FredKiefer@gmx.de>
* Images/NSRemoveTemplate.tiff: Add file.

View file

@ -1969,13 +1969,26 @@ See -runModalForWindow:
* Put up a modal window centered relative to docWindow. On OS X this is
* deprecated in favor of
* -beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo: .
* <em>Not implemented under GNUstep. Currently just centers window on the
* screen.</em>
*/
- (NSInteger) runModalForWindow: (NSWindow *)theWindow
relativeToWindow: (NSWindow *)docWindow
{
// FIXME
if ((docWindow != nil) && (theWindow != nil))
{
NSRect docFrame = [docWindow frame];
NSPoint point = docFrame.origin;
NSRect theFrame = [theWindow frame];
NSSize size = theFrame.size;
// Calculate window position...
point.x += (docFrame.size.width - size.width) / 2;
point.y += (docFrame.size.height - size.height) / 2;
NSDebugLLog(@"NSWindow", @"Positioning window %@ relative to %@ at %@",
NSStringFromRect(theFrame), NSStringFromRect(docFrame), NSStringFromPoint(point));
// Position window...
[theWindow setFrameOrigin: point];
}
[theWindow orderWindow: NSWindowAbove
relativeTo: [docWindow windowNumber]];
return [self runModalForWindow: theWindow];

View file

@ -859,6 +859,8 @@ selectCellWithString: (NSString*)title
*/
- (void) setTitle: (NSString*)title
{
// keep the window title in sync with the title field
[super setTitle:title];
[_titleField setStringValue: title];
// TODO: Improve the following by managing