Commit graph

120 commits

Author SHA1 Message Date
Marcian Lytwyn
ce265f56f8 Merge fixes and additional merges
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38682 72102866-910b-0410-8b05-ffd578937521
2015-06-25 18:51:04 +00:00
Doug Simons
7296ccf899 fix NSPopUpButtonCell to ignore the altersStateOfSelectedItem setting as in Cocoa
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38460 72102866-910b-0410-8b05-ffd578937521
2015-04-20 20:56:05 +00:00
Frank Le Grand
4b27157a46 Merged Trunk changes from rev 35219 to TestPlant branch.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36953 72102866-910b-0410-8b05-ffd578937521
2013-08-09 14:24:48 +00:00
Wolfgang Lux
1d0294acc2 Revert change from r34642 which has broken OS X compatibility and fix
sender of a pop up button's action when it is sent through one of the
menu items.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34781 72102866-910b-0410-8b05-ffd578937521
2012-02-19 16:22:49 +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
Fred Kiefer
db75526dee * Source/NSPopUpButtonCell.m (-initWithCoder:): If no selection
index is given select the first item. This should fix bug #34923.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34228 72102866-910b-0410-8b05-ffd578937521
2011-11-28 20:29:35 +00:00
Fred Kiefer
4b64d6f2f6 * Source/NSPopUpButtonCell.m (-insertItemWithTitle:atIndex:): Set
the action on the menu item to -_popUpItemAction:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34126 72102866-910b-0410-8b05-ffd578937521
2011-11-06 17:10:10 +00:00
Fred Kiefer
ba0d01b2fb * Source/NSPopUpButtonCell.m (-_popUpItemAction:): Inform bindings
of the control view that the value has changed.
Should fix bug #34492


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34099 72102866-910b-0410-8b05-ffd578937521
2011-10-31 21:48:32 +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
Wolfgang Lux
b0af15ff80 Stop observing notifications from a pop up button's menu when the
button is deallocated to prevent obscure crashes later.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32513 72102866-910b-0410-8b05-ffd578937521
2011-03-09 10:52:43 +00:00
Gregory John Casamento
529856ef33 Added NSTableView to the drawing methods for GSTheme.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31678 72102866-910b-0410-8b05-ffd578937521
2010-11-28 00:05:46 +00:00
Quentin Mathe
f4ea4a6237 For NSPopUpButtonCell keyed unarchiving, fixed broken selection and removed
setAutoenableItems: and -setEnabled: use to match Cocoa doc and behavior.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31585 72102866-910b-0410-8b05-ffd578937521
2010-11-03 14:06:17 +00:00
Doug Simons
adbf2dfd48 fix problem with actions being called twice on Windows with the WinUXTheme
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31572 72102866-910b-0410-8b05-ffd578937521
2010-10-29 14:31:43 +00:00
Doug Simons
dda6652e85 Fix problem with pull-down menu not allowing same item to be selected twice in a row
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31232 72102866-910b-0410-8b05-ffd578937521
2010-09-02 21:18:00 +00:00
Doug Simons
56e074cdb8 fix problem of pulldown action not being called for correct cell, and being called twice on Windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31213 72102866-910b-0410-8b05-ffd578937521
2010-08-30 23:02:21 +00:00
Wolfgang Lux
034beeffb4 Fix bug caused by the fix for #30025, which made it impossible to
programmatically change the selected item of some pop up buttons.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31158 72102866-910b-0410-8b05-ffd578937521
2010-08-15 20:28:06 +00:00
Fred Kiefer
a560a65e72 Add more calls to synchronizeTitleAndSelectedItem. This should fix the
remaining cases of bug #30025.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31111 72102866-910b-0410-8b05-ffd578937521
2010-08-10 21:44:49 +00:00
Wolfgang Lux
c2be707091 Ensure that the appearance of an NSPopUpButton is not inadvertently
changed when the menu view of its menu is set.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30939 72102866-910b-0410-8b05-ffd578937521
2010-07-09 20:06:18 +00:00
Wolfgang Lux
e5236628c8 Swap meaning of NSMinYEdge and NSMaxYEdge for attaching a pull down
menu to its button to match their use in Cocoa. Recall that pop up
buttons use flipped geometry.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30808 72102866-910b-0410-8b05-ffd578937521
2010-06-22 07:56:22 +00:00
Wolfgang Lux
4a7cd92c2d Fix display of pull down menus to not show their first item, which
holds the title, and fix the attachment of pull down menus to their
button. In addition, fix -setTitle: to actually set the title of a
pull down menu.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30807 72102866-910b-0410-8b05-ffd578937521
2010-06-22 07:34:31 +00:00
Gregory John Casamento
70ab53498d * Headers/Additions/GNUstepGUI/GSTheme.h: Added method
displayPopUpMenu:... to handle the display of the popup menus for
	themes.
	* Source/GSThemeMenu.m: Added default implementation.
	* Source/NSPopUpButtonCell.m: Call the displayPopUpMenu:... method
	in the method attachPopUpWithFrame:inView:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30433 72102866-910b-0410-8b05-ffd578937521
