mirror of
https://github.com/transmission/transmission
synced 2024-12-23 08:13:27 +00:00
call tr_close() on shutdown.
This commit is contained in:
parent
0a66cb5103
commit
f4a024712f
2 changed files with 11 additions and 11 deletions
|
@ -4,16 +4,16 @@ AM_CXXFLAGS = $(WX_CXXFLAGS)
|
|||
|
||||
SUBDIRS = images
|
||||
|
||||
bin_PROGRAMS = Xmission
|
||||
bin_PROGRAMS = xmission
|
||||
|
||||
Xmission_SOURCES = \
|
||||
xmission_SOURCES = \
|
||||
speed-stats.cc \
|
||||
filter.cc \
|
||||
torrent-list.cc \
|
||||
torrent-stats.cc \
|
||||
xmission.cc
|
||||
|
||||
Xmission_LDADD = \
|
||||
xmission_LDADD = \
|
||||
$(top_builddir)/libtransmission/libtransmission.a \
|
||||
$(top_builddir)/third-party/libevent/libevent.la \
|
||||
$(top_builddir)/third-party/miniupnp/libminiupnp.a \
|
||||
|
|
|
@ -388,7 +388,8 @@ void MyFrame :: OnOpen( wxCommandEvent& WXUNUSED(event) )
|
|||
}
|
||||
|
||||
|
||||
bool MyApp::OnInit()
|
||||
bool
|
||||
MyApp :: OnInit( )
|
||||
{
|
||||
handle = tr_init( "wx" );
|
||||
|
||||
|
@ -690,17 +691,16 @@ MyFrame :: MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size
|
|||
OnPulse( dummy );
|
||||
}
|
||||
|
||||
void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event))
|
||||
void
|
||||
MyFrame :: OnExit( wxCommandEvent& WXUNUSED( event ) )
|
||||
{
|
||||
Enable( false );
|
||||
|
||||
foreach( torrents_v, myTorrents, it )
|
||||
tr_torrentClose( *it );
|
||||
myTorrents.clear( );
|
||||
mySelectedTorrents.clear( );
|
||||
ApplyCurrentFilter( );
|
||||
|
||||
myTorrents.clear ();
|
||||
mySelectedTorrents.clear ();
|
||||
|
||||
ApplyCurrentFilter ();
|
||||
tr_close( handle );
|
||||
|
||||
/* give the connections a max of 10 seconds to shut themselves down */
|
||||
myExitTime = time(0) + 10;
|
||||
|
|
Loading…
Reference in a new issue