mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:00:46 +00:00
Small patch to NSTabView. by Andreas Höschler.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22976 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5157dbfaf9
commit
e9e1827d77
2 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-05-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSTabView.m (-tabViewItemAtPoint:, -mouseDown:): Moved
|
||||||
|
conversion of point with view transformation into the mouseDown:
|
||||||
|
method to be compatible with Cocoa.
|
||||||
|
Patch by Andreas Höschler <ahoesch@smartsoft.de>.
|
||||||
|
|
||||||
2006-05-20 18:25 Gregory John Casamento <greg_casamento@yahoo.com>
|
2006-05-20 18:25 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* Source/GSNibCompatibility.m
|
* Source/GSNibCompatibility.m
|
||||||
|
|
|
@ -700,13 +700,15 @@
|
||||||
|
|
||||||
// Event handling.
|
// Event handling.
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find the tab view item containing the NSPoint point. This point
|
||||||
|
* is expected to be alreay in the coordinate system of the tab view.
|
||||||
|
*/
|
||||||
- (NSTabViewItem*) tabViewItemAtPoint: (NSPoint)point
|
- (NSTabViewItem*) tabViewItemAtPoint: (NSPoint)point
|
||||||
{
|
{
|
||||||
int howMany = [_items count];
|
int howMany = [_items count];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
point = [self convertPoint: point fromView: nil];
|
|
||||||
|
|
||||||
for (i = 0; i < howMany; i++)
|
for (i = 0; i < howMany; i++)
|
||||||
{
|
{
|
||||||
NSTabViewItem *anItem = [_items objectAtIndex: i];
|
NSTabViewItem *anItem = [_items objectAtIndex: i];
|
||||||
|
@ -720,7 +722,8 @@
|
||||||
|
|
||||||
- (void) mouseDown: (NSEvent *)theEvent
|
- (void) mouseDown: (NSEvent *)theEvent
|
||||||
{
|
{
|
||||||
NSPoint location = [theEvent locationInWindow];
|
NSPoint location = [self convertPoint: [theEvent locationInWindow]
|
||||||
|
fromView: nil];
|
||||||
NSTabViewItem *anItem = [self tabViewItemAtPoint: location];
|
NSTabViewItem *anItem = [self tabViewItemAtPoint: location];
|
||||||
|
|
||||||
if (anItem != nil && ![anItem isEqual: _selected])
|
if (anItem != nil && ![anItem isEqual: _selected])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue