Commit graph

47 commits

Author SHA1 Message Date
Fred Kiefer
782af1ee89 Fix memory leaks found by static analyser.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32529 72102866-910b-0410-8b05-ffd578937521
2011-03-10 23:03:01 +00:00
Fred Kiefer
1e34733d4a * Source/GSNibLoading.m (NSCustomView): Correct implementation of
-initWithCoder: and remove -awakeAfterUsingCoder:.
* Source/NSSound.m: Remove method -awakeAfterUsingCoder:.
* Source/NSWindow.m (-_captureMouse:, -_releaseMouse:) Add some
  debug log code here to simplify debugging these methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32460 72102866-910b-0410-8b05-ffd578937521
2011-03-05 16:10:43 +00:00
Fred Kiefer
2d01942e4b Replace #include -> #import
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32451 72102866-910b-0410-8b05-ffd578937521
2011-03-04 11:33:22 +00:00
Wolfgang Lux
b90707ed47 Fix bug where a window was ignoring its autosaved frame when loaded
from a .nib file.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30396 72102866-910b-0410-8b05-ffd578937521
2010-05-15 21:00:25 +00:00
Wolfgang Lux
ccfd4b4fd5 Don't send -awakeFromNib to an NSApplication proxy in a .nib file (nor
any other proxy) and do not record it in the top level array either.
Identification of proxy objects is based on their object IDs.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30379 72102866-910b-0410-8b05-ffd578937521
2010-05-13 14:08:26 +00:00
Wolfgang Lux
809a378e24 Ensure proper order of actions when loading a .nib file and make sure
all objects are instantiated before establishing any connections. This
fixes an issue where, e.g., a generic shared document controller
instance is created before a custom instance defined in the nib file.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30376 72102866-910b-0410-8b05-ffd578937521
2010-05-13 13:01:44 +00:00
Wolfgang Lux
77eaadf3ae Next attempt at getting .nib file loading right. Make sure that
-nibInstantiate is sent to all loaded objects and also make sure that
-awakeFromNib is sent to the nib's owner.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30367 72102866-910b-0410-8b05-ffd578937521
2010-05-12 14:19:55 +00:00
Wolfgang Lux
20a4078572 Fix bug where some objects loaded from a .nib file were not sent an
-awakeFromNib message.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30361 72102866-910b-0410-8b05-ffd578937521
2010-05-12 07:59:57 +00:00
Fred Kiefer
63638ee055 Remove compiler warnings from clang.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30117 72102866-910b-0410-8b05-ffd578937521
2010-04-10 17:48:46 +00:00
Wolfgang Lux
d22c6be29f Attempt to improve a possibly misleading comment about releasing top
level objects of a gorm/nib file.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30074 72102866-910b-0410-8b05-ffd578937521
2010-03-30 07:09:44 +00:00
Fred Kiefer
504a5c2064 Rewrite of top level object handling in NIB/Gorm/Xib loading.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30070 72102866-910b-0410-8b05-ffd578937521
2010-03-28 21:33:08 +00:00
David Chisnall
a9ba2e5e77 Removed all uses of @defs() from -gui, so it now compiles cleanly with the non-fragile ABI. All ivars that must be accessed from other classes are now wrapped in PACKAGE_SCOPE. With clang, this expands to @package, with GCC it expands to @public.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30045 72102866-910b-0410-8b05-ffd578937521
2010-03-27 00:01:03 +00:00
Fred Kiefer
717ed845d0 * Source/GSNibLoading.m (NSIBObjectData-nibInstantiateWithOwner:topLevelObjects:): Loop
over _names instead of _objects.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30035 72102866-910b-0410-8b05-ffd578937521
2010-03-25 20:41:06 +00:00
Fred Kiefer
68ce541e5d Fix issues with last commit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30019 72102866-910b-0410-8b05-ffd578937521
2010-03-22 21:25:35 +00:00
Fred Kiefer
d205cd7f9e Get the class NSNib to work and use it in NSBundleAdditions.
Restructure top level object handling for NIB loading.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30018 72102866-910b-0410-8b05-ffd578937521
2010-03-22 09:08:50 +00:00
Fred Kiefer
05beafea2e Small improvements to NIB loading.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30010 72102866-910b-0410-8b05-ffd578937521
2010-03-20 17:23:10 +00:00
Fred Kiefer
1399765d96 Clean up includes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30009 72102866-910b-0410-8b05-ffd578937521
2010-03-20 14:09:02 +00:00
Fred Kiefer
4b1472cf8a Make the signatures of methods consistent between headers and implementation files.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29687 72102866-910b-0410-8b05-ffd578937521
2010-02-20 13:21:57 +00:00
Richard Frith-MacDonald
9c5f81ac5f Fix removal of quit item from info menu
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29077 72102866-910b-0410-8b05-ffd578937521
2009-11-28 17:31:24 +00:00
Richard Frith-MacDonald
0a106c8679 improve menu loading
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29076 72102866-910b-0410-8b05-ffd578937521
2009-11-28 15:48:59 +00:00
Fred Kiefer
1878af00d9 Don't reference ivar after the object has been freed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28105 72102866-910b-0410-8b05-ffd578937521
2009-03-20 09:52:06 +00:00
Fred Kiefer
346c843533 One more missing localization include.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28016 72102866-910b-0410-8b05-ffd578937521
2009-03-01 19:07:20 +00:00
Gregory John Casamento
26e2eb86ea * Source/GSLayoutManager.m: do not return (0,0) when a zero length
range is passed into glyphRangeForCharacterRange:
	actualCharacterRange:.  Tests on Mac OS X indicate that this is
	a valid case.
	* Source/GSNibLoading.m: Fixed some memory leaks.
	* Source/NSRulerMarker.m: Use the bounds of the containing view 
	instead of markersRect.   I will revisit if the _markersRect method
	needs to be corrected, but this code seems to correct problems 
	observed when dragging markers in and out of the rulerView.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27986 72102866-910b-0410-8b05-ffd578937521
