Changeset 9864


Ignore:
Timestamp:
Jan 4, 2010, 8:18:21 PM (12 years ago)
Author:
charles
Message:

(trunk) sync mac, gtk clients with r9863

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/details.c

    r9815 r9864  
    19941994        int tier;
    19951995        GtkTextIter start, end;
    1996         tr_announce_list_err err;
    19971996        char * tracker_text;
    19981997        char ** tracker_strings;
     
    20192018
    20202019        /* update the torrent */
    2021         err = tr_torrentSetAnnounceList( tor, trackers, n );
    2022         if( err )
     2020        if( !tr_torrentSetAnnounceList( tor, trackers, n ) )
    20232021        {
    20242022            GtkWidget * w;
    2025             const char * str = NULL;
    2026             if( err == TR_ANNOUNCE_LIST_HAS_BAD )
    2027                 str = _( "List contains invalid URLs" );
    2028             else
    2029                 assert( 0 && "unhandled condition" );
     2023            const char * text = _( "List contains invalid URLs" );
    20302024            w = gtk_message_dialog_new( GTK_WINDOW( dialog ),
    20312025                                        GTK_DIALOG_MODAL,
    20322026                                        GTK_MESSAGE_ERROR,
    2033                                         GTK_BUTTONS_CLOSE, "%s", str );
     2027                                        GTK_BUTTONS_CLOSE, "%s", text );
    20342028            gtk_dialog_run( GTK_DIALOG( w ) );
    20352029            gtk_widget_destroy( w );
  • trunk/macosx/Torrent.m

    r9852 r9864  
    635635    trackerStructs[oldTrackerCount].tier = trackerStructs[oldTrackerCount-1].tier + 1;
    636636   
    637     const tr_announce_list_err result = tr_torrentSetAnnounceList(fHandle, trackerStructs, oldTrackerCount+1);
     637    const BOOL ok = tr_torrentSetAnnounceList(fHandle, trackerStructs, oldTrackerCount+1);
    638638    tr_free(trackerStructs);
    639639   
    640     return result == TR_ANNOUNCE_LIST_OK;
     640    return ok;
    641641}
    642642
     
    655655        trackerStructs[newCount++] = fInfo->trackers[oldIndex];
    656656   
    657     const tr_announce_list_err result = tr_torrentSetAnnounceList(fHandle, trackerStructs, newCount);
    658     NSAssert1(result == TR_ANNOUNCE_LIST_OK, @"Removing tracker addresses resulted in error: %d", result);
     657    const BOOL ok = tr_torrentSetAnnounceList(fHandle, trackerStructs, newCount);
     658    NSAssert1(ok, @"Removing tracker addresses resulted in error: %d", result);
    659659   
    660660    tr_free(trackerStructs);
Note: See TracChangeset for help on using the changeset viewer.