Changeset 6792


Ignore:
Timestamp:
Sep 19, 2008, 5:17:34 PM (13 years ago)
Author:
charles
Message:

(wx) get the wxWidgets port building again. :)

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.h

    r6717 r6792  
    3232#include <time.h> /* time_t* */
    3333
     34#ifdef __cplusplus
     35extern "C" {
     36#endif
     37
    3438/***
    3539****
     
    281285double tr_getRatio( double numerator, double denominator );
    282286
    283 #endif
     287#ifdef __cplusplus
     288}
     289#endif
     290
     291#endif
  • trunk/wx/Makefile.am

    r4546 r6792  
    2323xmission_LDADD = \
    2424    $(top_builddir)/libtransmission/libtransmission.a \
    25     $(top_builddir)/third-party/libevent/libevent.la \
     25    $(top_builddir)/third-party/libevent/libevent_core.la \
    2626    $(top_builddir)/third-party/miniupnp/libminiupnp.a \
    2727    $(top_builddir)/third-party/libnatpmp/libnatpmp.a \
    28     $(WX_LIBS) $(OPENSSL_LIBS) $(PTHREAD_LIBS) -lm
     28    $(top_builddir)/third-party/shttpd/libshttpd.a \
     29    $(WX_LIBS) \
     30    $(OPENSSL_LIBS) \
     31    $(LIBCURL_LIBS) \
     32    $(PTHREAD_LIBS) -lm
     33
  • trunk/wx/torrent-list.cc

    r6335 r6792  
    1919 */
    2020
     21#include <algorithm>
    2122#include <wx/intl.h>
    2223#include <torrent-list.h>
     24#include <libtransmission/utils.h>
    2325
    2426namespace
  • trunk/wx/xmission.cc

    r5975 r6792  
    4141#include <wx/splitter.h>
    4242#include <wx/statline.h>
     43#include <wx/stdpaths.h>
    4344#include <wx/taskbar.h>
    4445#include <wx/tglbtn.h>
     
    344345{
    345346    foreach( torrents_v, mySelectedTorrents, it )
    346         tr_torrentRecheck( *it );
     347        tr_torrentVerify( *it );
    347348}
    348349
     
    371372            tr_ctor * ctor = tr_ctorNew( handle );
    372373            tr_ctorSetMetainfoFromFile( ctor, filename.c_str() );
    373             tr_ctorSetDestination( ctor, TR_FALLBACK, mySavePath.c_str() );
     374            tr_ctorSetDownloadDir( ctor, TR_FALLBACK, mySavePath.c_str() );
    374375            tr_torrent * tor = tr_torrentNew( handle, ctor, NULL );
    375376            tr_ctorFree( ctor );
     
    390391MyApp :: OnInit( )
    391392{
    392     handle = tr_sessionInit( "wx" );
     393    const wxString downloadDir = wxStandardPaths::Get().GetDocumentsDir( );
     394
     395    handle = tr_sessionInit( tr_getDefaultConfigDir(),
     396                             toStr(downloadDir).c_str(),
     397                             "wx" );
    393398
    394399    wxCmdLineParser cmdParser( cmdLineDesc, argc, argv );
     
    517522    if( !myConfig->Read( key, &port, TR_DEFAULT_PORT ) )
    518523        myConfig->Write( key, port );
    519     tr_setBindPort( handle, port );
     524    tr_sessionSetPeerPort( handle, port );
    520525
    521526    key = _T("save-path");
     
    680685    tr_ctor * ctor = tr_ctorNew( handle );
    681686    tr_ctorSetPaused( ctor, TR_FORCE, paused );
    682     tr_ctorSetDestination( ctor, TR_FALLBACK, mySavePath.c_str() );
    683     tr_torrent ** torrents = tr_loadTorrents ( handle, ctor, &count );
     687    tr_ctorSetDownloadDir( ctor, TR_FALLBACK, mySavePath.c_str() );
     688    tr_torrent ** torrents = tr_sessionLoadTorrents( handle, ctor, &count );
    684689    myTorrents.insert( myTorrents.end(), torrents, torrents+count );
    685690    tr_free( torrents );
Note: See TracChangeset for help on using the changeset viewer.