2010-05-20 08:09:08 +00:00
Fred Kiefer
53381f6992 Some more #include -> #import replacement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30036 72102866-910b-0410-8b05-ffd578937521
2010-03-25 21:30:28 +00:00
Fred Kiefer
6483053f29 Yet another bit of #include -> #import replacement. Replace includes of Foundation.h.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30034 72102866-910b-0410-8b05-ffd578937521
2010-03-25 09:11:50 +00:00
Fred Kiefer
eee3f0c60b Synchronise the title of a popup cell, when setting its object value.
This resolves an issue in SimpleAgenda. Perhaps this call needs to be
moved into one of the selection methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29713 72102866-910b-0410-8b05-ffd578937521
2010-02-24 09:32:35 +00:00
Eric Wasylishen
b05ce5111e * Source/NSPopUpButtonCell.m (-selectItem:): Mark the previously
selected item as needing display. This fixes the 'popup' indicators
not being erased.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29502 72102866-910b-0410-8b05-ffd578937521
2010-02-07 21:15:06 +00:00
Fred Kiefer
82aa5286ac New method used by Apple NIB files.
Patch by Doug Simons <doug@riverrock.org>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28204 72102866-910b-0410-8b05-ffd578937521
2009-04-11 20:28:08 +00:00
Fred Kiefer
b32b160823 Add backend support for the NSWindow child mechanism and use it for
popup buttons.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27719 72102866-910b-0410-8b05-ffd578937521
2009-01-29 09:37:30 +00:00
Gregory John Casamento
864092095d * Source/NSMenuItemCell.m: encode menu item in encodeWithCoder:
method.
	* Source/NSMenu.m: Add code to handle NSNoAutoenable
	* Source/NSPopUpButtonCell.m: Decode/encode selected index
	* Source/NSPrintInfo.m: Set orientation after the page size is 
	known, since it has no effect when done earlier.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27568 72102866-910b-0410-8b05-ffd578937521
