Ticket #61: boincmgr_61.patch
File boincmgr_61.patch, 6.8 KB (added by , 17 years ago) |
---|
-
../clientgui/DlgOptions.cpp
89 89 m_ReminderFrequencyCtrl = NULL; 90 90 m_DialupStaticBoxCtrl = NULL; 91 91 #if defined(__WXMSW__) 92 m_UseBalloonsCtrl = NULL; 92 93 m_DialupConnectionsCtrl = NULL; 93 94 m_DialupSetDefaultCtrl = NULL; 94 95 m_DialupClearDefaultCtrl = NULL; … … 148 149 wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); 149 150 itemPanel4->SetSizer(itemBoxSizer5); 150 151 152 #if defined (__WXMSW__) 153 wxFlexGridSizer* itemFlexGridSizer6 = new wxFlexGridSizer(3, 2, 0, 0); 154 #else 151 155 wxFlexGridSizer* itemFlexGridSizer6 = new wxFlexGridSizer(2, 2, 0, 0); 156 #endif // __WXMSW__ 152 157 itemBoxSizer5->Add(itemFlexGridSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 153 158 wxStaticText* itemStaticText7 = new wxStaticText; 154 159 itemStaticText7->Create( itemPanel4, wxID_STATIC, _("Language Selection:"), wxDefaultPosition, wxDefaultSize, 0 ); … … 177 182 m_ReminderFrequencyCtrl->SetToolTip(_("How often, in minutes, should the manager remind you of possible connection events.")); 178 183 itemFlexGridSizer6->Add(m_ReminderFrequencyCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); 179 184 185 #if defined (__WXMSW__) 186 m_UseBalloonsCtrl = new wxCheckBox; 187 m_UseBalloonsCtrl->Create( itemPanel4, ID_USEBALLOONS, _("Use balloon tooltips")); 188 if (ShowToolTips()) 189 m_UseBalloonsCtrl->SetToolTip(_("Uncheck this item if the BOINC Manager should not use balloon tooltips for the systray icon.")); 190 itemFlexGridSizer6->Add(m_UseBalloonsCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); 191 #endif // __WXMSW__ 192 180 193 itemNotebook3->AddPage(itemPanel4, _("General")); 181 194 182 195 #if defined(__WXMSW__) -
../clientgui/DlgOptions.h
54 54 #define ID_GENERAL 10002 55 55 #define ID_LANGUAGESELECTION 10004 56 56 #define ID_REMINDERFREQUENCY 10018 57 #define ID_USEBALLOONS 10031 57 58 #define ID_CONNECTONS 10019 58 59 #define ID_NETWORKAUTODETECT 10020 59 60 #define ID_NETWORKLAN 10021 … … 155 156 ////@begin CDlgOptions member variables 156 157 wxComboBox* m_LanguageSelectionCtrl; 157 158 wxSlider* m_ReminderFrequencyCtrl; 159 wxCheckBox* m_UseBalloonsCtrl; 158 160 wxStaticBoxSizer* m_DialupStaticBoxCtrl; 159 161 wxListBox* m_DialupConnectionsCtrl; 160 162 wxButton* m_DialupSetDefaultCtrl; -
../clientgui/AdvancedFrame.cpp
1551 1551 dlg.m_ReminderFrequencyCtrl->SetValue(m_iReminderFrequency); 1552 1552 1553 1553 #ifdef __WXMSW__ 1554 dlg.m_UseBalloonsCtrl->SetValue(m_bUseBalloons); 1555 1554 1556 // Connection Tab 1555 1557 if (m_pDialupManager) { 1556 1558 m_pDialupManager->GetISPNames(astrDialupConnections); … … 1624 1626 m_iReminderFrequency = dlg.m_ReminderFrequencyCtrl->GetValue(); 1625 1627 1626 1628 #ifdef __WXMSW__ 1629 m_bUseBalloons = dlg.m_UseBalloonsCtrl->GetValue(); 1630 1627 1631 // Connection Tab 1628 1632 m_strNetworkDialupConnectionName = dlg.GetDefaultDialupConnection(); 1629 1633 #endif -
../clientgui/BOINCBaseFrame.cpp
202 202 CTaskBarIcon* pTaskbar = wxGetApp().GetTaskBarIcon(); 203 203 wxASSERT(pTaskbar); 204 204 205 if ((IsShown() && !event.m_notification_only) || (IsShown() && !pTaskbar->IsBalloonsSupported()) ) {205 if ((IsShown() && !event.m_notification_only) || (IsShown() && !pTaskbar->IsBalloonsSupported()) || (IsShown() && !m_bUseBalloons)) { 206 206 if (!event.m_notification_only) { 207 207 int retval = 0; 208 208 … … 215 215 event.ProcessResponse(retval); 216 216 } 217 217 } 218 } else {218 } else if (m_bUseBalloons) { 219 219 // If the main window is hidden or minimzed use the system tray ballon 220 220 // to notify the user instead. This keeps dialogs from interfering 221 221 // with people typing email messages or any other activity where they … … 532 532 533 533 pConfig->Write(wxT("Language"), m_iSelectedLanguage); 534 534 pConfig->Write(wxT("ReminderFrequency"), m_iReminderFrequency); 535 pConfig->Write(wxT("UseBalloons"), m_bUseBalloons); 535 536 pConfig->Write(wxT("DisplayExitWarning"), wxGetApp().GetDisplayExitWarning()); 536 537 537 538 pConfig->Write(wxT("NetworkDialupConnectionName"), m_strNetworkDialupConnectionName); … … 591 592 592 593 pConfig->Read(wxT("Language"), &m_iSelectedLanguage, 0L); 593 594 pConfig->Read(wxT("ReminderFrequency"), &m_iReminderFrequency, 60L); 595 pConfig->Read(wxT("UseBalloons"), &m_bUseBalloons, true); 594 596 pConfig->Read(wxT("DisplayExitWarning"), &iDisplayExitWarning, 1L); 595 597 wxGetApp().SetDisplayExitWarning(iDisplayExitWarning); 596 598 -
../clientgui/BOINCBaseFrame.h
63 63 virtual void OnExit( wxCommandEvent& event ); 64 64 65 65 int GetReminderFrequency() { return m_iReminderFrequency; } 66 bool GetUseBalloons() { return m_bUseBalloons; } 66 67 wxString GetDialupConnectionName() { return m_strNetworkDialupConnectionName; } 67 68 68 69 void FireInitialize(); … … 102 103 103 104 int m_iSelectedLanguage; 104 105 int m_iReminderFrequency; 106 bool m_bUseBalloons; 105 107 106 108 wxString m_strNetworkDialupConnectionName; 107 109 -
../clientgui/BOINCTaskBar.cpp
303 291 304 292 305 293 void CTaskBarIcon::OnMouseMove(wxTaskBarIconEvent& WXUNUSED(event)) { 294 if (!wxGetApp().GetFrame()->GetUseBalloons()) 295 return; 296 306 297 wxTimeSpan ts(wxDateTime::Now() - m_dtLastHoverDetected); 307 298 if (ts.GetSeconds() >= 10) { 308 299 m_dtLastHoverDetected = wxDateTime::Now(); … … 448 439 449 440 void CTaskBarIcon::ResetTaskBar() { 450 441 #ifdef __WXMSW___ 451 SetBalloon(m_iconTaskBarNormal, wxT(""), wxT("")); 442 if (wxGetApp().GetFrame()->GetUseBalloons()) 443 SetBalloon(m_iconTaskBarNormal, wxT(""), wxT("")); 444 else 445 SetIcon(m_iconTaskBarNormal, wxT("")); 452 446 #else 453 447 SetIcon(m_iconTaskBarNormal, wxT("")); 454 448 #endif