@@ -375,13 +375,12 @@ void CMainFrame::OnIconize(wxIconizeEvent& event)
375375 // to get rid of the deprecated warning. Just ignore it.
376376 if (!event.Iconized ())
377377 fClosedToTray = false ;
378- // #ifdef __WXMSW__
379378 // The tray icon sometimes disappears on ubuntu karmic
380379 // Hiding the taskbar button doesn't work cleanly on ubuntu lucid
380+ // Reports of CPU peg on 64-bit linux
381381 if (fMinimizeToTray && event.Iconized ())
382382 fClosedToTray = true ;
383383 Show (!fClosedToTray );
384- // #endif
385384 ptaskbaricon->Show (fMinimizeToTray || fClosedToTray );
386385}
387386
@@ -1446,6 +1445,14 @@ COptionsDialog::COptionsDialog(wxWindow* parent) : COptionsDialogBase(parent)
14461445 SelectPage (0 );
14471446#ifdef __WXGTK__
14481447 m_checkBoxStartOnSystemStartup->SetLabel (_ (" &Start Bitcoin on window system startup" ));
1448+ if (!mapArgs.count (" -minimizetotray" ))
1449+ {
1450+ // Minimize to tray is just too buggy on Linux
1451+ fMinimizeToTray = false ;
1452+ m_checkBoxMinimizeToTray->SetValue (false );
1453+ m_checkBoxMinimizeToTray->Enable (false );
1454+ m_checkBoxMinimizeOnClose->SetLabel (_ (" &Minimize on close" ));
1455+ }
14491456#endif
14501457#ifdef __WXMAC_OSX__
14511458 m_checkBoxStartOnSystemStartup->Enable (false ); // not implemented yet
@@ -2536,6 +2543,10 @@ void CreateMainWindow()
25362543 pframeMain = new CMainFrame (NULL );
25372544 if (mapArgs.count (" -min" ))
25382545 pframeMain->Iconize (true );
2546+ #ifdef __WXGTK__
2547+ if (!mapArgs.count (" -minimizetotray" ))
2548+ fMinimizeToTray = false ;
2549+ #endif
25392550 pframeMain->Show (true ); // have to show first to get taskbar button to hide
25402551 if (fMinimizeToTray && pframeMain->IsIconized ())
25412552 fClosedToTray = true ;
0 commit comments