2009-02-26 05:42:09 +00:00
Gregory John Casamento
e6719574e3 * Source/GSNibLoading.m: Rollback of previous change. Found a
minor problem.
	* Source/NSDrawer.m: Improvements to NSDrawer handling.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27911 72102866-910b-0410-8b05-ffd578937521
2009-02-18 07:38:02 +00:00
Gregory John Casamento
32c4192f32 * Source/GSNibLoading.m: use the new code committed to NSMenu to
lay out the menu when vertical.  Get rid of the duplicate code here.
	* Source/NSDrawer.m: set the child window position when opening.
	* Source/NSMatrix.m: -_selectCell:atRow:column: Check to make 
	sure the selectedRow and selectedColumn are > -1.  This check is 
	done elsewhere and was not done here.  This was causing a crash.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27907 72102866-910b-0410-8b05-ffd578937521
2009-02-18 04:04:13 +00:00
Gregory John Casamento
d0d81bf1b1 * Source/GSNibLoader.m: Correct the message to indicate an issue
loading a nib, not a gorm, file.
	* Source/GSNibLoading.m: Uncomment the release in the dealloc
	method.
	* Source/NSApplication.m: Restrict the icon size to the size of the
	miniwindow if it's larger, but don't expand it, if it's smaller.
	* Source/NSLayoutManager.m: -initWithCoder: Initialize when 
	loading a nib in the same way that we initialize when loading 
	a gorm file.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27775 72102866-910b-0410-8b05-ffd578937521
2009-02-04 06:48:06 +00:00
Fred Kiefer
a423d5bdec Fix retain bug in NIB loading.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27772 72102866-910b-0410-8b05-ffd578937521
2009-02-03 22:43:12 +00:00
Gregory John Casamento
17d4f28e9e This is a temporary change. Commenting out RELEASE(_connections) will be reverted ASAP.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27706 72102866-910b-0410-8b05-ffd578937521
2009-01-27 20:33:17 +00:00
Richard Frith-MacDonald
ab54f4450e per-window menu setting tweaks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27686 72102866-910b-0410-8b05-ffd578937521
2009-01-25 13:47:30 +00:00
Gregory John Casamento
c0cc549d52 More documentation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27580 72102866-910b-0410-8b05-ffd578937521
2009-01-12 15:20:03 +00:00
Gregory John Casamento
dfa6ca0301 * Source/GSNibLoading.m: Reorganization and simplification of
nib loading logic in NSIBObjectData.  Also documentation for 
	NSIBObjectData and NSClassSwapper.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27575 72102866-910b-0410-8b05-ffd578937521
2009-01-12 01:44:39 +00:00
Fred Kiefer
326aaadef2 Add type casts to keep compiler happy.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27481 72102866-910b-0410-8b05-ffd578937521
2008-12-31 16:49:46 +00:00
Gregory John Casamento
555fc13e2e * Source/GSNibLoading.m: Read objects/accessibility and oids
maps if we are in a gui builder so that data is accessible.
        * Source/NSActionCell.m: Don't archive target/action if they
        have no values.
        * Source/NSMenu.m: Only archive as "_NSMainMenu" if it has
        no parent and is not owner by a popup.
        * Source/NSPopUpButtonCell.m: Archive the default menu item
        which will show when this popup is displayed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27363 72102866-910b-0410-8b05-ffd578937521
2008-12-21 03:11:08 +00:00
Gregory John Casamento
c6ba3b8f8b * Source/GSNibLoading.m: Remove change which resets the bounds
in NSCustomView as it was not needed and caused issues in some 
	cases.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27326 72102866-910b-0410-8b05-ffd578937521
2008-12-18 02:14:02 +00:00
Gregory John Casamento
69d27431a9 * Source/GSNibLoading.m: Correct issue with setting next key view and
previous key view.
	* Source/NSView.m: Comment out frame/bounds matrix calculation since they
	are done when needed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27317 72102866-910b-0410-8b05-ffd578937521
