Commit graph

6956 commits

Author SHA1 Message Date
Gregory John Casamento
28a429af26 Revert last change and add temporary fix for crash.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33236 72102866-910b-0410-8b05-ffd578937521
2011-06-03 05:00:50 +00:00
Gregory John Casamento
f9488e2af4 Use the NSArchiver to copy the menu since the copy method does not do a deep enough copy.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33234 72102866-910b-0410-8b05-ffd578937521
2011-06-02 20:22:39 +00:00
Wolfgang Lux
12865cbdb9 Ensure that applications get a proper app icon under WindowMaker even
when their main nib contains visible at launch time windows.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33231 72102866-910b-0410-8b05-ffd578937521
2011-06-02 08:45:07 +00:00
Riccardo Mottola
c4b717c08a revert image but with correct DPI of 72
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33216 72102866-910b-0410-8b05-ffd578937521
2011-05-31 15:59:27 +00:00
Riccardo Mottola
31405c56f5 revert image but with correct DPI of 72
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33215 72102866-910b-0410-8b05-ffd578937521
2011-05-31 15:59:19 +00:00
Wolfgang Lux
78fb85fbcf Fix management of windows whose hide on deactivate attribute is set.
In particular, such windows remain ordered out when the application
orders them out while it is not active and then is activated again.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33213 72102866-910b-0410-8b05-ffd578937521
2011-05-31 09:59:48 +00:00
Wolfgang Lux
31ff24d0c6 Improve implementation of NSImage -bestRepresentationForDevice: for
images with multiple representations and fix a related bug.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33211 72102866-910b-0410-8b05-ffd578937521
2011-05-31 07:35:57 +00:00
Gregory John Casamento
cef0eae50a Minor correction.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33201 72102866-910b-0410-8b05-ffd578937521
2011-05-30 00:40:15 +00:00
Gregory John Casamento
b3c789309a * Source/GNUmakefile: Remove NSManagedObjectContext.[hm] from compile
* Source/NSManagedObjectContext.h
	* Source/NSManagedObjectContext.m: Delete
	* Source/NSObjectController.m: Remove #import and add @class 
	declaration.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33200 72102866-910b-0410-8b05-ffd578937521
2011-05-30 00:36:50 +00:00
Fred Kiefer
7606bc7007 Use rint instead of round.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33195 72102866-910b-0410-8b05-ffd578937521
2011-05-29 18:50:43 +00:00
David Chisnall
70f33d157b Added ChangeLog entry from last commit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33151 72102866-910b-0410-8b05-ffd578937521
2011-05-27 14:09:16 +00:00
David Chisnall
cebd150ee1 Don't create a zone in GC mode (detected at run time). This avoids a warning
when starting GUI apps in GC mode, but should have no real effect on
functionality.

Note: this zone seems to have been created for OpenStep compatibility, but then
we don't actually use it anywhere.  The Cocoa docs say that this is 'The zone
from which NSMenu objects should be allocated', but we allocate NSMenu objects
from the default malloc zone.  

Fred: I think the correct thing to do here is probably to just return
NSDefaultMallocZone() from +menuZone in all modes.  Can you take a look and
see?



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33150 72102866-910b-0410-8b05-ffd578937521
2011-05-27 14:08:35 +00:00
David Chisnall
c3ab6f122e Added ChangeLog entry from last commit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33147 72102866-910b-0410-8b05-ffd578937521
2011-05-27 12:44:48 +00:00
David Chisnall
b4e3915c33 Turn release messages sent to autorelease pools into drain messages. No
functionality change in non-GC mode, in GC mode it invokes a quick GC pass to
try to delete the short-lived objects.

Also deleted some [pool release] lines just before exit() or return-from-main
statements.  These cause objects to be swapped in and destructors to be run to
no benefit (the OS will reclaim this memory without requiring stuff to be
swapped in when the process exits).



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33146 72102866-910b-0410-8b05-ffd578937521
2011-05-27 12:42:37 +00:00
Fred Kiefer
4b080ec8b8 Declare a few MacOSX 10.5 methods and make
the background of the NSSplitView transparent by default.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33139 72102866-910b-0410-8b05-ffd578937521
2011-05-27 08:35:24 +00:00
Eric Wasylishen
8e6b334c1d * Source/NSImage.m (-nativeDrawInRect:...): Fix drawing images
with a source rect smaller than the entire image. This was a mistake
left by my last commit to this method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33135 72102866-910b-0410-8b05-ffd578937521
2011-05-26 20:50:50 +00:00
Eric Wasylishen
5f73c3f623 * Source/NSLayoutManager.m:
* Source/NSGraphicsContext.m:
* Headers/AppKit/DPSOperators.h:
* Headers/AppKit/NSGraphicsContext.h:
* Headers/Additions/GNUstepGUI/GSMethodTable.h:
New GSShowGlyphsWithAdvances, which replaces
GSShowGlyphs as the primitive text drawing method.
(used by -[NSLayoutManager drawGlyphsForGlyphRange:atPoint:])

