Ticket #712: sg_DlgPreferences.cpp.patch
File sg_DlgPreferences.cpp.patch, 4.5 KB (added by , 16 years ago) |
---|
-
sg_DlgPreferences.cpp
61 61 62 62 // Useful arrays used as templates for arrays created at runtime. 63 63 // 64 int iTimeOfDayArraySize = 2 4;64 int iTimeOfDayArraySize = 25; 65 65 wxString astrTimeOfDayStrings[] = { 66 66 wxT("0:00"), 67 67 wxT("1:00"), … … 212 212 EVT_CHECKBOX( ID_CUSTOMIZEPREFERENCES, CPanelPreferences::OnCustomizePreferencesClick ) 213 213 EVT_COMBOBOX( ID_WORKBETWEENBEGIN, CPanelPreferences::OnWorkBetweenBeginSelected ) 214 214 EVT_COMBOBOX( ID_CONNECTBETWEENBEGIN, CPanelPreferences::OnConnectBetweenBeginSelected ) 215 EVT_BUTTON( ID_SIMPLE_HELP, CPanelPreferences::OnButtonHelp)215 EVT_BUTTON( ID_SIMPLE_HELP, CPanelPreferences::OnButtonHelp ) 216 216 ////@end CPanelPreferences event table entries 217 217 END_EVENT_TABLE() 218 218 … … 220 220 * CPanelPreferences constructors 221 221 */ 222 222 223 CPanelPreferences::CPanelPreferences( ) 224 { 223 CPanelPreferences::CPanelPreferences() { 225 224 } 226 225 227 228 CPanelPreferences::CPanelPreferences( wxWindow* parent ) : 229 wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER) 226 CPanelPreferences::CPanelPreferences( wxWindow* parent ) 227 : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER) 230 228 { 231 229 Create(); 232 230 } … … 236 234 * CPanelPreferences creator 237 235 */ 238 236 239 bool CPanelPreferences::Create() 240 { 237 bool CPanelPreferences::Create() { 241 238 ////@begin CPanelPreferences member initialisation 242 239 m_SkinSelectorCtrl = NULL; 243 240 m_CustomizePreferencesCtrl = NULL; … … 267 264 * Control creation for CPanelPreferences 268 265 */ 269 266 270 void CPanelPreferences::CreateControls() 271 { 267 void CPanelPreferences::CreateControls() { 272 268 CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple(); 273 269 274 270 wxASSERT(pSkinSimple); … … 637 633 638 634 639 635 void CPanelPreferences::OnOK() { 640 CMainDocument* 636 CMainDocument* pDoc = wxGetApp().GetDocument(); 641 637 642 638 wxASSERT(pDoc); 643 639 wxASSERT(wxDynamicCast(pDoc, CMainDocument)); … … 726 722 if (retval == ERR_NOT_FOUND) { 727 723 // Older clients don't support get_global_prefs_working_struct RPC 728 724 global_preferences_working = pDoc->state.global_prefs; 729 725 retval = pDoc->rpc.get_global_prefs_override_struct(global_preferences_working, global_preferences_mask); 730 726 } 731 727 732 728 if (!retval && global_preferences_override_mask.are_simple_prefs_set()) { … … 997 993 998 994 BEGIN_EVENT_TABLE( CDlgPreferences, wxDialog ) 999 995 ////@begin CDlgPreferences event table entries 1000 EVT_HELP( wxID_ANY, CDlgPreferences::OnHelp)996 EVT_HELP( wxID_ANY, CDlgPreferences::OnHelp ) 1001 997 EVT_BUTTON( wxID_OK, CDlgPreferences::OnOK ) 1002 998 ////@end CDlgPreferences event table entries 1003 999 END_EVENT_TABLE() … … 1006 1002 * CDlgPreferences constructors 1007 1003 */ 1008 1004 1009 CDlgPreferences::CDlgPreferences( ) 1010 { 1005 CDlgPreferences::CDlgPreferences() { 1011 1006 } 1012 1007 1013 1008 1014 CDlgPreferences::CDlgPreferences( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) 1015 { 1009 CDlgPreferences::CDlgPreferences( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) { 1016 1010 Create(parent, id, caption, pos, size, style); 1017 1011 } 1018 1012 … … 1021 1015 * CDlgPreferences creator 1022 1016 */ 1023 1017 1024 bool CDlgPreferences::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) 1025 { 1018 bool CDlgPreferences::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) { 1026 1019 wxString strCaption = caption; 1027 1020 if (strCaption.IsEmpty()) { 1028 CSkinAdvanced* 1021 CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced(); 1029 1022 wxASSERT(pSkinAdvanced); 1030 1023 wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced)); 1031 1024 … … 1063 1056 * wxEVT_HELP event handler for ID_DLGPREFERENCES 1064 1057 */ 1065 1058 1066 void CDlgPreferences::OnHelp( wxHelpEvent& event) {1059 void CDlgPreferences::OnHelp( wxHelpEvent& event ) { 1067 1060 wxLogTrace(wxT("Function Start/End"), wxT("CDlgPreferences::OnHelp - Function Begin")); 1068 1061 1069 1062 if (IsShown()) { … … 1097 1090 m_pBackgroundPanel->OnOK(); 1098 1091 EndModal(wxID_OK); 1099 1092 } 1100 1101 1102