Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 43 lines (35 sloc) 1.042 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
//
// DraggableDownloadPlugin.m
// DraggableDownload
//
// Created by Pieter de Bie on 26-11-08.
// Copyright 2008 Pieter de Bie. All rights reserved.
//

#import "DraggableDownloadPlugin.h"
#import "JRSwizzle.h"
#import "DownloadRow.h"
/**
* Renames the selector for a given method.
* Searches for a method with _oldSelector and reassigned _newSelector to that
* implementation.
* @return NO on an error and the methods were not swizzled
*/

@implementation DraggableDownloadPlugin

+ (void) load
{
NSError *error = NULL;

[DownloadRow jr_swizzleMethod: @selector(mouseDragged:) withMethod: @selector(newMouseDragged:) error:&error];
if (error)
{
NSLog(@"Error loading DraggableDownloads: %@", error);
return;
}

[DownloadRow jr_swizzleMethod: @selector(draggingSourceOperationMaskForLocal:) withMethod: @selector(newDraggingSourceOperationMaskForLocal:) error:&error];
if (error)
{
NSLog(@"Error loading DraggableDownloads: %@", error);
return;
}

NSLog(@"DraggableDownloads plugin loaded successfully");
}

@end
Something went wrong with that request. Please try again.