Requires r33121 in -back.

Note that the advances aren't actually used by -back yet so
text output should be unchanged.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33122 72102866-910b-0410-8b05-ffd578937521
2011-05-26 03:55:55 +00:00
Eric Wasylishen
07ee1e9f6c * Source/NSComboBoxCell.m: Correct positioning of popup window when
a scale factor is in use.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33120 72102866-910b-0410-8b05-ffd578937521
2011-05-25 23:45:19 +00:00
Eric Wasylishen
4736b353dc Add a FIXME to NSLayoutManager
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33118 72102866-910b-0410-8b05-ffd578937521
2011-05-25 21:47:30 +00:00
David Chisnall
4f1f0f90f0 Added ChangeLog entry from last commit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33112 72102866-910b-0410-8b05-ffd578937521
2011-05-25 11:19:44 +00:00
David Chisnall
2ccfbde833 Change direct references to the isa pointer to calls to object_getClass(). In
discussion with Steve Naroff (before he left Apple) it was decided that the isa
pointer should be regarded as an implementation detail and not part of the
language, so direct references to it are deprecated (on OS X).  This gives the
runtime a bit more freedom to do secret isa-swizzling tricks.

I've had these changes sitting in my copy for ages - no idea why they weren't
committed.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33111 72102866-910b-0410-8b05-ffd578937521
2011-05-25 11:19:09 +00:00
Fred Kiefer
1964b0d902 Clean up the code and the GNUmakefile of the say tool.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33091 72102866-910b-0410-8b05-ffd578937521
2011-05-23 11:29:52 +00:00
Fred Kiefer
f881df45ed Add OSX 10.5 methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33081 72102866-910b-0410-8b05-ffd578937521
2011-05-21 22:18:22 +00:00
Fred Kiefer
f4a8cab41b * Source/NSView.m (-setSubviews:): New method.
Code by Banlu Kemiyatorn <object@gmail.com>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33068 72102866-910b-0410-8b05-ffd578937521
2011-05-19 08:19:13 +00:00
Fred Kiefer
2608a790ed Method to get all images from an ICNS file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33062 72102866-910b-0410-8b05-ffd578937521
2011-05-18 20:07:02 +00:00
Fred Kiefer
6c54fd6be5 Remove most uses of the method [NSView -removeSubview:].
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33047 72102866-910b-0410-8b05-ffd578937521
2011-05-15 14:42:08 +00:00
Eric Wasylishen
d199cb565e * Source/NSTextView.m: Use pointing hand cursor for links
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33043 72102866-910b-0410-8b05-ffd578937521
2011-05-15 06:55:33 +00:00
Eric Wasylishen
360c974c4e * Source/NSTableHeaderView.m: Use resize cursors
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33042 72102866-910b-0410-8b05-ffd578937521
2011-05-15 05:48:22 +00:00
Eric Wasylishen
7e17fa5ca5 * Source/NSTextView.m: Use IBeam cursor if selectable
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33041 72102866-910b-0410-8b05-ffd578937521
2011-05-15 05:03:14 +00:00
Eric Wasylishen
d84b435d98 * Source/NSSplitView.m: Use resize cursors
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33040 72102866-910b-0410-8b05-ffd578937521
2011-05-15 04:24:20 +00:00
Fred Kiefer
947ed83d99 Partial fix for bug #32845
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33038 72102866-910b-0410-8b05-ffd578937521
2011-05-14 18:00:13 +00:00
Fred Kiefer
dfa18a81da * Source/GSXibLoader.m: Add support for the "array" and
"dictionary" elements found in newer XIB files (Version >= 8).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33022 72102866-910b-0410-8b05-ffd578937521
2011-05-11 08:53:31 +00:00
Eric Wasylishen
18a1c91c6c * Source/Functions.m: For functions which set the fill or stroke
color as part of their implementation, save/restore the graphics
state so that the user's fill/stroke color isn't overwritten.
See the PixelExactDrawing test in GSTest for an example.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33021 72102866-910b-0410-8b05-ffd578937521
2011-05-11 07:53:04 +00:00
Eric Wasylishen
ea05d7fa37 * Source/NSButtonCell.m (-drawImage:withFrame:inView:): Align
the point at which the image is drawn to the nearest pixel.

