Toolbar multiple item issue on 64 bit - issue 11644

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40259 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2016-12-12 16:19:06 +00:00
parent 8d6d271138
commit 4582391923
4 changed files with 9 additions and 8 deletions

View file

@ -60,8 +60,8 @@ typedef enum {
float _heightFromLayout;
}
+ (int) draggedItemIndex;
+ (void) setDraggedItemIndex:(int)sourceIndex;
+ (NSInteger) draggedItemIndex;
+ (void) setDraggedItemIndex:(NSInteger)sourceIndex;
- (id) initWithFrame: (NSRect)frame;

View file

@ -208,6 +208,7 @@ static NSInteger draggedItemIndex = NSNotFound;
{
if (self == [GSToolbarView class])
{
[self setVersion: current_version];
}
}
@ -254,12 +255,12 @@ static NSInteger draggedItemIndex = NSNotFound;
// Dragging related methods
+ (int) draggedItemIndex
+ (NSInteger) draggedItemIndex
{
return draggedItemIndex;
}
+ (void) setDraggedItemIndex:(int)sourceIndex
+ (void) setDraggedItemIndex:(NSInteger)sourceIndex
{
draggedItemIndex = sourceIndex;
}
@ -302,7 +303,7 @@ static NSInteger draggedItemIndex = NSNotFound;
itemRect = [[visibleBackViews objectAtIndex:index] frame];
if (location.x < (itemRect.origin.x + (itemRect.size.width/2)))
{
NSLog(@"To the LEFT of %d", index);
//NSLog(@"To the LEFT of %d", index);
return index;
}
}
@ -315,7 +316,7 @@ static NSInteger draggedItemIndex = NSNotFound;
itemRect = [[visibleBackViews objectAtIndex:index] frame];
if (location.x > (itemRect.origin.x + (itemRect.size.width/2)))
{
NSLog(@"To the RIGHT of %d", index);
//NSLog(@"To the RIGHT of %d", index);
return index;
}
}

View file

@ -1269,7 +1269,7 @@ static GSValidationCenter *vc = nil;
}
- (void) _insertItemWithItemIdentifier: (NSString *)itemIdentifier
atIndex: (int)index
atIndex: (NSInteger)index
broadcast: (BOOL)broadcast
{
NSToolbarItem *item = nil;

View file

@ -70,7 +70,7 @@
// Private methods with broadcast support
- (void) _insertItemWithItemIdentifier: (NSString *)itemIdentifier
atIndex: (int)index
atIndex: (NSInteger)index
broadcast: (BOOL)broadcast;
- (void) _removeItemAtIndex: (int)index broadcast: (BOOL)broadcast;
- (void) _setAllowsUserCustomization: (BOOL)flag broadcast: (BOOL)broadcast;