/*****************************************************************************
* VLCUIWidgets.m: Widgets for VLC's extensions dialogs for Mac OS X
*****************************************************************************
- * Copyright (C) 2009-2012 the VideoLAN team and authors
+ * Copyright (C) 2009-2014 the VideoLAN team and authors
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan dot>,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#import "CompatibilityFixes.h"
#import "VLCUIWidgets.h"
#import <stdlib.h>
- (id)init
{
- if ((self = [super init]))
- {
+ if ((self = [super init])) {
_colCount = 0;
_rowCount = 0;
_griddedViews = [[NSMutableArray alloc] init];
{
_colCount = 0;
_rowCount = 0;
- for (NSDictionary *obj in _griddedViews)
- {
+ for (NSDictionary *obj in _griddedViews) {
NSUInteger row = [[obj objectForKey:@"row"] intValue];
NSUInteger col = [[obj objectForKey:@"col"] intValue];
if (col + 1 > _colCount)
{
CGFloat top = [self marginY];
for (NSUInteger i = 1; i < _rowCount - targetRow; i++)
- {
top += [self heightOfRow:_rowCount - i] + [self marginY];
- }
+
return top;
}
- (CGFloat)leftOfColumn:(NSUInteger)targetColumn
{
CGFloat left = [self marginX];
- for (NSUInteger i = 0; i < targetColumn; i++)
- {
+ for (NSUInteger i = 0; i < targetColumn; i++) {
left += [self widthOfColumn:i] + [self marginX];
}
return left;