* Source/GSToolbarView.m:

* Source/NSToolbar.m: Partial fix for toolbar drag and drop issues.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28072 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2009-03-13 05:03:50 +00:00
parent 83e65b773e
commit 0548fc3f19
3 changed files with 28 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2009-03-13 01:01-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* Source/GSToolbarView.m:
* Source/NSToolbar.m: Partial fix for toolbar drag and drop issues.
2009-03-12 19:47-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSPrintOperation.m: Correct issues with handling of

View file

@ -398,11 +398,20 @@ static void initSystemExtensionsColors(void)
NSToolbarItem *item = [[info draggingSource] toolbarItem];
int newIndex = [self _insertionIndexAtPoint: [info draggingLocation]];
// Calculate the index
[toolbar _insertPassivelyItem:item atIndex: index];
RELEASE(item);
[toolbar _moveItemFromIndex: index toIndex: newIndex broadcast: YES];
if(index == -1)
{
[toolbar _insertPassivelyItem:item atIndex: newIndex];
RELEASE(item);
[toolbar _moveItemFromIndex: newIndex toIndex: newIndex broadcast: YES];
}
else
{
[toolbar _insertPassivelyItem:item atIndex: index];
RELEASE(item);
[toolbar _moveItemFromIndex: index toIndex: newIndex broadcast: YES];
}
return YES;
}

View file

@ -930,6 +930,15 @@ static GSValidationCenter *vc = nil;
{
if (![_items containsObject: item])
{
if (newIndex > [_items count] - 1)
{
newIndex = [_items count] - 1;
}
else if(newIndex < 0)
{
newIndex = 0;
}
[_items insertObject: item atIndex: newIndex];
}
else