Index: ui.cpp
===================================================================
--- ui.cpp	(revision 105)
+++ ui.cpp	(revision 106)
@@ -375,6 +375,9 @@
     // to get rid of the deprecated warning.  Just ignore it.
     if (!event.Iconized())
         fClosedToTray = false;
+#ifdef __WXGTK__
+    if (mapArgs.count("-minimizetotray")) {
+#endif
     // The tray icon sometimes disappears on ubuntu karmic
     // Hiding the taskbar button doesn't work cleanly on ubuntu lucid
     // Reports of CPU peg on 64-bit linux
@@ -382,6 +385,9 @@
         fClosedToTray = true;
     Show(!fClosedToTray);
     ptaskbaricon->Show(fMinimizeToTray || fClosedToTray);
+#ifdef __WXGTK__
+    }
+#endif
 }
 
 void CMainFrame::OnMouseEvents(wxMouseEvent& event)
