Commit graph

5184 commits

Author SHA1 Message Date
Fred Kiefer
9d0b8b4dfd * Source/NSMenu.m (-setMain:): Remove the in-window menu when
switching to a theme without that.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34652 72102866-910b-0410-8b05-ffd578937521
2012-01-29 00:43:50 +00:00
Fred Kiefer
899ce772cb * Source/NSMenu.m (-performActionForItemAtIndex:): Check for the
popup button cell and its action, before checking for the item
action. This caused a problem due to NIB decoding changes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34642 72102866-910b-0410-8b05-ffd578937521
2012-01-26 22:38:50 +00:00
Fred Kiefer
2d2026e7fc Revert last change and replace with something a little bit better. The
whole ruler handling will need some deeper inspection.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34636 72102866-910b-0410-8b05-ffd578937521
2012-01-26 09:25:29 +00:00
Doug Simons
3e7c9bceef Call setClientView: before calling setMarkers: to fix a problem when a textView's text is set or changed when the textView is not the first responder, such as at windowControllerDidLoadNib: time.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34633 72102866-910b-0410-8b05-ffd578937521
2012-01-25 23:28:51 +00:00
Eric Wasylishen
cbf7bc52a9 * Source/NSImage.m (+imageNamed:): Don't try to look up path
if called with nil (just return nil).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34632 72102866-910b-0410-8b05-ffd578937521
2012-01-25 23:25:14 +00:00
Eric Wasylishen
d81df878a5 * Source/NSClipView.m: Disable copy-on-scroll until after release
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34631 72102866-910b-0410-8b05-ffd578937521
2012-01-25 22:17:53 +00:00
Eric Wasylishen
e1aff0a971 * Source/NSClipView (-constrainScrollPoint:): Revert last change
until after the release.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34630 72102866-910b-0410-8b05-ffd578937521
2012-01-25 22:13:58 +00:00
Fred Kiefer
7c3ae3029d * Source/NSSecureTextField.m: Add GSSimpleSecureGlyphGenerator and
use this to generate the bullet glyphs.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34622 72102866-910b-0410-8b05-ffd578937521
2012-01-24 10:40:13 +00:00
Eric Wasylishen
fe39394d44 * Source/NSClipView.m (-constrainScrollPoint:): Restore old code
which correctly rounded the scroll point to an integer point in
device-space. It seems the correct code was commented out in 2002,
perhaps as a performance optimisation?


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34614 72102866-910b-0410-8b05-ffd578937521
2012-01-24 01:33:17 +00:00
Fred Kiefer
d570812401 Fix clang compiler warnings as reported by Sebastian Reitenbach
<sebastia@l00-bugdead-prods.de>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34608 72102866-910b-0410-8b05-ffd578937521
2012-01-23 14:27:58 +00:00
Eric Wasylishen
d55752b22c * Source/NSView.m (-setBounds:, -setBoundsOrigin:, -setBoundsSize:):
Revert a portion of r32955 which I committed last april but I now
see was a mistake, and I just discovered is breaking the  copy-on-scroll
behaviour of NSClipView - we end up always redrawing the entire visible
portion of the document view right now.

