re-enable hiding taskbar button on minimize on linux, though it doesn't work cleanly

This commit is contained in:
s_nakamoto 2010-06-22 03:45:37 +00:00
parent dbe23aadae
commit bed3ad104e
2 changed files with 5 additions and 5 deletions

View File

@ -2725,7 +2725,7 @@ void BitcoinMiner()
string strStatus = strprintf(" %.0f khash/s", dHashesPerSec/1000.0); string strStatus = strprintf(" %.0f khash/s", dHashesPerSec/1000.0);
UIThreadCall(bind(CalledSetStatusBar, strStatus, 0)); UIThreadCall(bind(CalledSetStatusBar, strStatus, 0));
static int64 nLogTime; static int64 nLogTime;
if (GetTime() - nLogTime > 60 * 60) if (GetTime() - nLogTime > 30 * 60)
{ {
nLogTime = GetTime(); nLogTime = GetTime();
printf("%s ", DateTimeStrFormat("%x %H:%M", GetTime()).c_str()); printf("%s ", DateTimeStrFormat("%x %H:%M", GetTime()).c_str());

8
ui.cpp
View File

@ -375,13 +375,13 @@ void CMainFrame::OnIconize(wxIconizeEvent& event)
// to get rid of the deprecated warning. Just ignore it. // to get rid of the deprecated warning. Just ignore it.
if (!event.Iconized()) if (!event.Iconized())
fClosedToTray = false; fClosedToTray = false;
#ifdef __WXMSW__ //#ifdef __WXMSW__
// The tray icon sometimes disappears on ubuntu karmic // The tray icon sometimes disappears on ubuntu karmic
// Hiding the taskbar button doesn't work reliably on ubuntu lucid // Hiding the taskbar button doesn't work cleanly on ubuntu lucid
if (fMinimizeToTray && event.Iconized()) if (fMinimizeToTray && event.Iconized())
fClosedToTray = true; fClosedToTray = true;
Show(!fClosedToTray); Show(!fClosedToTray);
#endif //#endif
ptaskbaricon->Show(fMinimizeToTray || fClosedToTray); ptaskbaricon->Show(fMinimizeToTray || fClosedToTray);
} }
@ -2437,7 +2437,7 @@ void CMyTaskBarIcon::Show(bool fShow)
{ {
strlcpy(pszPrevTip, strTooltip.c_str(), sizeof(pszPrevTip)); strlcpy(pszPrevTip, strTooltip.c_str(), sizeof(pszPrevTip));
#ifdef __WXMSW__ #ifdef __WXMSW__
// somehow it'll choose the wrong icon and scale it down if // somehow it'll choose the wrong size and scale it down if
// we use the main icon, so we hand it one with only 16x16 // we use the main icon, so we hand it one with only 16x16
SetIcon(wxICON(favicon), strTooltip); SetIcon(wxICON(favicon), strTooltip);
#else #else