Changeset 73
- Timestamp:
- 10/19/07 20:01:00 (4 years ago)
- Files:
-
- branches/mactest/src/benchmarksDialog.cpp (modified) (2 diffs)
- branches/mactest/src/include/preferencesDialog.h (modified) (3 diffs)
- branches/mactest/src/preferencesDialog.cpp (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/mactest/src/benchmarksDialog.cpp
r38 r73 75 75 mSplitter->SetMinimumPaneSize(20); 76 76 77 #ifndef __WXMAC__ 77 78 mBenchmarksInformation->SetFont(wxFont(8, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); 79 #else 80 mBenchmarksInformation->SetFont(wxFont(9, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); 81 #endif 82 78 83 79 84 _PrefsGetUint(PREF_BENCHMARKSDIALOG_COLUMNWIDTH, columnWidth); … … 86 91 mainSizer->Add(mSplitter, 1, wxEXPAND); 87 92 mainSizer->AddSpacer(FMC_GUI_SPACING_HIGH); 93 #ifndef __WXMAC__ 88 94 mainSizer->Add(new wxButton(this, wxID_CLOSE), 0, wxALIGN_CENTER_HORIZONTAL); 95 #endif 89 96 90 97 // --- branches/mactest/src/include/preferencesDialog.h
r43 r73 22 22 #include "wx/dialog.h" 23 23 #include "wx/choice.h" 24 #ifndef __WXMAC__ 24 25 #include "wx/notebook.h" 26 #else 27 #include "wx/choicebk.h" 28 #endif 25 29 #include "wx/textctrl.h" 26 30 #include "wx/checkbox.h" … … 121 125 ~PreferencesDialog(void); 122 126 123 wxPanel* CreateGeneralTab(wx Notebook* parent);124 wxPanel* CreateMonitoringTab(wx Notebook* parent);125 wxPanel* CreateNetworkingTab(wx Notebook* parent);126 wxPanel* CreateAdvancedTab(wx Notebook* parent);127 wxPanel* CreateSystemTab(wx Notebook* parent);128 //wxPanel* CreateFahinfoTab(wx Notebook* parent);129 wxPanel* CreateWebAppTab(wx Notebook* parent);127 wxPanel* CreateGeneralTab(wxBookCtrlBase* parent); 128 wxPanel* CreateMonitoringTab(wxBookCtrlBase* parent); 129 wxPanel* CreateNetworkingTab(wxBookCtrlBase* parent); 130 wxPanel* CreateAdvancedTab(wxBookCtrlBase* parent); 131 wxPanel* CreateSystemTab(wxBookCtrlBase* parent); 132 //wxPanel* CreateFahinfoTab(wxBookCtrlBase* parent); 133 wxPanel* CreateWebAppTab(wxBookCtrlBase* parent); 130 134 131 135 void LoadPreferences(void); … … 139 143 void OnCheckboxes(wxCommandEvent& event); 140 144 void OnChoices(wxCommandEvent& event); 141 145 #ifdef __WXMAC__ 146 void OnClose(wxCloseEvent& event); 147 #endif 142 148 143 149 public: branches/mactest/src/preferencesDialog.cpp
r72 r73 75 75 EVT_CHOICE(CHC_FILEMANAGER, PreferencesDialog::OnChoices) 76 76 // EVT_CHOICE(CHK_PPDTYPE, PreferencesDialog::OnChoices) 77 78 #ifdef __WXMAC__ 79 EVT_CLOSE(PreferencesDialog::OnClose) 80 #endif 77 81 78 82 END_EVENT_TABLE() … … 90 94 wxBoxSizer *topLevelSizer; 91 95 wxBoxSizer *mainSizer; 96 #ifndef __WXMAC__ 92 97 wxBoxSizer *buttonsSizer; 93 98 wxNotebook *noteBook; 94 99 #else 100 wxChoicebook *noteBook; 101 #endif 102 95 103 // Preferences are divided into groups, thanks to a wxNoteBook (tabbed control) 104 #ifndef __WXMAC__ 96 105 noteBook = new wxNotebook(this, wxID_ANY); 106 #else 107 noteBook = new wxChoicebook(this, wxID_ANY); 108 #endif 109 110 //this.SetFont(wxSMALL_FONT); 111 112 //noteBook.SetFont(wxSMALL_FONT); 97 113 98 114 noteBook->AddPage(CreateGeneralTab(noteBook), _("General")); … … 104 120 noteBook->AddPage(CreateWebAppTab(noteBook), _("WebApp")); 105 121 122 #ifndef __WXMAC__ 106 123 // Buttons 'Ok' and 'Cancel' are right-aligned 107 124 buttonsSizer = new wxBoxSizer(wxHORIZONTAL); … … 110 127 buttonsSizer->AddSpacer(FMC_GUI_SPACING_LOW); 111 128 buttonsSizer->Add(new wxButton(this, wxID_OK), 0, wxALIGN_RIGHT); 112 129 #endif 113 130 // Construct the dialog 114 131 mainSizer = new wxBoxSizer(wxVERTICAL); … … 116 133 mainSizer->Add(noteBook, 1, wxEXPAND); 117 134 mainSizer->AddSpacer(FMC_GUI_SPACING_HIGH); 135 #ifndef __WXMAC__ 118 136 mainSizer->Add(buttonsSizer, 0, wxALIGN_RIGHT); 137 #endif 119 138 120 139 // The final sizer … … 163 182 * Create the tab containing general preferences 164 183 **/ 165 inline wxPanel* PreferencesDialog::CreateGeneralTab(wx Notebook* parent)184 inline wxPanel* PreferencesDialog::CreateGeneralTab(wxBookCtrlBase* parent) 166 185 { 167 186 wxPanel *panel; … … 201 220 * Create the tab containing monitoring preferences 202 221 **/ 203 inline wxPanel* PreferencesDialog::CreateMonitoringTab(wx Notebook* parent)222 inline wxPanel* PreferencesDialog::CreateMonitoringTab(wxBookCtrlBase* parent) 204 223 { 205 224 wxPanel *panel; … … 264 283 * Create the tab containing networking preferences 265 284 **/ 266 inline wxPanel* PreferencesDialog::CreateNetworkingTab(wx Notebook* parent)285 inline wxPanel* PreferencesDialog::CreateNetworkingTab(wxBookCtrlBase* parent) 267 286 { 268 287 wxPanel *panel; … … 282 301 mNetworkingProxyPort = new wxTextCtrl(panel, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator(wxFILTER_NUMERIC)); 283 302 mNetworkingUseProxyAuthentication = new wxCheckBox(panel, CHK_PROXYAUTHENTICATION, _("Proxy requires authentication")); 284 mNetworkingProxyUsername = new wxTextCtrl(panel, wxID_ANY, wxT(""), wxDefaultPosition );303 mNetworkingProxyUsername = new wxTextCtrl(panel, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize); 285 304 mNetworkingProxyPassword = new wxTextCtrl(panel, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD); 286 305 mNetworkingLabelAddress = new wxStaticText(panel, wxID_ANY, _("Address:")); 287 306 mNetworkingLabelPort = new wxStaticText(panel, wxID_ANY, _("Port:")); 288 mNetworkingLabelUsername = new wxStaticText(panel, wxID_ANY, _(" Proxy\nUsername:"));289 mNetworkingLabelPassword = new wxStaticText(panel, wxID_ANY, _("P roxy\nPassword:"));307 mNetworkingLabelUsername = new wxStaticText(panel, wxID_ANY, _("Username:")); 308 mNetworkingLabelPassword = new wxStaticText(panel, wxID_ANY, _("Password:")); 290 309 291 310 proxyAddressSizer->Add(mNetworkingLabelAddress, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT); … … 296 315 297 316 proxyAuthenticationSizer->Add(mNetworkingLabelUsername, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT); 298 proxyAuthenticationSizer->Add(mNetworkingProxyUsername, 1, wxALIGN_CENTER_VERTICAL | wxEXPAND);317 proxyAuthenticationSizer->Add(mNetworkingProxyUsername, 1, wxALIGN_CENTER_VERTICAL); 299 318 proxyAuthenticationSizer->AddSpacer(FMC_GUI_SPACING_LOW); 300 319 proxyAuthenticationSizer->Add(mNetworkingLabelPassword, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT); … … 320 339 * Create the tab containing networking preferences 321 340 **/ 322 inline wxPanel* PreferencesDialog::CreateAdvancedTab(wx Notebook* parent)341 inline wxPanel* PreferencesDialog::CreateAdvancedTab(wxBookCtrlBase* parent) 323 342 { 324 343 wxPanel *panel; … … 387 406 * Create the tab containing general preferences 388 407 **/ 389 inline wxPanel* PreferencesDialog::CreateSystemTab(wx Notebook* parent)408 inline wxPanel* PreferencesDialog::CreateSystemTab(wxBookCtrlBase* parent) 390 409 { 391 410 wxPanel *panel; … … 464 483 * Create the tab containing fahinfo.org integration preferences 465 484 **/ 466 /*inline wxPanel* PreferencesDialog::CreateFahinfoTab(wx Notebook* parent)485 /*inline wxPanel* PreferencesDialog::CreateFahinfoTab(wxBookCtrlBase* parent) 467 486 { 468 487 wxPanel *panel; … … 477 496 * Create the tab containing web application preferences 478 497 **/ 479 inline wxPanel* PreferencesDialog::CreateWebAppTab(wx Notebook* parent)498 inline wxPanel* PreferencesDialog::CreateWebAppTab(wxBookCtrlBase* parent) 480 499 { 481 500 wxPanel *panel; … … 941 960 } 942 961 962 #ifdef __WXMAC__ 963 /** 964 * Mac Specific close routine to save the preferences: no close button 965 **/ 966 void PreferencesDialog::OnClose(wxCloseEvent& event) 967 { 968 SavePreferences(); 969 PreferencesManager::GetInstance()->Save(); 970 event.Skip(); 971 } 972 #endif 943 973 944 974 /**
