(trunk) #2938 -- sync gtk, mac, and cli clients with previous commit

This commit is contained in:
Charles Kerr
2010-02-20 15:57:34 +00:00
parent 5a9a07b71e
commit 7feaa9faae
3 changed files with 7 additions and 7 deletions

View File

@@ -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 );

View File

@@ -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

View File

@@ -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];