diff --git a/wx/Makefile.am b/wx/Makefile.am index 94d1dd086..873d682a3 100644 --- a/wx/Makefile.am +++ b/wx/Makefile.am @@ -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 \ diff --git a/wx/xmission.cc b/wx/xmission.cc index e9464bd78..e6573f229 100755 --- a/wx/xmission.cc +++ b/wx/xmission.cc @@ -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;