mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 13:20:47 +00:00
removed c99isms
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30175 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
392a9f77b5
commit
b06fad609f
3 changed files with 33 additions and 13 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-04-16 Riccardo Mottola <rmottola@users.sf.net>
|
||||
|
||||
* Source/GSToolbarCustomizationPalette.m
|
||||
* Source/GSToolbarView.m
|
||||
removed c99isms
|
||||
|
||||
2010-04-15 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSSegmentedCell.m:
|
||||
|
|
|
@ -99,11 +99,16 @@
|
|||
// Loop over all subviews
|
||||
while ((layoutedView = [e nextObject]) != nil)
|
||||
{
|
||||
[(id)layoutedView layout];
|
||||
NSRect frame = [layoutedView frame];
|
||||
NSSize size = frame.size;
|
||||
float height = size.height;
|
||||
float width = size.width;
|
||||
NSRect frame;
|
||||
NSSize size;
|
||||
float height;
|
||||
float width;
|
||||
|
||||
[(id)layoutedView layout];
|
||||
frame = [layoutedView frame];
|
||||
size = frame.size;
|
||||
height = size.height;
|
||||
width = size.width;
|
||||
|
||||
if ((hAccumulator + width) <= maxWidth)
|
||||
{
|
||||
|
@ -236,11 +241,14 @@
|
|||
[_defaultTemplateView setAutoresizingMask:NSViewWidthSizable | NSViewMaxYMargin];
|
||||
|
||||
{
|
||||
NSRect dtvFrame;
|
||||
NSRect cvFrame;
|
||||
|
||||
// for now, _defaultTemplateView isn't implemented, so remove it
|
||||
NSRect dtvFrame = [_defaultTemplateView frame];
|
||||
dtvFrame = [_defaultTemplateView frame];
|
||||
[_defaultTemplateView removeFromSuperview];
|
||||
// expand _customizationView to fill the space
|
||||
NSRect cvFrame = [_customizationView frame];
|
||||
cvFrame = [_customizationView frame];
|
||||
cvFrame.size.height += dtvFrame.size.height;
|
||||
cvFrame.origin.y -= dtvFrame.size.height;
|
||||
[_customizationView setFrame:cvFrame];
|
||||
|
@ -265,6 +273,11 @@
|
|||
NSToolbarDisplayMode tag = [toolbar displayMode];
|
||||
NSToolbarSizeMode size = [toolbar sizeMode];
|
||||
id delegate = [toolbar delegate];
|
||||
NSView *toolbarView;
|
||||
NSRect toolbarFrame;
|
||||
NSPoint bottomCenter;
|
||||
NSRect windowFrame;
|
||||
NSPoint topCenter;
|
||||
|
||||
[_allowedItems removeAllObjects];
|
||||
[_defaultItems removeAllObjects];
|
||||
|
@ -325,12 +338,12 @@
|
|||
_toolbar = toolbar;
|
||||
|
||||
// position the customization window centered just below the toolbar
|
||||
NSView *toolbarView = [_toolbar _toolbarView];
|
||||
NSRect toolbarFrame = [toolbarView convertRect:[toolbarView bounds] toView:nil];
|
||||
NSPoint bottomCenter = NSMakePoint(toolbarFrame.origin.x + (toolbarFrame.size.width/2), toolbarFrame.origin.y);
|
||||
toolbarView = [_toolbar _toolbarView];
|
||||
toolbarFrame = [toolbarView convertRect:[toolbarView bounds] toView:nil];
|
||||
bottomCenter = NSMakePoint(toolbarFrame.origin.x + (toolbarFrame.size.width/2), toolbarFrame.origin.y);
|
||||
bottomCenter = [[toolbarView window] convertBaseToScreen:bottomCenter];
|
||||
NSRect windowFrame = [_customizationWindow frame];
|
||||
NSPoint topCenter = NSMakePoint(windowFrame.origin.x + (windowFrame.size.width/2), windowFrame.origin.y + windowFrame.size.height);
|
||||
windowFrame = [_customizationWindow frame];
|
||||
topCenter = NSMakePoint(windowFrame.origin.x + (windowFrame.size.width/2), windowFrame.origin.y + windowFrame.size.height);
|
||||
windowFrame.origin.x += bottomCenter.x-topCenter.x;
|
||||
windowFrame.origin.y += bottomCenter.y-topCenter.y;
|
||||
[_customizationWindow setFrame:windowFrame display:NO];
|
||||
|
|
|
@ -393,6 +393,7 @@ static void initSystemExtensionsColors(void)
|
|||
NSString *identifier = [item itemIdentifier];
|
||||
NSToolbar *toolbar = [self toolbar];
|
||||
NSArray *allowedItemIdentifiers = [[toolbar delegate] toolbarAllowedItemIdentifiers: toolbar];
|
||||
int newIndex;
|
||||
|
||||
// don't accept any dragging if the customization palette isn't running for this toolbar
|
||||
if (![toolbar customizationPaletteIsRunning] || ![allowedItemIdentifiers containsObject: identifier])
|
||||
|
@ -424,7 +425,7 @@ static void initSystemExtensionsColors(void)
|
|||
draggedItemIndex = NSNotFound;
|
||||
}
|
||||
|
||||
int newIndex = [self _insertionIndexAtPoint: [info draggingLocation]];
|
||||
newIndex = [self _insertionIndexAtPoint: [info draggingLocation]];
|
||||
|
||||
if (draggedItemIndex != NSNotFound)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue