double dockIconProgress;
}
-- (void) writeToActivityLog:(char *) format, ...;
+- (void) writeToActivityLog:(const char *) format, ...;
- (IBAction) browseSources: (id) sender;
- (void) browseSourcesDone: (NSOpenPanel *) sheet
returnCode: (int) returnCode contextInfo: (void *) contextInfo;
}
/* We use this to write messages to stderr from the macgui which show up in the activity window and log*/
-- (void) writeToActivityLog:(char *) format, ...
+- (void) writeToActivityLog:(const char *) format, ...
{
va_list args;
va_start(args, format);
return YES;
}
-- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(int)index
+- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(NSInteger)index
{
// Don't allow dropping ONTO an item since they can't really contain any children.
-- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(int)index
+- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)index
{
/* first, lets see if we are dropping into a folder */
if ([[fPresetsOutlineView itemAtRow:index] objectForKey:@"Folder"] && [[[fPresetsOutlineView itemAtRow:index] objectForKey:@"Folder"] intValue] == 1) // if its a folder
#import "HBImageAndTextCell.h"
-static inline float
+static inline CGFloat
xLeftInRect(NSSize innerSize, NSRect outerRect)
{
return NSMinX(outerRect);
}
-static inline float
+static inline CGFloat
xCenterInRect(NSSize innerSize, NSRect outerRect)
{
return MAX(NSMidX(outerRect) - (innerSize.width/2.0), 0.0);
}
-static inline float
+static inline CGFloat
xRightInRect(NSSize innerSize, NSRect outerRect)
{
return MAX(NSMaxX(outerRect) - innerSize.width, 0.0);
}
-static inline float
+static inline CGFloat
yTopInRect(NSSize innerSize, NSRect outerRect, BOOL flipped)
{
if (flipped)
return MAX(NSMaxY(outerRect) - innerSize.height, 0.0);
}
-static inline float
+static inline CGFloat
yCenterInRect(NSSize innerSize, NSRect outerRect, BOOL flipped)
{
return MAX(NSMidY(outerRect) - innerSize.height/2.0, 0.0);
}
-static inline float
+static inline CGFloat
yBottomInRect(NSSize innerSize, NSRect outerRect, BOOL flipped)
{
if (flipped)
static inline NSSize
scaleProportionally(NSSize imageSize, NSRect canvasRect)
{
- float ratio;
+ CGFloat ratio;
// get the smaller ratio and scale the image size by it
ratio = MIN(NSWidth(canvasRect) / imageSize.width,
[super editWithFrame: textFrame inView: controlView editor:textObj delegate:anObject event: theEvent];
}
-- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(int)selStart length:(int)selLength
+- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(NSInteger)selStart length:(NSInteger)selLength
{
NSRect textFrame, imageFrame;
NSDivideRect (aRect, &imageFrame, &textFrame, (imageSpacing.width * 2) + [image size].width, NSMinXEdge);
*/
int i = 0;
- NSEnumerator *enumerator = [fJobGroups objectEnumerator];
- id tempObject;
- while (tempObject = [enumerator nextObject])
+ for(id tempObject in fJobGroups)
{
NSDictionary *thisQueueDict = tempObject;
if ([[thisQueueDict objectForKey:@"Status"] intValue] == 0) // Completed
- (IBAction)removeSelectedQueueItem: (id)sender
{
NSIndexSet * selectedRows = [fOutlineView selectedRowIndexes];
- int row = [selectedRows firstIndex];
+ NSUInteger row = [selectedRows firstIndex];
+ if( row == NSNotFound )
+ return;
/* if this is a currently encoding job, we need to be sure to alert the user,
* to let them decide to cancel it first, then if they do, we can come back and
* remove it */
- if ([[[fJobGroups objectAtIndex:row] objectForKey:@"Status"] intValue] == 1)
+ if ([[[fJobGroups objectAtIndex:row] objectForKey:@"Status"] integerValue] == 1)
{
/* We pause the encode here so that it doesn't finish right after and then
* screw up the sync while the window is open
- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard
{
// Dragging is only allowed of the pending items.
- if ([[[fJobGroups objectAtIndex:[outlineView selectedRow]] objectForKey:@"Status"] intValue] != 2) // 2 is pending
+ if ([[[items objectAtIndex:0] objectForKey:@"Status"] integerValue] != 2) // 2 is pending
{
return NO;
}
return NSDragOperationGeneric;
}
-
-
- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)index
{
- NSMutableIndexSet *moveItems = [NSMutableIndexSet indexSet];
-
- id obj;
- NSEnumerator *enumerator = [fDraggedNodes objectEnumerator];
- while (obj = [enumerator nextObject])
- {
+ NSMutableIndexSet *moveItems = [NSMutableIndexSet indexSet];
+
+ for( id obj in fDraggedNodes )
[moveItems addIndex:[fJobGroups indexOfObject:obj]];
- }
+
// Successful drop, we use moveObjectsInQueueArray:... in fHBController
// to properly rearrange the queue array, save it to plist and then send it back here.
// since Controller.mm is handling all queue array manipulation.