mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
(trunk) #2938 -- sync gtk, mac, and cli clients with previous commit
This commit is contained in:
@@ -410,7 +410,7 @@ main( int argc,
|
||||
strchr( scrape,
|
||||
'?' ) ? '&' : '?',
|
||||
escaped );
|
||||
tr_httpParseURL( scrape, -1, &host, NULL, NULL );
|
||||
tr_urlParse( scrape, -1, NULL, &host, NULL, NULL );
|
||||
++leftToScrape;
|
||||
|
||||
tr_webRun( h, url, NULL, scrapeDoneFunc, host );
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include <libtransmission/transmission.h>
|
||||
#include <libtransmission/utils.h> /* tr_httpIsValidURL */
|
||||
#include <libtransmission/utils.h> /* tr_urlIsValidTracker() */
|
||||
|
||||
#include "actions.h"
|
||||
#include "details.h"
|
||||
@@ -239,7 +239,7 @@ onAnnounceEdited( GtkCellRendererText * renderer UNUSED,
|
||||
{
|
||||
char * old_text;
|
||||
gtk_tree_model_get( model, &iter, TR_COL_ANNOUNCE, &old_text, -1 );
|
||||
if( tr_httpIsValidURL( new_text ) )
|
||||
if( tr_urlIsValidTracker( new_text ) )
|
||||
{
|
||||
if( strcmp( old_text, new_text ) )
|
||||
{
|
||||
@@ -249,7 +249,7 @@ onAnnounceEdited( GtkCellRendererText * renderer UNUSED,
|
||||
setTrackerChangeState( page, TRUE );
|
||||
}
|
||||
}
|
||||
else if( !tr_httpIsValidURL( old_text ) )
|
||||
else if( !tr_urlIsValidTracker( old_text ) )
|
||||
{
|
||||
/* both old and new are invalid...
|
||||
they must've typed in an invalid URL
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#import "CreatorWindowController.h"
|
||||
#import "NSStringAdditions.h"
|
||||
#import "utils.h" //tr_httpIsValidURL
|
||||
#import "utils.h" //tr_urlIsValidTracker
|
||||
|
||||
#define TRACKER_ADD_TAG 0
|
||||
#define TRACKER_REMOVE_TAG 1
|
||||
@@ -125,7 +125,7 @@
|
||||
//remove potentially invalid addresses
|
||||
for (NSInteger i = [fTrackers count]-1; i >= 0; i--)
|
||||
{
|
||||
if (!tr_httpIsValidURL([[fTrackers objectAtIndex: i] UTF8String]))
|
||||
if (!tr_urlIsValidTracker([[fTrackers objectAtIndex: i] UTF8String]))
|
||||
[fTrackers removeObjectAtIndex: i];
|
||||
}
|
||||
}
|
||||
@@ -304,7 +304,7 @@
|
||||
if ([tracker rangeOfString: @"://"].location == NSNotFound)
|
||||
tracker = [@"http://" stringByAppendingString: tracker];
|
||||
|
||||
if (!tr_httpIsValidURL([tracker UTF8String]))
|
||||
if (!tr_urlIsValidTracker([tracker UTF8String]))
|
||||
{
|
||||
NSBeep();
|
||||
[fTrackers removeObjectAtIndex: row];
|
||||
|
||||
Reference in New Issue
Block a user