In r32955 I added [self setNeedsDisplay: YES] calls to these methods
even though these are documented explicitly as not marking the view for
needing display. Approved by Fred for commit during the code freeze.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34606 72102866-910b-0410-8b05-ffd578937521
2012-01-21 19:15:51 +00:00
Germán Arias
13f1a53070 Fix bug #35335
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34599 72102866-910b-0410-8b05-ffd578937521
2012-01-20 06:10:03 +00:00
Fred Kiefer
ace1561e52 * Source/NSCell.m (-setStringValue:, setObjectValue:): Always use
ASSIGNCOPY for the contents. This fixes memory leak of last commit.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34585 72102866-910b-0410-8b05-ffd578937521
2012-01-19 08:47:52 +00:00
Riccardo Mottola
9603f29b84 Copy contents before setting it [setObjectValue]
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34584 72102866-910b-0410-8b05-ffd578937521
2012-01-19 00:40:47 +00:00
Fred Kiefer
62f2a5af94 * Headers/AppKit/NSImageView.h,
* Source/NSImageView.m: Protect image drag with new ivar that
gets set via a new GNUstep extension method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34580 72102866-910b-0410-8b05-ffd578937521
2012-01-18 21:03:37 +00:00
Eric Wasylishen
7da6d417a7 * Source/NSImageCell.m (-drawInteriorWithFrame:inView:):
Draw image with 50% opacity if the cell is disabled


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34548 72102866-910b-0410-8b05-ffd578937521
2012-01-15 21:35:47 +00:00
Eric Wasylishen
1b70ae827a * Source/NSTableColumn.m (-initWithIdentifier:): Make data
cell editable by default.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34547 72102866-910b-0410-8b05-ffd578937521
2012-01-15 21:34:40 +00:00
Richard Frith-MacDonald
db92916b2f Attempt to get gnome and windows themes working again.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34528 72102866-910b-0410-8b05-ffd578937521
2012-01-14 17:55:43 +00:00
Richard Frith-MacDonald
28460f68e4 Cleanup/simplify code for handling theme names in defaults system
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34527 72102866-910b-0410-8b05-ffd578937521
2012-01-14 16:10:48 +00:00
Fred Kiefer
6149707b77 * Source/GSStandardWindowDecorationView.m (-mouseDown:): Pass the
event on to the super implementation if we don't handle it.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34500 72102866-910b-0410-8b05-ffd578937521
2012-01-12 09:42:03 +00:00
Fred Kiefer
e2884bafce * Source/NSImage.m (+_clearFileTypeCaches): Use DESTROY instead of
RELEASE.
Patch by Philippe Roussel <p.o.roussel@free.fr>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34492 72102866-910b-0410-8b05-ffd578937521
2012-01-11 08:12:43 +00:00
Eric Wasylishen
53ac9ad559 * Source/NSImage.m: Remove duplicate #import
* Source/NSImage.m: Correct _clearFileTypeCaches notification
method to take a NSNotification* parameter.
* Soure/NSImage.m (themeDidActivate:): Move to a class method,
and move the GSThemeDidActivateNotification subscription
to +[NSImage initialize]. Now the +_themeDidActivate: updates
all images by looking at all the values in nameDict. This should
function exactly the same as before, but seems to be quite a bit
faster due to fewer notifications being sent (?)
* Source/NSImage.m (+imageNamed:): Remove redundant fetch from
nameDict pointed out by Fred


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34482 72102866-910b-0410-8b05-ffd578937521
2012-01-10 19:16:46 +00:00
Eric Wasylishen
378ca9230e * Source/NSImage.m (+pathForImageNamed:): Add underscore and
move to private category. Also remove use of lock as it is
unnecessary
* Source/NSImage.m: (-themeDidActivate:): Extract method
_resetAndUseFromFile:. Don't reset _size if
flags.sizeWasExplicitlySet was true.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34481 72102866-910b-0410-8b05-ffd578937521
2012-01-10 18:55:57 +00:00
Eric Wasylishen
f2fe6fead5 * Source/NSOpenPanel.m: Rewrite/simplify selection handling,
fix bug reported by Riccardo where OK button is disabled when
selecting directories after selecting a file.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34480 72102866-910b-0410-8b05-ffd578937521
2012-01-10 18:42:04 +00:00
Eric Wasylishen
bfd7621ba5 * Source/GSGhostscriptImageRep.m: Add missing ASSIGN
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34479 72102866-910b-0410-8b05-ffd578937521
2012-01-10 18:39:34 +00:00
Eric Wasylishen
bff0f57b54 * Source/GSTheme.m: Remove code which sets and unsets images
on theme activation/deactivation.
* Source/NSImage.m (+imageNamed:): Factor out code for finding
the path for a name to a separate method, +pathForImageNamed.
The code is unchanged otherwise, except for fixing the retrieval
of images from the theme bundle, which was broken.
* Source/NSImage.m (-setName:): Remove code for creating theme
proxy. Subscribe/unscribe to theme change notification when
the receiver is added/removed from the name dictionary.
* Source/NSImage.m (-themeDidActivate:): Method called in
response to a GSThemeDidActivateNotification on images with
a name set. It does a path lookup in the same way that
+imageNamed: would, and checks if the path has changed due
to the theme change. If it has, all reps are discarded and
the image at the new path is loaded. This avoids the need for
the theme proxy objects.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34474 72102866-910b-0410-8b05-ffd578937521
2012-01-10 04:38:10 +00:00
Fred Kiefer
82eac9eaf0 Declare the new method
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34470 72102866-910b-0410-8b05-ffd578937521
2012-01-09 14:40:45 +00:00
Fred Kiefer
93403780f3 Cache the file type results for the image reps and clear the cache when these change.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34469 72102866-910b-0410-8b05-ffd578937521
2012-01-09 14:39:50 +00:00
Fred Kiefer
c1a3a4549b Raise an exception if the PPD file cannot be read. Change make based on
request by Riccardo on the mailing list.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34397 72102866-910b-0410-8b05-ffd578937521
2012-01-03 09:18:51 +00:00
Wolfgang Lux
95c5829fa5 Fix two incorrect comparisons in NSLayoutManager which were causing
range exceptions when moving the cursor up in the first line and down
in the last line of a NSTextView, respectively.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34375 72102866-910b-0410-8b05-ffd578937521
2012-01-01 11:29:20 +00:00
Eric Wasylishen
4eac748b62 * Source/NSPrintOperation.m (_print): Fix read of uninitialized
variable, which was breaking printing of wrap-to-page mode in
TextEdit. TODO: Run the printing code through valgrind, there is
a lot of suspicious code.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34373 72102866-910b-0410-8b05-ffd578937521
2011-12-31 22:37:55 +00:00
Wolfgang Lux
cc31ecbeda Change the default text container inset for NSTextView to (0,0) to
reduce blank space around text.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34367 72102866-910b-0410-8b05-ffd578937521
2011-12-29 22:16:50 +00:00
Wolfgang Lux
b046febc21 Get the insertion point rectangle right for character index 0.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34364 72102866-910b-0410-8b05-ffd578937521
2011-12-29 18:34:27 +00:00
Wolfgang Lux
0da1b1f034 Adjust the minimum and maximum sizes of a NSTextView to ensure that
the minimum size is not greater than the current size and the maximum
size is not smaller than the current size.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34362 72102866-910b-0410-8b05-ffd578937521
2011-12-29 16:48:17 +00:00
Eric Wasylishen
2f0f50cc95 Undo last change as it broke Graphos printing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34353 72102866-910b-0410-8b05-ffd578937521
2011-12-23 21:22:41 +00:00
Eric Wasylishen
d374f0acae * Source/NSView.m (-beginPageInRect:atPlacement:): Always translate
by the placement value. Previously, we would translate only if the
rect parameter was empty, which doesn't make sense to me.
This fixes the bug where the last page of a document printed from
Ink/TextEdit was incorrectly positioned at the bottom of the
printed page.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34352 72102866-910b-0410-8b05-ffd578937521
2011-12-23 20:33:19 +00:00
Fred Kiefer
e740f7b0cc * Source/NSTextView.m (-setFieldEditor:): Use different values for
both cases.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34347 72102866-910b-0410-8b05-ffd578937521
2011-12-22 22:00:42 +00:00
Eric Wasylishen
30a76f4458 * Source/NSSavePanel.m (-browser:createRowsForColumn:inMatrix:):
Set icon size based on cell's cellSize


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34346 72102866-910b-0410-8b05-ffd578937521
2011-12-22 19:08:47 +00:00
Fred Kiefer
12bbf00d16 Removed a few compiler warnings found by gcc 4.6
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34344 72102866-910b-0410-8b05-ffd578937521
2011-12-22 09:16:04 +00:00
Eric Wasylishen
52b39d8923 * Source/NSBrowserCell.m (-drawInteriorWithFrame:inView:):
Restore code to draw the background when the cell is highligted


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34337 72102866-910b-0410-8b05-ffd578937521
2011-12-21 06:43:42 +00:00
Eric Wasylishen
b2e98ecb59 * Source/NSSavePanel.m (-browser:createRowsForColumn:inMatrix:):
Set file icons on browser cells in the open/save panels.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34322 72102866-910b-0410-8b05-ffd578937521
2011-12-19 01:00:07 +00:00
Eric Wasylishen
3445284ccc * Source/NSBrowserCell.m (-drawInteriorWithFrame:inView:):
When highlighted, use -image if -alternateImage is nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34321 72102866-910b-0410-8b05-ffd578937521
2011-12-19 00:54:49 +00:00
Eric Wasylishen
d8ed82a8a8 * Source/NSTableView.m (-_isCellEditableColumn:row:): Tweak
criteria for determining cell editability::
- the delegate (if present) must say YES
- and the cell itself must return YES for isEditable
- and the table column must return YES for isEditable
Previously you could edit cells that returned NO for
isEditable if the column they were in was editable.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34320 72102866-910b-0410-8b05-ffd578937521
2011-12-19 00:18:58 +00:00
Eric Wasylishen
0c1a040bda * Source/NSTableHeaderView.m (-initWithCoder:): Remove unneeded
"_tableView = nil" which was causing a problem with my xib file.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34319 72102866-910b-0410-8b05-ffd578937521
2011-12-18 23:57:39 +00:00
Eric Wasylishen
58c670f346 * Source/NSBrowserCell.m (-image, -setImage:): Override NSCell
implementation so these methods work without requiring the
cell to be an image cell.
* Source/NSBrowserCell.m (-drawInteriorWithFrame:inView:): Don't
draw background. Remove -(void) isOpaque { return YES; }. Also
pixel-align images and use modern -drawInRect: method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34317 72102866-910b-0410-8b05-ffd578937521
2011-12-18 22:16:20 +00:00
Fred Kiefer
a17f42c6da * Source/NSOutlineView.m (-_openItem:): Changed i fron NSUInteger
to NSInteger.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34316 72102866-910b-0410-8b05-ffd578937521
2011-12-18 21:06:31 +00:00
Fred Kiefer
c35a95998d Make the same change in NSDrawer and also switch to CGFloat.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34314 72102866-910b-0410-8b05-ffd578937521
2011-12-17 20:29:09 +00:00
Fred Kiefer
8ad4aa86c4 Replace some occurences of int with NSInteger
and unsigned with NSUInteger. This allows to recompile gui on 
64 bit systems after the change to NSNotFound in base.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34312 72102866-910b-0410-8b05-ffd578937521
2011-12-17 17:16:09 +00:00
Eric Wasylishen
10ee7a4dd2 * Source/NSPrintPanel.m:
Move _finalWritePrintInfo: call to the end of _pickedButton:. This
fixes the save and preview buttons for me.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34294 72102866-910b-0410-8b05-ffd578937521
2011-12-15 18:31:34 +00:00
Eric Wasylishen
e395fe88d7 * Source/NSPrinter.m:
* Source/NSPrintOperation.m:
* Source/NSPageLayout.m:
* Source/NSPrintInfo.m:
* Headers/AppKit/NSPrintInfo.h: Migrate printing code to CGFloat
or double.
* Source/NSTextView.m: Rewrite -adjustPageHeightNew🔝bottom:limit:


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34288 72102866-910b-0410-8b05-ffd578937521
2011-12-15 06:51:02 +00:00