last commit wasn't exiting gracefully.
This commit is contained in:
parent
9b4545fdea
commit
609f2c8a89
|
@ -176,7 +176,7 @@ private:
|
||||||
TorrentListCtrl * myTorrentList;
|
TorrentListCtrl * myTorrentList;
|
||||||
TorrentStats * myTorrentStats;
|
TorrentStats * myTorrentStats;
|
||||||
wxListCtrl * myFilters;
|
wxListCtrl * myFilters;
|
||||||
wxTaskBarIcon myTrayIcon;
|
wxTaskBarIcon * myTrayIcon;
|
||||||
wxIcon myLogoIcon;
|
wxIcon myLogoIcon;
|
||||||
wxIcon myTrayIconIcon;
|
wxIcon myTrayIconIcon;
|
||||||
SpeedStats * mySpeedStats;
|
SpeedStats * mySpeedStats;
|
||||||
|
@ -448,8 +448,9 @@ void
|
||||||
MyFrame :: OnPulse(wxTimerEvent& WXUNUSED(event) )
|
MyFrame :: OnPulse(wxTimerEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
if( myExitTime ) {
|
if( myExitTime ) {
|
||||||
std::cerr << __FILE__ << ':' << __LINE__ << ' ' << tr_torrentCount(handle) << " torrents left" << std::endl;
|
|
||||||
if ( !tr_torrentCount(handle) || myExitTime<time(0) ) {
|
if ( !tr_torrentCount(handle) || myExitTime<time(0) ) {
|
||||||
|
delete myTrayIcon;
|
||||||
|
myTrayIcon = 0;
|
||||||
Destroy( );
|
Destroy( );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -473,7 +474,7 @@ MyFrame :: OnPulse(wxTimerEvent& WXUNUSED(event) )
|
||||||
xstr += _T("\n");
|
xstr += _T("\n");
|
||||||
xstr +=_("Upload: ");
|
xstr +=_("Upload: ");
|
||||||
xstr += getReadableSpeed( up );
|
xstr += getReadableSpeed( up );
|
||||||
myTrayIcon.SetIcon( myTrayIconIcon, xstr );
|
myTrayIcon->SetIcon( myTrayIconIcon, xstr );
|
||||||
|
|
||||||
myTorrentList->Refresh ( );
|
myTorrentList->Refresh ( );
|
||||||
}
|
}
|
||||||
|
@ -495,6 +496,7 @@ MyFrame :: MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size
|
||||||
myFilter( TorrentFilter::SHOW_ALL ),
|
myFilter( TorrentFilter::SHOW_ALL ),
|
||||||
myExitTime( 0 )
|
myExitTime( 0 )
|
||||||
{
|
{
|
||||||
|
myTrayIcon = new wxTaskBarIcon;
|
||||||
SetIcon( myLogoIcon );
|
SetIcon( myLogoIcon );
|
||||||
|
|
||||||
long port;
|
long port;
|
||||||
|
|
Loading…
Reference in New Issue