Commit graph

40 commits

Author SHA1 Message Date
fredkiefer
9531572fb4 * Source/GSXibLoader.m (GSXibKeyedUnarchiver -_preProcessXib:):
Release the document.
        Patch by Doug Simons <doug.simons@testplant.com>
        * Source/GSXibLoader.m: Fix a problem where owner,
        * firstResponder and application
        were put in the list of top-level objects, creating a
retain-cycle.
        * Source/NSViewController.m: Fix a problem where view
        * controllers
        did not release their top-level objects as expected.
        * Source/NSWindowController.m: Fix a problem where window
        controllers did not release their top-level objects as expected.
        Changes made in occordance with
        https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html
        Patch by Jonathan Gillaspie <jonathan.gillaspie@testplant.com>



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36134 72102866-910b-0410-8b05-ffd578937521
2013-02-14 09:22:56 +00:00
fredkiefer
2c922ff305 * Source/NSWindowController.m (-initWithWindow:): Set the owner to
self and only call setDocument: if we have an actual window.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34825 72102866-910b-0410-8b05-ffd578937521
2012-02-27 12:23:05 +00:00
wlux
e70f659a25 Move code to set the window frame autosave name of a window
controller's window to match Cocoa behavior.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31945 72102866-910b-0410-8b05-ffd578937521
2011-01-24 22:05:36 +00:00
wlux
15c24d53a9 Send windowControllerWillLoadNib: and windowControllerDidLoadNib: to
the owner of the nib, since this is what Apple seems to do and since
this behavior is more useful when a non-document class uses a window
controller.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31491 72102866-910b-0410-8b05-ffd578937521
2010-10-08 06:46:58 +00:00
wlux
fe438e779e Avoid loading a window controller's nib prematurely if the document
edited status is changed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30500 72102866-910b-0410-8b05-ffd578937521
2010-05-30 22:55:39 +00:00
jonathanosx
8676ead49c * Source/NSWindowController.m: Fixed a problem where controller marks
the window as loaded even when the nib failed to load.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30227 72102866-910b-0410-8b05-ffd578937521
2010-04-23 19:26:44 +00:00
fredkiefer
e5373254e4 Use NSNibOwner instead of @"NSOwner". Remove the hard coded "gorm"
extension. Try to use higher level NIB loading methods where possible.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30077 72102866-910b-0410-8b05-ffd578937521
2010-03-30 07:54:04 +00:00
wlux
515f6d28de Show a document's represented file name in the title of its window
also when its display name is equal to the last path component of the
file name, since that is what NSDocument uses by default for
compatibility with OS X.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30052 72102866-910b-0410-8b05-ffd578937521
2010-03-27 21:06:45 +00:00
wlux
6fe88f9e37 Extend lifetime of a window controller to the end of the current event
cycle when its window is closed to prevent crashes due to a premature
release after the latest nib loading changes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30051 72102866-910b-0410-8b05-ffd578937521
2010-03-27 20:53:48 +00:00
wlux
3764826e20 Ensure that new windows properly show their document edited status.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27292 72102866-910b-0410-8b05-ffd578937521
2008-12-14 19:15:18 +00:00
fredkiefer
2505fd4eab Made all initialisation methods on NSWindowController a bit safer. Solves bug #25004.
Don't draw an empty rect in NSCachedImageRep. Fixes the remaining issue of #22282.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27250 72102866-910b-0410-8b05-ffd578937521
2008-12-07 21:22:13 +00:00
fredkiefer
3b4cc1196a In NSMenu compare target for identity not equality.
Decoding and encoding for NSWindowController.
Extend the responder chain of a window beyond itself.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26959 72102866-910b-0410-8b05-ffd578937521
2008-10-24 07:59:42 +00:00
fredkiefer
5a50f7ad69 Make window controller a subclass of NSResponder and manage the
responder chain. Patch by Wolfgang Lux <wolfgang.lux@gmail.com>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26956 72102866-910b-0410-8b05-ffd578937521
2008-10-23 08:17:23 +00:00
fredkiefer
fb69a9fd22 Correct retain/release issues in NSScrollView and NSWindowController.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26799 72102866-910b-0410-8b05-ffd578937521
2008-08-02 17:34:04 +00:00
fedor
ce41d782c1 Revert library license version to 2 until applications can be converted
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26619 72102866-910b-0410-8b05-ffd578937521
2008-06-10 04:01:49 +00:00
rfm
efe3ed5993 Update includes ... closer MacOS-X compatibility.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25635 72102866-910b-0410-8b05-ffd578937521
2007-11-29 20:28:03 +00:00
fredkiefer
e25cceb710 Change all files to use GPL 3 and LGPL 3.
Prepare for next release.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25536 72102866-910b-0410-8b05-ffd578937521
2007-10-29 21:16:17 +00:00
fredkiefer
9a71af08ad Added MacOS 10.4 methods for NSDocument, NSDocumentController,
NSPrintOperation, NSResponder and NSCell.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24378 72102866-910b-0410-8b05-ffd578937521
2007-01-17 12:09:41 +00:00
ratmice
fb31d82947 * Source/NSWindowController.m (_windowDidLoad:): Pass an NSZeroPoint to
cascadeTopLeftFromPoint: on the first call.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24157 72102866-910b-0410-8b05-ffd578937521
2006-11-24 13:58:37 +00:00
rfm
2ed1c70692 Tweaks to avoid new compiler warnings with gcc-4.1 and some 64bit issues.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23126 72102866-910b-0410-8b05-ffd578937521
2006-07-04 21:31:49 +00:00
rfm
ba9a35db0e Revert pointelss changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22417 72102866-910b-0410-8b05-ffd578937521
2006-02-03 10:07:01 +00:00
rfm
7d97327c27 Fix BOOL accessors to return a genuine boolean (YES or NO)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22413 72102866-910b-0410-8b05-ffd578937521
2006-02-02 21:16:55 +00:00
fedor
db3c52eab8 Update FSF Address.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21259 72102866-910b-0410-8b05-ffd578937521
2005-05-26 02:52:46 +00:00
fedor
0221e6abee set released when closed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17703 72102866-910b-0410-8b05-ffd578937521
2003-09-22 21:07:22 +00:00
fedor
f79d2b9d9b Revert last doc close and fix releaseWhenClosed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17691 72102866-910b-0410-8b05-ffd578937521
2003-09-21 02:27:50 +00:00
FredKiefer
ca261a11e3 Changed [setWindow:] to manage the notification connection to the window.
[initWithWindow:], [dealloc] and [_windowWillClose:] now use [setWindow:].
[setDocument:] now no longer retains the document, as this is
already retaining the window controller. Simplified [loadWindow]
by using the method [windowNibPath].


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17574 72102866-910b-0410-8b05-ffd578937521
2003-08-30 19:13:10 +00:00
fedor
fc402789db Include <> -> ""
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16917 72102866-910b-0410-8b05-ffd578937521
2003-06-13 15:01:12 +00:00
nico
4767e89f23 Fixed dealloc laziness in releasing stuff as soon as possible
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15767 72102866-910b-0410-8b05-ffd578937521
2003-01-30 03:44:51 +00:00
fedor
6ccbf6b20b Add dragging of ruler markers.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14907 72102866-910b-0410-8b05-ffd578937521
2002-11-02 23:17:23 +00:00
nico
43fd056ab5 Tidied up to prevent compiler warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12853 72102866-910b-0410-8b05-ffd578937521
2002-02-27 23:10:19 +00:00
fedor
c51f4265da Markup for autogsdoc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11788 72102866-910b-0410-8b05-ffd578937521
2001-12-17 16:51:51 +00:00
FredKiefer
9d857045a2 Implemented new methods and renamed some old which are now public.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11542 72102866-910b-0410-8b05-ffd578937521
2001-11-26 20:27:21 +00:00
nico
9a2ba1994e Fixes for case _document == nil
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11114 72102866-910b-0410-8b05-ffd578937521
2001-10-08 10:49:29 +00:00
nico
ee2ecb2b8a Indentation tidy up
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11113 72102866-910b-0410-8b05-ffd578937521
2001-10-08 10:26:44 +00:00
nico
7d25531b70 Raise an exception in init methods when called with nil nib file name
or nil owner


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11087 72102866-910b-0410-8b05-ffd578937521
2001-10-06 13:27:46 +00:00
nico
06f4ffec7b Use ASSIGN
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10529 72102866-910b-0410-8b05-ffd578937521
2001-07-20 09:19:47 +00:00
nico
2256c67cca Indentation, and use ASSIGN in a couple of places
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10528 72102866-910b-0410-8b05-ffd578937521
2001-07-20 09:18:31 +00:00
nico
caedf71059 Added FIXME for memory problem
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10290 72102866-910b-0410-8b05-ffd578937521
2001-07-04 17:30:11 +00:00
jagapen
8344d89c2a Document system change to NSWindow, GC update for NSWindowController
New method implemented in NSWorkspace


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6434 72102866-910b-0410-8b05-ffd578937521
2000-04-07 23:49:10 +00:00
michael
ad0a4b7230 Added NSWindowController and the NSDocument* classes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4868 72102866-910b-0410-8b05-ffd578937521
1999-09-11 00:52:04 +00:00