r32895 which reimplemented -[NSImage composite..] methods
on top of -[NSImage draw...] methods means that drawing
images with -compositeToPoint: no longer pixel-aligns
the image automatically. The new behaviour matches
Cocoa, however.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33002 72102866-910b-0410-8b05-ffd578937521
2011-05-07 21:37:14 +00:00
Eric Wasylishen
5b0bfe8f6e 011-05-07 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSView.m (-convertPoint:toView:): Correct this
	method; it was applying the transforms backwards :-(


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33001 72102866-910b-0410-8b05-ffd578937521
2011-05-07 21:30:25 +00:00
Eric Wasylishen
c241019926 * Tests/gui/NSView/NSView_frame_bounds.m: Add some more tests
of setBoundsSize:. They are currently failing (but pass on
OS X).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32990 72102866-910b-0410-8b05-ffd578937521
2011-05-06 01:01:21 +00:00
Eric Wasylishen
d5c2d502e2 2 more high-res images
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32981 72102866-910b-0410-8b05-ffd578937521
2011-05-04 20:14:47 +00:00
Eric Wasylishen
95263d9d43 * Images: Add a few more high-res images (arrows)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32977 72102866-910b-0410-8b05-ffd578937521
2011-05-04 10:16:26 +00:00
Eric Wasylishen
ce051d9bd8 * Source/NSScreen.m: Use -userSpaceScaleFactor to calculate
NSDeviceResolution
* Source/NSImage.m: Implement -_bestRep:withResolutionMatch:
* Images/common_Dimple.tiff:
* Images/common_3DArrowRight.tiff: Add to these images
a second 'page' at 4x the original resolution which I drew.

If you use GSScaleFactor > 1 then the high resolution version
of these images should be used.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32975 72102866-910b-0410-8b05-ffd578937521
2011-05-04 01:33:21 +00:00
Eric Wasylishen
2873a337e6 * Images: Ensure all images have their DPI metadata set to 72.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32965 72102866-910b-0410-8b05-ffd578937521
2011-05-01 22:57:08 +00:00
Eric Wasylishen
b384d732ff * Source/NSLayoutManager.m
(-characterIndexMoving:fromCharacterIndex:originalCharacterIndex:distance:):
Rework this method to suport moving the insertion point between text
containers, for both left/right and up/down movements. However, it will
only have this behaviour when distance == 0.

This is part of what is needed to support moving the insertion point
between text views in, e.g., TextEdit when using the multi-page view.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32964 72102866-910b-0410-8b05-ffd578937521
2011-05-01 22:06:45 +00:00
Eric Wasylishen
b00942ae92 * Source/NSView.m (-updateBoundsMatrix):
Fix a bug where updateBoundsMatrix would refuse to restore a
view's scale to its original value, after a modified bounds rect
had been set.
* Source/NSView.m (-setBounds:, -setBoundsOrigin:, -setBoundsSize:):
Call [self setNeedsDisplay: YES]; at the ends of these methods.
While the Cocoa docs explicitly say that calling these methods
won't mark the view as needing redisplay, this doesn't seem to
be true in practice.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32955 72102866-910b-0410-8b05-ffd578937521
2011-04-30 06:40:14 +00:00
Eric Wasylishen
019d81dc22 * Source/NSOutlineView.m: Implement -keyDown: to expand/contract
items.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32954 72102866-910b-0410-8b05-ffd578937521
2011-04-30 05:46:44 +00:00
Eric Wasylishen
a3fe4dcbec * Source/NSTextView.m (-mouseDown:):
Add support for making selections with the mouse which span multiple
text views
* Source/NSTextView.m (-setSelectedRange:affinity:stillSelecting:):
Replace the complex display invalidation code with two calls to
-[NSLayoutManager invalidateDisplayForCharacterRange:], which will
take care to invalidate all necessary text views.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32953 72102866-910b-0410-8b05-ffd578937521
2011-04-30 04:49:51 +00:00
Eric Wasylishen
e4458742a1 * Source/NSTextView.m (-setTypingAttributes:) Guard against
nil layout manager


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32952 72102866-910b-0410-8b05-ffd578937521
2011-04-30 04:30:45 +00:00
Eric Wasylishen
63b253d53f * Source/NSPopUpButtonCell.m: Override -representedObject and
-setRepresentedObject: with implementations that delegate the
call to [self selectedItem] (the NSMenuItem).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32943 72102866-910b-0410-8b05-ffd578937521
2011-04-29 00:17:01 +00:00
Eric Wasylishen
ea58698be4 * Source/NSTextView.m (-selectionRangeForProposedRange:granularity:):
Remove a special case which caused this method to refuse to
expand a range {[string length], 0}.
This was why the align left/center/right menu items didn't work
in Ink when the insertion point was at the end of a document.
The behaviour should match OS X now.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32935 72102866-910b-0410-8b05-ffd578937521
2011-04-27 09:19:53 +00:00
Eric Wasylishen
a2f673e468 * Headers/AppKit/NSSavePanel.h:
* Source/NSSavePanel.m: Implement -setNameFieldStringValue:,
-nameFieldStringValue, -setNameFieldLabel:, -nameFieldLabel.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32933 72102866-910b-0410-8b05-ffd578937521
2011-04-27 04:55:22 +00:00
Eric Wasylishen
9db8881062 * Source/NSTextView.m (-setRulersVisible:): Create a horizontal ruler on
the scroll view if needed - this seems to be the OS X behaviour.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32932 72102866-910b-0410-8b05-ffd578937521
2011-04-27 04:00:33 +00:00
Eric Wasylishen
2042ff816c * Source/NSImage.m (-nativeDrawInRect:...): Fix a bug in my recent change
here which mis-positioned images.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32921 72102866-910b-0410-8b05-ffd578937521
2011-04-21 23:21:44 +00:00