Commit graph

62 commits

Author SHA1 Message Date
Gregory John Casamento
6c8691a082 Remove some warnings and unused functions, finish implementation of encoding. 2020-04-24 04:29:15 -04:00
fredkiefer
d7676fb7c2 Use decodeSizeForKey:. 2020-01-12 21:00:00 +01:00
Fred Kiefer
ff61d4c642 2015-09-13 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTextView.m: Invalidate insertion point timer in
        dealloc.
        * Source/NSToolbarItem.m: Check for drawing rect within bounds
        before drawing toolbar item.
        Patch by Marcian Lytwyn <gna@advcsi.com>.

2015-09-10  Doug Simons <doug.simons@testplant.com> and Paul Landers
<paul.landers@testplant.com>

        * Source/NSLayoutManager.m: Fix a bug that would try to adjust
        the length of the selected range to a negative number, leading
        to an exception and eventual crashes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38986 72102866-910b-0410-8b05-ffd578937521
2015-09-13 21:36:40 +00:00
Sebastian Reitenbach
6d5a0cc236 A bunch of format string fixes and some casts to force formats
No objections from Fred Kiefer ;)



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38569 72102866-910b-0410-8b05-ffd578937521
2015-05-26 17:15:16 +00:00
Fred Kiefer
4d8a91d0e0 * Source/NSToolbarItem.m: Fix tool bar item tool tips.
Patch by Marcian Lytwyn <gna@advcsi.com>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38226 72102866-910b-0410-8b05-ffd578937521
2014-12-02 22:34:07 +00:00
Fred Kiefer
7c8eda0462 2013-04-02 Frank Le Grand <frank.legrand@testplant.com>
* Source/NSToolbarItem.m: Fixed a bug where calling setImage:
          on a toolbar item would draw the image even if the toolbar
          display mode would be set to NSToolbarDisplayModeLabelOnly
        * Source/GSToolbarCustomizationPalette.m: Turn NSLog into
          NSDebugLLog.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37782 72102866-910b-0410-8b05-ffd578937521