2009-01-10 03:49:43 +00:00
Richard Frith-MacDonald
3217c7304a Make code a little easier to read (and a tiny bit more efficient).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27452 72102866-910b-0410-8b05-ffd578937521
2008-12-29 12:28:50 +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
Fred Kiefer
f114baad28 Moved _sizeForBorderType() into GSTheme header and added more methods
for theme abstraction.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26836 72102866-910b-0410-8b05-ffd578937521
2008-09-08 18:59:48 +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
4ff06d9f57 Change version for encoding. Set preferred edge and arrow
position when decoding old gorm files. 
New helper method for Gorm.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26092 72102866-910b-0410-8b05-ffd578937521
2008-02-18 20:09:16 +00:00
Fred Kiefer
65ceda6b9d Patch by Matt Rice to get popup buttons that support
setUsesItemFromMenu: set to NO.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26036 72102866-910b-0410-8b05-ffd578937521
2008-02-07 19:12:59 +00:00
Fred Kiefer
d5e445c620 Add support for popup preferred edge.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26023 72102866-910b-0410-8b05-ffd578937521
2008-02-04 14:56:15 +00:00
Fred Kiefer
8730f4cab8 Allow table views without header.
Popup buttons no longer display values from old menus after a change.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25702 72102866-910b-0410-8b05-ffd578937521
2007-12-07 18:46:27 +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
ffcdd85e3b Don't return zero size, when there are no items.
Based on patch by Andreas Höschler <ahoesch@smartsoft.de>. 


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25511 72102866-910b-0410-8b05-ffd578937521
2007-10-02 21:10:40 +00:00
Fred Kiefer
34a7efe242 Select new item when there isn't any selection.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25474 72102866-910b-0410-8b05-ffd578937521
2007-09-10 11:32:56 +00:00
Fred Kiefer
a66882b17b Add new MacOSX 10.4 methods and constants to NSWindow. Requires
recompilation of all applications!


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25469 72102866-910b-0410-8b05-ffd578937521
2007-09-09 12:19:01 +00:00
Fred Kiefer
d00b0fcb89 Extract cell border drawing into helper method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24928 72102866-910b-0410-8b05-ffd578937521
2007-03-23 22:34:02 +00:00
Fred Kiefer
77332bb584 Corrected and cleaned up focus ring drawing for cell classes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24924 72102866-910b-0410-8b05-ffd578937521
2007-03-22 17:47:56 +00:00
Matt Rice
16fcaeab83 * Source/NSTableView.m (-mouseDown:): Return early after tracking a
cell which prefersTrackingUntilMouseUp.
        * Source/NSPopUpButtonCell.m (+prefersTrackingUntilMouseUp:): Return
        yes.
        (-trackMouse:inRect:ofView:untilMouseUp:): Return yes or no
        depending on whether the mouse went up inside the menu or not.
        Fixes bug #18946



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24465 72102866-910b-0410-8b05-ffd578937521
2007-02-04 12:53:49 +00:00
Richard Frith-MacDonald
57435da7d5 tidyups and minor theme tiling updates.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23871 72102866-910b-0410-8b05-ffd578937521
2006-10-15 08:34:47 +00:00
Gregory John Casamento
3c5f004f90 * Source/NSApplication.m: Remove keys from initWithCoder: and
encodeWithCoder:.
	* Source/NSCell.m: Initialize the cell based on content in 
	initWithCoder:.
	* Source/NSFormCell.m: Removed unnecessary decoding of NSContents key
	in initWithCoder: since it is already done in NSCell.m.
	* Source/NSMatrix.m: initWithCoder:/encodeWithCoder: added 
	autosizesCells flag and clear flags which are not used
	prior to encoding.
	* Source/NSPopUpButtonCell.m: Implemented encoding in 
	encodeWithCoder:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23318 72102866-910b-0410-8b05-ffd578937521
2006-08-20 16:18:31 +00:00
Gregory John Casamento
d68950d71a Nib compatibility code merge.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22957 72102866-910b-0410-8b05-ffd578937521
2006-05-20 22:12:46 +00:00
Gregory John Casamento
0474a23212 Updated documentation in .m and .h files.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22716 72102866-910b-0410-8b05-ffd578937521
2006-03-26 17:58:19 +00:00
Fred Kiefer
eeee6b5df8 Applied two small patches.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22442 72102866-910b-0410-8b05-ffd578937521
2006-02-06 15:52:49 +00:00
Fred Kiefer
d5e163b00e Small patches and a missing CVS entry.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22346 72102866-910b-0410-8b05-ffd578937521
2006-01-22 21:23:44 +00:00
Sergii Stoian
e251c37762 Dismiss the popup after mouse tracking done. This is for the cases when mouse up event occurs outside of popup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21643 72102866-910b-0410-8b05-ffd578937521
2005-08-16 23:22:38 +00:00