Changeset 7453


Ignore:
Timestamp:
Dec 21, 2008, 8:02:10 PM (12 years ago)
Author:
charles
Message:

(1.4x wx) get the wx client building again.

Location:
branches/1.4x/wx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4x/wx/filter.cc

    r5457 r7453  
    2828    const tr_stat * s = tr_torrentStat( (tr_torrent*)tor );
    2929
    30     switch( s->status )
     30    switch( s->activity )
    3131    {
    3232        case TR_STATUS_DOWNLOAD:
     
    4444    }
    4545
    46     flags |= ( ( s->rateUpload + s->rateDownload ) > 0.01 )
     46    flags |= ( ( s->pieceUploadSpeed + s->pieceDownloadSpeed ) > 0.01 )
    4747        ? FLAG_ACTIVE
    4848        : FLAG_IDLE;
  • branches/1.4x/wx/speed-stats.cc

    r5975 r7453  
    214214{
    215215    // add a new record
    216     float allUp, allDown;
    217     tr_sessionGetSpeed( handle, &allDown, &allUp );
     216    const double allUp   = tr_sessionGetPieceSpeed( handle, TR_UP );
     217    const double allDown = tr_sessionGetPieceSpeed( handle, TR_DOWN );
    218218    Speed s;
    219219    s.time = time( NULL );
     
    222222    if( myTorrent ) {
    223223        const tr_stat * stat = tr_torrentStat( myTorrent );
    224         s.torrentUp = stat->rateUpload;
    225         s.torrentDown = stat->rateDownload;
     224        s.torrentUp = stat->pieceUploadSpeed;
     225        s.torrentDown = stat->pieceDownloadSpeed;
    226226    }
    227227    myStats.push_back( s );
  • branches/1.4x/wx/torrent-list.cc

    r6792 r7453  
    249249
    250250            case COL_DOWNLOAD_SPEED:
    251                 if( s->rateDownload > 0.01 )
    252                     xstr = getReadableSpeed( s->rateDownload );
     251                if( s->pieceDownloadSpeed > 0.01 )
     252                    xstr = getReadableSpeed( s->pieceDownloadSpeed );
    253253                else
    254254                    xstr.Clear( );
     
    305305            case COL_STATE: /* FIXME: divine the meaning of these two columns */
    306306            case COL_STATUS:
    307                 switch( s->status ) {
     307                switch( s->activity ) {
    308308                    case TR_STATUS_STOPPED:     xstr = _("Stopped"); break;
    309309                    case TR_STATUS_CHECK:       xstr = wxString::Format ( _("Checking Files (%.0f)"), s->recheckProgress );  break;
     
    320320
    321321            case COL_UPLOAD_SPEED:
    322                 if( s->rateUpload > 0.01 )
    323                     xstr = getReadableSpeed( s->rateUpload );
     322                if( s->pieceUploadSpeed > 0.01 )
     323                    xstr = getReadableSpeed( s->pieceUploadSpeed );
    324324                else
    325325                    xstr.Clear( );
     
    421421
    422422        case COL_DOWNLOAD_SPEED:
    423             if( sa->rateDownload < sb->rateDownload )
     423            if( sa->pieceDownloadSpeed < sb->pieceDownloadSpeed )
    424424                ret = -1;
    425             else if( sa->rateDownload > sb->rateDownload )
     425            else if( sa->pieceDownloadSpeed > sb->pieceDownloadSpeed )
    426426                ret =  1;
    427427            else
     
    499499        case COL_STATE: /* FIXME */
    500500        case COL_STATUS:
    501             ret = sa->status - sb->status;
     501            ret = sa->activity - sb->activity;
    502502            break;
    503503
     
    507507
    508508        case COL_UPLOAD_SPEED:
    509             if( sa->rateUpload < sb->rateUpload )
     509            if( sa->pieceUploadSpeed < sb->pieceUploadSpeed )
    510510                ret = -1;
    511             else if( sa->rateUpload > sb->rateUpload )
     511            else if( sa->pieceUploadSpeed > sb->pieceUploadSpeed )
    512512                ret = 1;
    513513            else
  • branches/1.4x/wx/xmission.cc

    r6792 r7453  
    286286    bool enable = false;
    287287    foreach( torrents_v, mySelectedTorrents, it )
    288         if( tr_torrentStatCached(*it)->status == TR_STATUS_STOPPED )
     288        if( tr_torrentStatCached(*it)->activity == TR_STATUS_STOPPED )
    289289            enable = true;
    290290    event.Enable( enable );
     
    294294{
    295295    foreach( torrents_v, mySelectedTorrents, it )
    296         if( tr_torrentStatCached(*it)->status == TR_STATUS_STOPPED )
     296        if( tr_torrentStatCached(*it)->activity == TR_STATUS_STOPPED )
    297297            tr_torrentStart( *it );
    298298}
     
    306306    bool enable = false;
    307307    foreach( torrents_v, mySelectedTorrents, it )
    308         if( tr_torrentStatCached(*it)->status != TR_STATUS_STOPPED )
     308        if( tr_torrentStatCached(*it)->activity != TR_STATUS_STOPPED )
    309309            enable = true;
    310310    event.Enable( enable );
     
    314314{
    315315    foreach( torrents_v, mySelectedTorrents, it )
    316         if( tr_torrentStat(*it)->status != TR_STATUS_STOPPED )
     316        if( tr_torrentStat(*it)->activity != TR_STATUS_STOPPED )
    317317            tr_torrentStop( *it );
    318318}
     
    474474    mySpeedStats->Pulse( handle );
    475475
    476     float down, up;
    477     tr_sessionGetSpeed( handle, &down, &up );
     476    const double up   = tr_sessionGetPieceSpeed( handle, TR_UP );
     477    const double down = tr_sessionGetPieceSpeed( handle, TR_DOWN );
    478478    wxString xstr = _("Total DL: ");
    479479    xstr += getReadableSpeed( down );
Note: See TracChangeset for help on using the changeset viewer.