2014-04-02 20:55:19 +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
2992f4fa1d * Source/GSNibLoading.m:
* Source/NSToolbar.m:
* Source/GSToolbarCustomizationPalette.m:
* Source/GSToolbarView.m:
* Source/NSToolbarItem.m:
* Source/NSToolbarFrameworkPrivate.h:
* Headers/AppKit/NSToolbar.h: Implement -initWithCoder: for
NSToolbar. This required a bit more work that usual because
toolbars created with -initWithCoder can operate without a delegate.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34189 72102866-910b-0410-8b05-ffd578937521
2011-11-18 20:15:53 +00:00
Eric Wasylishen
a15066d183 * Source/NSButtonCell.m (-title): Return @"" instead of nil
* Source/NSButtonCell.m (-alternateTitle): Return @"" instead of nil
* Source/NSButtonCell.m (-attributedAlternateTitle): Use
[self alternateTitle] instead of accessing _altContents directly to guard
against _altContents being nil
* Source/NSButtonCell.m (-attributedTitle): Don't return nil. Use
[self title] instead of accessing _contents directly to guard against
_contents being nil
* Source/NSButtonCell.m (-keyEquivalent): Return @"" instead of nil
* Source/NSButtonCell.m (-encodeWithCoder):
For keyEquivelant and alternateTitle, now that the methods never return
nil, instead of checking if they return nil to decide whether to encode them,
check if the string length is > 0.
* Source/NSToolbarItem.m (-label): Return @"" instead of nil.
* Source/NSCell.m (-stringValue): Return @"" instead of nil
* Source/NSCell.m (-attributedStringValue): Don't return nil. Use
[self stringValue] instead of accessing _contents directly to guard against
_contents being nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33598 72102866-910b-0410-8b05-ffd578937521
2011-07-21 06:31:34 +00:00
Fred Kiefer
de9abfb7ee Correct the definition of NSDragOperation and all its usages.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31754 72102866-910b-0410-8b05-ffd578937521
2010-12-22 16:16:14 +00:00
Fred Kiefer
d08b23d9b0 First batch of corrections based on David's static analysis.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31337 72102866-910b-0410-8b05-ffd578937521
2010-09-12 16:34:22 +00:00
Doug Simons
24fad47739 Make toolbar resizing behavior match the Cocoa behavior
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30440 72102866-910b-0410-8b05-ffd578937521
2010-05-21 15:01:45 +00:00
Fred Kiefer
664d8a24c1 * Source/NSToolbarItem.m (-setView:): Only set the min/max size of
the toolbar item when it was zero.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30413 72102866-910b-0410-8b05-ffd578937521
2010-05-17 20:19:00 +00:00
Fred Kiefer
ed30b6221a Clean up toolbar item resizing, this now allows for resizable item other than flexible space.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30371 72102866-910b-0410-8b05-ffd578937521
2010-05-12 23:06:02 +00:00
Doug Simons
fe66919f5b Fix numerous issues with toolbar customization
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30143 72102866-910b-0410-8b05-ffd578937521
2010-04-13 21:38:31 +00:00
Fred Kiefer
7e289df84b Yet another set of #include -> #import replacement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30083 72102866-910b-0410-8b05-ffd578937521
2010-03-31 08:14:50 +00:00
Riccardo Mottola
a80bd6c0d6 use proper class check instead of quick and dirty size check for flexible space property
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29500 72102866-910b-0410-8b05-ffd578937521
2010-02-07 18:41:04 +00:00
Fred Kiefer
8603ae06ae Some more cleanup of the NSToolbarItem code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28438 72102866-910b-0410-8b05-ffd578937521
2009-08-04 20:12:35 +00:00
Gregory John Casamento
6f3f7be33c Fixes to correct issues with toolbar pallete customization.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28083 72102866-910b-0410-8b05-ffd578937521
2009-03-16 05:25:22 +00:00
Fred Kiefer
1b9732d96d Add more missing localization includes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28015 72102866-910b-0410-8b05-ffd578937521
2009-03-01 19:04:58 +00:00
Fred Kiefer
1be0d6ca24 Stripped down version of the toolbar customization
branch by Quentin Mathe <qmathe@club-internet.fr>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27835 72102866-910b-0410-8b05-ffd578937521
2009-02-10 21:02:33 +00:00
Wolfgang Lux
cdc21a5395 Fix a few issues with toolbar item validation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27626 72102866-910b-0410-8b05-ffd578937521
2009-01-18 15:11:37 +00:00
Gregory John Casamento
d2ad402045 * Source/NSToolbarItem.m: Added _sendAction: method to send
the action with the NSToolbarItem instance as the sender
	when the toolbar item is represented by an NSMenuItem. 


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27573 72102866-910b-0410-8b05-ffd578937521
2009-01-10 20:46:39 +00:00
Fred Kiefer
74d7fcffd8 Add new private header file with shared toolbar classes interfaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27503 72102866-910b-0410-8b05-ffd578937521
2009-01-02 17:24:06 +00:00
Fred Kiefer
f66a0decc7 Merge GSToolbar with NSToolbar and remove all traces of the old class.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27491 72102866-910b-0410-8b05-ffd578937521
2009-01-01 22:04:38 +00:00
Fred Kiefer
eb68ac91f1 Extension and clean up of NSToolbarItem.
Add new class NSToolbarItemGroup.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27469 72102866-910b-0410-8b05-ffd578937521
2008-12-30 22:20:21 +00:00
Fred Kiefer
0568f0a0c5 Small clean up of toolbar code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27443 72102866-910b-0410-8b05-ffd578937521
2008-12-28 15:16:05 +00:00
Adam Fedor
7afdd32ac1 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
Fred Kiefer
8576fa60d7 Undo last hack and add a slightly better on.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26250 72102866-910b-0410-8b05-ffd578937521
2008-03-08 11:11:52 +00:00
Fred Kiefer
b76f1b348c Add a recursion break hack. Needs to be cleaned up.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26249 72102866-910b-0410-8b05-ffd578937521
2008-03-08 10:45:08 +00:00
Fred Kiefer
193e31e678 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
Fred Kiefer
d8f3c46725 Made working for a flipped view.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25478 72102866-910b-0410-8b05-ffd578937521
2007-09-12 12:54:38 +00:00
Fred Kiefer
4835a35c1c Add new MacOSX methods. Code mostly by Nikolaus Schaller.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25270 72102866-910b-0410-8b05-ffd578937521
2007-06-18 21:08:54 +00:00
Fred Kiefer
e344345023 Add MaxOS 10.4 methods and required ivars to NSButtonCell, implemented
then and use this methods. Also adjusted subclasses tothis changes.
Split off theming code for buttons into two methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24400 72102866-910b-0410-8b05-ffd578937521
2007-01-23 14:17:02 +00:00
Richard Frith-MacDonald
f17b3f5143 minor tool tip tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23751 72102866-910b-0410-8b05-ffd578937521
2006-10-04 08:07:21 +00:00
Richard Frith-MacDonald
65b175b904 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
Quentin Mathe
24af0ec222 Fixed default title wrongly set with separator/space related toolbar items and toolbar items image unwittingly released (last partial fix for bug #15112)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22424 72102866-910b-0410-8b05-ffd578937521
2006-02-03 16:19:27 +00:00
Quentin Mathe
671bf31202 Modified NSToolbarItem to correctly init separator items and use the right item width in NSToolbarDisplayModeIconOnly (Fixes for bug #15112)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22169 72102866-910b-0410-8b05-ffd578937521
2005-12-15 16:59:29 +00:00
Richard Frith-Macdonald
7971a89c72 Coding style fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22019 72102866-910b-0410-8b05-ffd578937521
2005-11-16 11:34:25 +00:00
Adam Fedor
303dd1baf9 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
Quentin Mathe
f43c0326c6 Fixed the toolbar bug #11393
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20503 72102866-910b-0410-8b05-ffd578937521
2004-12-30 14:02:00 +00:00
Alexander Malmberg
811ae4cf9f * Source/GSFontInfo.m (-defaultLineHeightForFont): Adjust line
height calculation.
	* Source/NSButtonCell.m (-drawInteriorWithFrame:inView:): Always
	initialize imageRect and titleRect. Adjust the calculations to match
	the new line height.
	(-cellSize): Always initialize imageRect and titleRect.
	* Headers/AppKit/NSCell.h (-_drawImage:inFrame:isFlipped:): Remove.
	* Source/NSCell.m (-_drawImage:inFrame:isFlipped:): Remove. Move code
	back ...
	(-drawInteriorWithFrame:inView:): ... here.
	* Source/NSToolbarItem.m (+initialize): Remove.
	(+cellClass): Add.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20100 72102866-910b-0410-8b05-ffd578937521
2004-09-21 16:55:43 +00:00
Quentin Mathe
ef1010acc4 Added the possibility to rearrange toolbar items
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19976 72102866-910b-0410-8b05-ffd578937521
2004-09-02 17:40:00 +00:00
Quentin Mathe
a901114168 Fixed the toolbar layout problem introduced by NSButtonCell changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19941 72102866-910b-0410-8b05-ffd578937521
2004-08-30 21:33:17 +00:00
Quentin Mathe
6576a77429 NSToolbar visibility issue corrected
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19780 72102866-910b-0410-8b05-ffd578937521
2004-07-27 15:15:29 +00:00
Alexander Malmberg
5d0e3f4755 Fix memory leaks, -copyWithZone:, and use predefined attribute name variables.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19773 72102866-910b-0410-8b05-ffd578937521
2004-07-24 20:51:39 +00:00
Quentin Mathe
6b519561bf Forgot to commit NSToolbarItem.m and NSToolbarItem.h
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19694 72102866-910b-0410-8b05-ffd578937521
2004-07-07 23:21:10 +00:00
Quentin Mathe
031f8b56bc Toolbar improvements, include validation, border, memory leaks, selected item
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19390 72102866-910b-0410-8b05-ffd578937521
2004-05-23 18:22:45 +00:00
Quentin Mathe
3963927f9c Added color customization to the toolbar and first part of the validation support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19372 72102866-910b-0410-8b05-ffd578937521
2004-05-18 19:35:58 +00:00
Gregory John Casamento
c35f6f8821 Corrected image name
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19240 72102866-910b-0410-8b05-ffd578937521
2004-05-06 02:12:38 +00:00