From 787d9edbc4e65a4408703c85d7c21048eac5ada2 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 28 Nov 2009 17:51:47 +0000 Subject: [PATCH] display an error for invalid magnet links --- macosx/Controller.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 00b3f0751..34bda1751 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -942,13 +942,15 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy Torrent * torrent; if (!(torrent = [[Torrent alloc] initWithMagnetAddress: address location: nil lib: fLib])) { - #warning should we do something here? + NSRunAlertPanel(NSLocalizedString(@"Adding magnetized transfer failed", "Magnet link failed -> title"), + [NSString stringWithFormat: NSLocalizedString(@"There was an error when adding the magnet link \"%@\"." + " The transfer will not occur.", "Magnet link failed -> message"), address], + NSLocalizedString(@"OK", "Magnet link failed -> button"), nil, nil); return; } #warning show add window perhaps? - //change the location if the group calls for it (this has to wait until after the torrent is created) if ([[GroupsController groups] usesCustomDownloadLocationForIndex: [torrent groupValue]]) { @@ -956,7 +958,6 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy [torrent changeDownloadFolderBeforeUsing: location]; } - #warning should we do this? [torrent setWaitToStart: [fDefaults boolForKey: @"AutoStartDownload"]]; [torrent update];