ChatOptionsTab::ChatOptionsTab(wxWindow* parent) : wxPanel(parent, -1) { GetAui().manager->AddPane(this, wxLEFT, _T( "chatoptionstab" )); wxBoxSizer* m_main_sizer = new wxBoxSizer(wxVERTICAL); wxStaticBoxSizer* sbColorsSizer; sbColorsSizer = new wxStaticBoxSizer(new wxStaticBox(this, -1, _("Colors and font")), wxHORIZONTAL); wxBoxSizer* bColorsVSizer; bColorsVSizer = new wxBoxSizer(wxVERTICAL); m_custom_colors = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER | wxTAB_TRAVERSAL); m_custom_colors->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENU)); wxBoxSizer* bCustomColorsSizer; bCustomColorsSizer = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* bColorSizer; bColorSizer = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* bColorsSizer1; bColorsSizer1 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* bNormlColorSizer; bNormlColorSizer = new wxBoxSizer(wxHORIZONTAL); m_normal_color = new ColorButton(m_custom_colors, ID_NORMAL, wxBitmap(), wxDefaultPosition, wxSize(20, 20), 0); m_normal_color->SetColor(wxColour(0, 0, 0)); bNormlColorSizer->Add(m_normal_color, 0, wxALL, 5); m_normal_label = new wxStaticText(m_custom_colors, wxID_ANY, _("Normal"), wxDefaultPosition, wxDefaultSize, 0); m_normal_label->Wrap(-1); bNormlColorSizer->Add(m_normal_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5); bColorsSizer1->Add(bNormlColorSizer, 0, wxEXPAND, 5); wxBoxSizer* bBGColorSizer; bBGColorSizer = new wxBoxSizer(wxHORIZONTAL); m_bg_color = new ColorButton(m_custom_colors, ID_BG, wxBitmap(), wxDefaultPosition, wxSize(20, 20), 0); m_bg_color->SetColor(wxColour(255, 255, 255)); bBGColorSizer->Add(m_bg_color, 0, wxALL, 5); m_bg_label = new wxStaticText(m_custom_colors, wxID_ANY, _("Background"), wxDefaultPosition, wxDefaultSize, 0); m_bg_label->Wrap(-1); bBGColorSizer->Add(m_bg_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5); bColorsSizer1->Add(bBGColorSizer, 0, wxEXPAND, 5); wxBoxSizer* bActionColorSizer; bActionColorSizer = new wxBoxSizer(wxHORIZONTAL); m_action_color = new ColorButton(m_custom_colors, ID_ACTION, wxBitmap(), wxDefaultPosition, wxSize(20, 20), 0); m_action_color->SetColor(wxColour(255, 0, 249)); bActionColorSizer->Add(m_action_color, 0, wxALL, 5); m_action_label = new wxStaticText(m_custom_colors, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0); m_action_label->Wrap(-1); bActionColorSizer->Add(m_action_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5); bColorsSizer1->Add(bActionColorSizer, 0, wxEXPAND, 5); wxBoxSizer* bHighlightColorSizer; bHighlightColorSizer = new wxBoxSizer(wxHORIZONTAL); m_highlight_color = new ColorButton(m_custom_colors, ID_HIGHLIGHT, wxBitmap(), wxDefaultPosition, wxSize(20, 20), 0); m_highlight_color->SetColor(wxColour(255, 0, 44)); bHighlightColorSizer->Add(m_highlight_color, 0, wxALL, 5); m_highlight_label = new wxStaticText(m_custom_colors, wxID_ANY, _("Highlight"), wxDefaultPosition, wxDefaultSize, 0); m_highlight_label->Wrap(-1); bHighlightColorSizer->Add(m_highlight_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5); bColorsSizer1->Add(bHighlightColorSizer, 0, wxEXPAND, 5); wxBoxSizer* bJoinLeaveColorSizer; bJoinLeaveColorSizer = new wxBoxSizer(wxHORIZONTAL); m_joinleave_color = new ColorButton(m_custom_colors, ID_JOINLEAVE, wxBitmap(), wxDefaultPosition, wxSize(20, 20), 0); m_joinleave_color->SetColor(wxColour(24, 255, 0)); bJoinLeaveColorSizer->Add(m_joinleave_color, 0, wxALL, 5); m_joinleave_label = new wxStaticText(m_custom_colors, wxID_ANY, _("Join/Leave"), wxDefaultPosition, wxDefaultSize, 0); m_joinleave_label->Wrap(-1); bJoinLeaveColorSizer->Add(m_joinleave_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5); bColorsSizer1->Add(bJoinLeaveColorSizer, 0, wxEXPAND, 5); wxBoxSizer* bMyColorSizer; bMyColorSizer = new wxBoxSizer(wxHORIZONTAL); m_my_color = new ColorButton(m_custom_colors, ID_MYMESS, wxBitmap(), wxDefaultPosition, wxSize(20, 20), 0); m_my_color->SetColor(wxColour(160, 160, 160)); bMyColorSizer->Add(m_my_color, 0, wxALL, 5); m_my_label = new wxStaticText(m_custom_colors, wxID_ANY, _("My messages"), wxDefaultPosition, wxDefaultSize, 0); m_my_label->Wrap(-1); bMyColorSizer->Add(m_my_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5); bColorsSizer1->Add(bMyColorSizer, 1, wxEXPAND, 5); bColorSizer->Add(bColorsSizer1, 1, wxEXPAND, 5); wxBoxSizer* bColorSizer2; bColorSizer2 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* bServerColorSizer; bServerColorSizer = new wxBoxSizer(wxHORIZONTAL); m_server_color = new ColorButton(m_custom_colors, ID_SERVER, wxBitmap(), wxDefaultPosition, wxSize(20, 20), 0); m_server_color->SetColor(wxColour(255, 189, 0)); bServerColorSizer->Add(m_server_color, 0, wxALL, 5); m_server_label = new wxStaticText(m_custom_colors, wxID_ANY, _("Server"), wxDefaultPosition, wxDefaultSize, 0); m_server_label->Wrap(-1); bServerColorSizer->Add(m_server_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5); bColorSizer2->Add(bServerColorSizer, 0, wxEXPAND, 5); wxBoxSizer* bClientolorSizer; bClientolorSizer = new wxBoxSizer(wxHORIZONTAL); m_client_color = new ColorButton(m_custom_colors, ID_CLIENT, wxBitmap(), wxDefaultPosition, wxSize(20, 20), 0); m_client_color->SetColor(wxColour(255, 189, 0)); bClientolorSizer->Add(m_client_color, 0, wxALL, 5); m_client_label = new wxStaticText(m_custom_colors, wxID_ANY, _("Client"), wxDefaultPosition, wxDefaultSize, 0); m_client_label->Wrap(-1); bClientolorSizer->Add(m_client_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5); bColorSizer2->Add(bClientolorSizer, 0, wxEXPAND, 5); wxBoxSizer* bErrorColorSizer; bErrorColorSizer = new wxBoxSizer(wxHORIZONTAL); m_error_color = new ColorButton(m_custom_colors, ID_ERROR, wxBitmap(), wxDefaultPosition, wxSize(20, 20), 0); m_error_color->SetColor(wxColour(255, 0, 0)); bErrorColorSizer->Add(m_error_color, 0, wxALL, 5); m_error_label = new wxStaticText(m_custom_colors, wxID_ANY, _("Error"), wxDefaultPosition, wxDefaultSize, 0); m_error_label->Wrap(-1); bErrorColorSizer->Add(m_error_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5); bColorSizer2->Add(bErrorColorSizer, 0, wxEXPAND, 5); wxBoxSizer* bTSColorSizer; bTSColorSizer = new wxBoxSizer(wxHORIZONTAL); m_ts_color = new ColorButton(m_custom_colors, ID_TIMESTAMP, wxBitmap(), wxDefaultPosition, wxSize(20, 20), 0); m_ts_color->SetColor(wxColour(160, 160, 160)); bTSColorSizer->Add(m_ts_color, 0, wxALL, 5); m_ts_label = new wxStaticText(m_custom_colors, wxID_ANY, _("Timestamp"), wxDefaultPosition, wxDefaultSize, 0); m_ts_label->Wrap(-1); bTSColorSizer->Add(m_ts_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5); bColorSizer2->Add(bTSColorSizer, 0, wxEXPAND, 5); wxBoxSizer* bNoteColorSizer; bNoteColorSizer = new wxBoxSizer(wxHORIZONTAL); m_note_color = new ColorButton(m_custom_colors, ID_NOTIFICATION, wxBitmap(), wxDefaultPosition, wxSize(20, 20), 0); m_note_color->SetColor(wxColour(255, 191, 0)); bNoteColorSizer->Add(m_note_color, 0, wxALL, 5); m_note_label = new wxStaticText(m_custom_colors, wxID_ANY, _("Notification"), wxDefaultPosition, wxDefaultSize, 0); m_note_label->Wrap(-1); bNoteColorSizer->Add(m_note_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5); bColorSizer2->Add(bNoteColorSizer, 0, wxEXPAND, 5); bColorSizer->Add(bColorSizer2, 1, wxEXPAND, 5); bCustomColorsSizer->Add(bColorSizer, 1, wxEXPAND, 5); m_test_text = new wxTextCtrl(m_custom_colors, wxID_ANY, _("[19:35] ** Server ** Connected to Server.\n[22:30] <Dude> hi everyone\n[22:30] ** Dude2 joined the channel.\n[22:30] * Dude2 thinks his colors looks nice\n[22:45] <Dude> Dude2: orl?\n[22:46] <Dude2> But could be better, should tweak them some more...\n"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH); bCustomColorsSizer->Add(m_test_text, 1, wxALL | wxEXPAND, 5); m_custom_colors->SetSizer(bCustomColorsSizer); m_custom_colors->Layout(); bCustomColorsSizer->Fit(m_custom_colors); bColorsVSizer->Add(m_custom_colors, 1, wxEXPAND | wxALL, 0); wxBoxSizer* bFontNameSizer; bFontNameSizer = new wxBoxSizer(wxHORIZONTAL); m_font_label = new wxStaticText(this, wxID_ANY, _("Font:"), wxDefaultPosition, wxDefaultSize, 0); m_font_label->Wrap(-1); bFontNameSizer->Add(m_font_label, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); m_fontname = new wxStaticText(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0); m_fontname->Wrap(-1); bFontNameSizer->Add(m_fontname, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); m_select_font = new wxButton(this, ID_SELFONT, _("Select..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); bFontNameSizer->Add(m_select_font, 0, wxALL, 5); bColorsVSizer->Add(bFontNameSizer, 0, wxEXPAND, 5); sbColorsSizer->Add(bColorsVSizer, 1, wxEXPAND, 5); m_main_sizer->Add(sbColorsSizer, 0, wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT | wxTOP, 5); wxStaticBoxSizer* sbBehaviorSizer; sbBehaviorSizer = new wxStaticBoxSizer(new wxStaticBox(this, -1, _("Behavior")), wxHORIZONTAL); m_irc_colors = new wxCheckBox(this, wxID_ANY, _("Enable Irc colors in chat messages"), wxDefaultPosition, wxDefaultSize, 0); m_irc_colors->SetValue(sett().GetUseIrcColors()); sbBehaviorSizer->Add(m_irc_colors, 0, wxALL, 5); #ifndef DISABLE_SOUND m_play_sounds = new wxCheckBox(this, ID_PLAY_SOUNDS, _("Play notification sounds"), wxDefaultPosition, wxDefaultSize, 0); m_play_sounds->SetValue(sett().GetChatPMSoundNotificationEnabled()); sbBehaviorSizer->Add(m_play_sounds, 0, wxALL, 5); #endif m_broadcast_check = new wxCheckBox(this, wxID_ANY, _("Copy server messages in current channel"), wxDefaultPosition, wxDefaultSize, 0); m_broadcast_check->SetValue(cfg().ReadBool(_T("/Chat/BroadcastEverywhere"))); sbBehaviorSizer->Add(m_broadcast_check, 0, wxALL, 5); m_main_sizer->Add(sbBehaviorSizer, 0, wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT, 5); wxBoxSizer* bBotomSizer; bBotomSizer = new wxBoxSizer(wxHORIZONTAL); wxStaticBoxSizer* sbChatLogSizer; wxStaticBox* sbChatLog = new wxStaticBox(this, -1, _("Chat logs")); sbChatLogSizer = new wxStaticBoxSizer(sbChatLog, wxVERTICAL); m_save_logs = new wxCheckBox(this, wxID_ANY, _("Save chat logs"), wxDefaultPosition, wxDefaultSize, 0); m_save_logs->SetValue(cfg().ReadBool(_T("/ChatLog/chatlog_enable"))); sbChatLogSizer->Add(m_save_logs, 0, wxALL, 5); wxBoxSizer* m_num_lines_sizer = new wxBoxSizer(wxHORIZONTAL); m_num_lines = new wxSpinCtrl(this, wxID_ANY); m_num_lines_lbl = new wxStaticText(this, wxID_ANY, _("approx. number of lines loaded from log into chat"), wxDefaultPosition, wxDefaultSize, 0); m_num_lines_sizer->Add(m_num_lines); m_num_lines_sizer->Add(m_num_lines_lbl, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 5); sbChatLogSizer->Add(m_num_lines_sizer, 0, wxALL, 5); bBotomSizer->Add(sbChatLogSizer, 1, wxEXPAND | wxRIGHT, 5); wxStaticBoxSizer* sbHighlightSizer; sbHighlightSizer = new wxStaticBoxSizer(new wxStaticBox(this, -1, _("Highlight words")), wxVERTICAL); m_hilight_words_label = new wxStaticText(this, wxID_ANY, _("Words to highlight in chat:"), wxDefaultPosition, wxDefaultSize, 0); m_hilight_words_label->Wrap(-1); sbHighlightSizer->Add(m_hilight_words_label, 0, wxALL, 5); sbHighlightSizer->Add(0, 0, 1, wxEXPAND, 5); m_highlight_words = new wxTextCtrl(this, ID_HIWORDS, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0); m_highlight_words->SetToolTip(_("enter a ; separated list")); sbHighlightSizer->Add(m_highlight_words, 0, wxALL | wxEXPAND, 5); m_highlight_req = new wxCheckBox(this, ID_HL_REQ, _("Additionally play sound/flash titlebar "), wxDefaultPosition, wxDefaultSize, 0); sbHighlightSizer->Add(m_highlight_req, 0, wxALL | wxEXPAND, 5); bBotomSizer->Add(sbHighlightSizer, 1, wxEXPAND, 5); m_main_sizer->Add(bBotomSizer, 0, wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT, 5); m_main_sizer->Add(0, 0, 1, wxEXPAND | wxALL, 5); SetSizer(m_main_sizer); DoRestore(); UpdateTextSample(); UpdateFontLabel(); Layout(); }
SpringOptionsTab::SpringOptionsTab(wxWindow* parent) : wxScrolledWindow(parent, -1) { wxBoxSizer* windowSizer = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* groupListSizer = new wxBoxSizer(wxVERTICAL); m_spring_list = new wxListBox(this, SPRING_LIST, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_ALWAYS_SB | wxLB_SINGLE | wxLB_SORT); groupListSizer->Add(m_spring_list, 1, wxEXPAND | wxTOP | wxRIGHT | wxLEFT, 5); wxBoxSizer* groupListButtonsSizer = new wxBoxSizer(wxHORIZONTAL); m_remove_spring_button = new wxButton(this, SPRING_REMOVE, _("Remove"), wxDefaultPosition, wxSize(-1, -1), wxBU_EXACTFIT); m_remove_spring_button->SetToolTip(_("Remove an existing spring version")); groupListButtonsSizer->Add(m_remove_spring_button, 0, wxTOP | wxRIGHT | wxLEFT, 5); groupListButtonsSizer->Add(0, 0, 1, wxEXPAND, 5); m_add_spring_button = new wxButton(this, SPRING_ADD, _("Add New.."), wxDefaultPosition, wxSize(-1, -1), wxBU_EXACTFIT); m_add_spring_button->SetToolTip(_("Add new spring version")); groupListButtonsSizer->Add(m_add_spring_button, 0, wxTOP | wxRIGHT | wxLEFT, 5); m_auto_btn = new wxButton(this, SPRING_AUTOCONF, _("Auto Configure"), wxDefaultPosition, wxSize(-1, -1), wxBU_EXACTFIT); groupListButtonsSizer->Add(m_auto_btn, 0, wxTOP | wxRIGHT | wxLEFT, 5); groupListSizer->Add(groupListButtonsSizer, 0, wxEXPAND | wxBOTTOM, 5); /* ================================ * Spring executable */ m_exec_box = new wxStaticBox(this, -1, _("Spring executable")); m_exec_loc_text = new wxStaticText(this, -1, _("Location")); m_exec_edit = new wxTextCtrl(this, -1, TowxString(SlPaths::GetSpringBinary())); m_exec_browse_btn = new wxButton(this, SPRING_EXECBROWSE, _("Browse")); m_exec_find_btn = new wxButton(this, SPRING_EXECFIND, _("Find")); /* ================================ * UnitSync */ m_sync_box = new wxStaticBox(this, -1, _("UnitSync library")); m_sync_edit = new wxTextCtrl(this, -1, TowxString(SlPaths::GetUnitSync())); m_sync_loc_text = new wxStaticText(this, -1, _("Location")); m_sync_browse_btn = new wxButton(this, SPRING_SYNCBROWSE, _("Browse")); m_sync_find_btn = new wxButton(this, SPRING_SYNCFIND, _("Find")); m_restore_btn = new wxButton(this, SPRING_RESTORE, _("Restore Paths")); // m_datadir_btn = new wxButton( this, SPRING_DATADIR, _( "Change Datadir path" ) ); wxBoxSizer* m_main_sizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer* m_aconf_sizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer* m_exec_loc_sizer = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* m_sync_loc_sizer = new wxBoxSizer(wxHORIZONTAL); m_exec_loc_sizer->Add(m_exec_loc_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2); m_exec_loc_sizer->Add(m_exec_edit, 1, wxEXPAND); m_exec_loc_sizer->Add(m_exec_browse_btn); m_exec_loc_sizer->Add(m_exec_find_btn); m_sync_loc_sizer->Add(m_sync_loc_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2); m_sync_loc_sizer->Add(m_sync_edit, 1, wxEXPAND); m_sync_loc_sizer->Add(m_sync_browse_btn); m_sync_loc_sizer->Add(m_sync_find_btn); m_exec_box_sizer = new wxStaticBoxSizer(m_exec_box, wxHORIZONTAL); m_sync_box_sizer = new wxStaticBoxSizer(m_sync_box, wxHORIZONTAL); m_exec_box_sizer->Add(m_exec_loc_sizer, 1, wxEXPAND | wxALL, 2); m_sync_box_sizer->Add(m_sync_loc_sizer, 1, wxEXPAND | wxALL, 2); m_aconf_sizer->AddStretchSpacer(); m_aconf_sizer->Add(m_restore_btn); // m_aconf_sizer->Add( m_datadir_btn ); m_main_sizer->Add(m_exec_box_sizer, 0, wxEXPAND | wxALL, 5); m_main_sizer->Add(m_sync_box_sizer, 0, wxEXPAND | wxALL, 5); m_main_sizer->Add(m_aconf_sizer, 0, wxEXPAND | wxALL, 5); m_main_sizer->AddStretchSpacer(); windowSizer->Add(groupListSizer, 0, wxEXPAND | wxBOTTOM | wxLEFT); windowSizer->Add(m_main_sizer, 1, wxEXPAND); SetSizer(windowSizer); SetScrollRate(SCROLL_RATE, SCROLL_RATE); ReloadSpringList(); Layout(); DoRestore(); }
void ChatOptionsTab::OnRestore(wxCommandEvent& /*unused*/) { DoRestore(); }
SpringOptionsTab::SpringOptionsTab( wxWindow* parent ) : wxScrolledWindow( parent, -1 ) { m_dontsearch_chkbox = new wxCheckBox( this, SPRING_DONTSEARCH, _("Search only in current installed path"), wxDefaultPosition, wxSize(-1,CONTROL_HEIGHT) ); m_dontsearch_chkbox->SetValue( sett().GetSearchSpringOnlyInSLPath() ); m_oldlaunch_chkbox = new wxCheckBox( this, SPRING_DONTSEARCH, _("Use old launch method"), wxDefaultPosition, wxSize(-1,CONTROL_HEIGHT) ); m_oldlaunch_chkbox->SetValue( sett().UseOldSpringLaunchMethod() ); #ifndef __WXMSW__ m_dontsearch_chkbox->Disable(); m_oldlaunch_chkbox->Disable(); #endif /* ================================ * Spring executable */ m_exec_box = new wxStaticBox( this, -1, _( "Spring executable" ) ); m_exec_loc_text = new wxStaticText( this, -1, _( "Location" ) ); m_exec_edit = new wxTextCtrl( this, -1, sett().GetCurrentUsedSpringBinary() ); m_exec_browse_btn = new wxButton( this, SPRING_EXECBROWSE, _( "Browse" ) ); m_exec_find_btn = new wxButton( this, SPRING_EXECFIND, _( "Find" ) ); /* ================================ * UnitSync */ m_sync_box = new wxStaticBox( this, -1, _( "UnitSync library" ) ); m_sync_edit = new wxTextCtrl( this, -1, sett().GetCurrentUsedUnitSync() ); m_sync_loc_text = new wxStaticText( this, -1, _( "Location" ) ); m_sync_browse_btn = new wxButton( this, SPRING_SYNCBROWSE, _( "Browse" ) ); m_sync_find_btn = new wxButton( this, SPRING_SYNCFIND, _( "Find" ) ); m_auto_btn = new wxButton( this, SPRING_AUTOCONF, _( "Auto Configure" ) ); m_datadir_btn = new wxButton( this, SPRING_DATADIR, _( "Change Datadir path" ) ); m_main_sizer = new wxBoxSizer( wxVERTICAL ); m_aconf_sizer = new wxBoxSizer( wxVERTICAL ); m_exec_loc_sizer = new wxBoxSizer( wxHORIZONTAL ); m_sync_loc_sizer = new wxBoxSizer( wxHORIZONTAL ); m_exec_loc_sizer->Add( m_exec_loc_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2 ); m_exec_loc_sizer->Add( m_exec_edit, 1, wxEXPAND ); m_exec_loc_sizer->Add( m_exec_browse_btn ); m_exec_loc_sizer->Add( m_exec_find_btn ); m_sync_loc_sizer->Add( m_sync_loc_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2 ); m_sync_loc_sizer->Add( m_sync_edit, 1, wxEXPAND ); m_sync_loc_sizer->Add( m_sync_browse_btn ); m_sync_loc_sizer->Add( m_sync_find_btn ); m_exec_box_sizer = new wxStaticBoxSizer( m_exec_box, wxVERTICAL ); m_sync_box_sizer = new wxStaticBoxSizer( m_sync_box, wxVERTICAL ); m_exec_box_sizer->Add( m_exec_loc_sizer, 0, wxEXPAND | wxALL, 2 ); m_sync_box_sizer->Add( m_sync_loc_sizer, 0, wxEXPAND | wxALL, 2 ); m_aconf_sizer->AddStretchSpacer(); m_aconf_sizer->Add( m_auto_btn ); m_aconf_sizer->Add( m_datadir_btn ); m_main_sizer->Add( m_dontsearch_chkbox, 0, wxEXPAND | wxALL, 5 ); m_main_sizer->Add( m_exec_box_sizer, 0, wxEXPAND | wxALL, 5 ); m_main_sizer->Add( m_sync_box_sizer, 0, wxEXPAND | wxALL, 5 ); m_main_sizer->Add( m_oldlaunch_chkbox, 0, wxEXPAND | wxALL, 5 ); m_main_sizer->Add( m_aconf_sizer, 0, wxEXPAND | wxALL, 5 ); m_main_sizer->AddStretchSpacer(); SetSizer( m_main_sizer ); SetScrollRate( SCROLL_RATE, SCROLL_RATE ); Layout(); DoRestore(); if ( sett().IsPortableMode() || sett().GetSearchSpringOnlyInSLPath() ) { m_exec_box->Disable(); m_sync_box->Disable(); m_auto_btn->Disable(); m_datadir_btn->Disable(); } if ( sett().IsFirstRun() ) { sett().SetSpringBinary( sett().GetCurrentUsedSpringIndex(), m_exec_edit->GetValue() ); sett().SetUnitSync( sett().GetCurrentUsedSpringIndex(), m_sync_edit->GetValue() ); sett().SetSearchSpringOnlyInSLPath( m_dontsearch_chkbox->IsChecked() ); } }