2008-12-17 00:36:12 +00:00
Gregory John Casamento
941c0684cb * Source/GSNibLoading.m: Changes to initialize bounds in
NSCustomView.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27316 72102866-910b-0410-8b05-ffd578937521
2008-12-16 22:17:27 +00:00
Gregory John Casamento
21cf915c13 * Source/GSNibLoading.m: Make the log ino debug in awakeFromNib
* Source/NSApplication.m: Allow modal to end multiple times, per spec
        there is no exception for doing this.
        * Source/NSPasteboard.m: Allow multiple threads in pasteboard
        communication.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27306 72102866-910b-0410-8b05-ffd578937521
2008-12-16 18:59:26 +00:00
Gregory John Casamento
b10f360ccb * Source/GSNibLoading.m: remove extraneous awakeFromNib call in
nibInstantiateWithOwner:topLevelObjects:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27299 72102866-910b-0410-8b05-ffd578937521
2008-12-16 00:43:42 +00:00
Gregory John Casamento
214c745d1c * Headers/Additions/GNUstepGUI/GSNibLoading.h: Added methods to header
which were added during refactoring.
        * Source/GSNibLoading.m: Corrections to NSCustomView, refactoring.
        Changes to initialization logic to call awakeFromNib.
        * Source/NSBundleAdditions.m: Cleanup to move code to the nib loading
        code.
        * Source/NSClipView.m: Added assertion to guarantee that no
        NSCustomView is unarchived at time of initWithCoder: being called.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27298 72102866-910b-0410-8b05-ffd578937521
2008-12-15 23:34:09 +00:00
Gregory John Casamento
05bec8c892 * Headers/Additions/GNUstepGUI/GSNibLoading.h: Added new method
nibInstantiateWithCoder: to do the initialization normally done
        in NSView when not in IB/Gorm.
        * Source/GSNibLoading.m: Added implementation of new method and
        also re-wrote part of NSCustomView.
        * Source/NSView.m: Added an NSAssert to assure that no subview
        ever decoded is an NSCustomView.
---
Moved decoding of custom view attributes here so that it can cleanly initialize everything to ensure that the view works properly.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27281 72102866-910b-0410-8b05-ffd578937521
2008-12-12 07:03:48 +00:00
Gregory John Casamento
ec503ee59d * Source/GSNibLoading.m: Change code which adds subviews to use
an enumerator.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27273 72102866-910b-0410-8b05-ffd578937521
2008-12-10 07:26:06 +00:00
Gregory John Casamento
8068661f12 * Source/GSNibLoading.m: Add back code with adds in subviews from
the custom view.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27272 72102866-910b-0410-8b05-ffd578937521
2008-12-10 06:48:43 +00:00
Gregory John Casamento
2e585bc667 * Source/GSNibLoading.m: (-[NSCustomView initWithCoder:]) replace
with real object and also replace in the coder.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27271 72102866-910b-0410-8b05-ffd578937521
2008-12-10 06:32:08 +00:00
Gregory John Casamento
09955c2002 * Source/GSNibLoading.m: Check to make sure the menu has more than
0 entries in _setMain:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27206 72102866-910b-0410-8b05-ffd578937521
2008-12-04 03:33:02 +00:00
Gregory John Casamento
0425232826 * Source/GSNibLoading.m: Added some new methods to address
bug #24985.
	* Source/NSMenu.m: Removed some spaces after a close brace.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27196 72102866-910b-0410-8b05-ffd578937521
2008-12-03 04:52:06 +00:00
Gregory John Casamento
7e2e7607b5 * Source/GSNibLoading.m
* Source/NSButtonCell.m
	* Source/NSNibAXAttributeConnector.m
	* Source/NSNibAXRelationshipConnector.m
	* Source/NSNibBindingConnector.m
	* Source/NSNib.m
	* Source/NSProgressIndicator.m: Change to use new headers.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27189 72102866-910b-0410-8b05-ffd578937521
2008-12-02 07:27:14 +00:00
Gregory John Casamento
252c5e6ccd * Headers/Additions/GNUstepGUI/GSNibCompatibility.h: Remove
* Headers/Additions/GNUstepGUI/GSNibTemplates.h: Remove 
	* Source/GNUmakefile: Update to reference new files.
	* Source/GSGormLoader.m: Change to reference the 
	* Source/GSGormLoading.m: New gorm loading file.
	* Source/GSNibCompatibility.m: Removed.
	* Source/GSNibLoader.m: Reference the new file.
	* Source/GSNibLoading.m: New file containing the nib loading logic.
	* Source/GSNibTemplates.m: Removed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27188 72102866-910b-0410-8b05-ffd578937521
2008-12-02 07:05:19 +00:00
Renamed from Source/GSNibCompatibility.m (Browse further)