Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
94ba271
Keybindings dialog overhaul: friendly names, shortcut column, descrip…
heffneil Jun 30, 2026
3e99cdd
Preferences: modern left-nav (treebook), SVG icons, Random Effects sh…
heffneil Jun 30, 2026
787247a
Merge remote-tracking branch 'fork/keybindings-dialog-cleanup' into p…
heffneil Jun 30, 2026
7ad99d1
Preferences: embed Key Bindings editor as a page; drop File-menu item
heffneil Jun 30, 2026
0c2360f
Preferences: colourful per-page icons (white glyph on coloured tile)
heffneil Jun 30, 2026
3f27d4b
Preferences: rename Services page to AI (sparkle icon)
heffneil Jun 30, 2026
dd7c997
Preferences: split video/codec settings into their own Video page
heffneil Jul 5, 2026
77d72c9
Preferences: make the dialog modeless (stays open while you work)
heffneil Jul 5, 2026
63e2751
Preferences: widen Random Effects lists so effect names aren't clipped
heffneil Jul 6, 2026
aae2a9c
Preferences: match AI page font to the rest of the dialog
heffneil Jul 6, 2026
fce2d1c
Preferences: uniform bold section headers + Key Bindings category filter
heffneil Jul 6, 2026
4ab32f3
Preferences: use bold text section headers on Other/Video pages
heffneil Jul 6, 2026
42f22a0
Preferences: describe every Other-page setting; label Effects categor…
heffneil Jul 7, 2026
69a25ec
Preferences: hand-write Backup page with bold headers + per-setting d…
heffneil Jul 8, 2026
83d0b04
Sequencer/Preferences: add bindable Copy Layers-SubModels to Models; …
heffneil Jul 8, 2026
2242afb
Preferences: alphabetize left-nav pages; stop Random Effects lists cl…
heffneil Jul 8, 2026
35f6be5
Preferences: hide Other-page descriptions with their hidden controls;…
heffneil Jul 8, 2026
6948d6e
Preferences: enforce a minimum dialog size so pages can't be narrowed…
heffneil Jul 8, 2026
4ba5857
Preferences: rebuild Random Effects lists after layout so names aren'…
heffneil Jul 8, 2026
4831240
Preferences: hand-write Check Sequence and Output pages with visible …
heffneil Jul 8, 2026
4ae71f0
Preferences: hand-write View and Effects Grid pages with visible desc…
heffneil Jul 8, 2026
1cb9f6b
Preferences: bold section headers on the Color Manager page
heffneil Jul 8, 2026
f5716c7
Merge remote-tracking branch 'origin/master' into preferences-modernize
heffneil Jul 8, 2026
1b13c65
Preferences: fix KeyBindings.h include path for CMake (Linux/Windows)…
heffneil Jul 8, 2026
4e65f6e
Merge remote-tracking branch 'origin/master' into preferences-modernize
heffneil Jul 8, 2026
2b663b5
Preferences: remove the Cancel button (changes apply live, nothing to…
heffneil Jul 9, 2026
955512a
Preferences: address Copilot review
heffneil Jul 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
521 changes: 0 additions & 521 deletions src-ui-wx/app-shell/KeyBindingEditDialog.cpp

This file was deleted.

87 changes: 0 additions & 87 deletions src-ui-wx/app-shell/KeyBindingEditDialog.h

This file was deleted.

264 changes: 133 additions & 131 deletions src-ui-wx/app-shell/KeyBindings.cpp

Large diffs are not rendered by default.

144 changes: 59 additions & 85 deletions src-ui-wx/preferences/BackupSettingsPanel.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************
* This source files comes from the xLights project
* This source file comes from the xLights project
* https://www.xlights.org
* https://github.com/xLightsSequencer/xLights
* See the github commit history for a record of contributing
Expand All @@ -9,103 +9,84 @@
**************************************************************/

#include "BackupSettingsPanel.h"
#include "PrefPanelUtils.h"

//(*InternalHeaders(BackupSettingsPanel)
#include <wx/checkbox.h>
#include <wx/choice.h>
#include <wx/dir.h>
#include <wx/filepicker.h>
#include <wx/gbsizer.h>
#include <wx/intl.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/string.h>
//*)

#include <wx/preferences.h>
#include "xLightsMain.h"

//(*IdInit(BackupSettingsPanel)
const long BackupSettingsPanel::ID_CHECKBOX1 = wxNewId();
const long BackupSettingsPanel::ID_CHECKBOX2 = wxNewId();
const long BackupSettingsPanel::ID_CHECKBOX3 = wxNewId();
const long BackupSettingsPanel::ID_STATICTEXT1 = wxNewId();
const long BackupSettingsPanel::ID_CHOICE1 = wxNewId();
const long BackupSettingsPanel::ID_CHECKBOX4 = wxNewId();
const long BackupSettingsPanel::ID_DIRPICKERCTRL1 = wxNewId();
const long BackupSettingsPanel::ID_DIRPICKERCTRL2 = wxNewId();
//*)

BEGIN_EVENT_TABLE(BackupSettingsPanel,wxPanel)
//(*EventTable(BackupSettingsPanel)
//*)
END_EVENT_TABLE()


BackupSettingsPanel::BackupSettingsPanel(wxWindow* parent, xLightsFrame *f, wxWindowID id) : frame(f)
{
//(*Initialize(BackupSettingsPanel)
wxFlexGridSizer* FlexGridSizer1;
wxGridBagSizer* GridBagSizer1;
wxStaticBoxSizer* StaticBoxSizer1;
wxStaticBoxSizer* StaticBoxSizer2;

Create(parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("id"));
GridBagSizer1 = new wxGridBagSizer(0, 0);
BackupOnSaveCheckBox = new wxCheckBox(this, ID_CHECKBOX1, _("Backup On Save"), wxDefaultPosition, wxSize(400,-1), 0, wxDefaultValidator, _T("ID_CHECKBOX1"));
BackupOnSaveCheckBox->SetValue(false);
GridBagSizer1->Add(BackupOnSaveCheckBox, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL|wxEXPAND, 5);
BackupOnLaunchCheckBox = new wxCheckBox(this, ID_CHECKBOX2, _("Backup On Launch"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX2"));
BackupOnLaunchCheckBox->SetValue(false);
GridBagSizer1->Add(BackupOnLaunchCheckBox, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL|wxEXPAND, 5);
BackupSubfoldersCheckBox = new wxCheckBox(this, ID_CHECKBOX3, _("Backup Subfolders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX3"));
BackupSubfoldersCheckBox->SetValue(false);
GridBagSizer1->Add(BackupSubfoldersCheckBox, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL|wxEXPAND, 5);
FlexGridSizer1 = new wxFlexGridSizer(0, 2, 0, 0);
FlexGridSizer1->AddGrowableCol(1);
StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("Purge Backups"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
FlexGridSizer1->Add(StaticText1, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
PurgeIntervalChoice = new wxChoice(this, ID_CHOICE1, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE1"));
PurgeIntervalChoice->SetSelection( PurgeIntervalChoice->Append(_("Never")) );
PurgeIntervalChoice->Append(_("Older than 360 days"));
PurgeIntervalChoice->Append(_("Older than 90 days"));
PurgeIntervalChoice->Append(_("Older than 30 days"));
PurgeIntervalChoice->Append(_("Older than 7 days"));
FlexGridSizer1->Add(PurgeIntervalChoice, 1, wxALL|wxEXPAND, 5);
GridBagSizer1->Add(FlexGridSizer1, wxGBPosition(3, 0), wxDefaultSpan, wxALL|wxEXPAND, 5);
StaticBoxSizer1 = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Backup Directory"));
CheckBox_Backup = new wxCheckBox(this, ID_CHECKBOX4, _("Use Show Folder"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX4"));
CheckBox_Backup->SetValue(false);
StaticBoxSizer1->Add(CheckBox_Backup, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
DirPickerCtrl_Backup = new wxDirPickerCtrl(this, ID_DIRPICKERCTRL1, wxEmptyString, wxEmptyString, wxDefaultPosition, wxSize(400,-1), wxDIRP_DIR_MUST_EXIST|wxDIRP_USE_TEXTCTRL, wxDefaultValidator, _T("ID_DIRPICKERCTRL1"));
StaticBoxSizer1->Add(DirPickerCtrl_Backup, 1, wxALL|wxEXPAND, 5);
GridBagSizer1->Add(StaticBoxSizer1, wxGBPosition(4, 0), wxDefaultSpan, wxALL|wxEXPAND, 5);
StaticBoxSizer2 = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Alternative Backup Directory"));
DirPickerCtrl_AltBackup = new wxDirPickerCtrl(this, ID_DIRPICKERCTRL2, wxEmptyString, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRP_DIR_MUST_EXIST|wxDIRP_USE_TEXTCTRL, wxDefaultValidator, _T("ID_DIRPICKERCTRL2"));
StaticBoxSizer2->Add(DirPickerCtrl_AltBackup, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
GridBagSizer1->Add(StaticBoxSizer2, wxGBPosition(5, 0), wxDefaultSpan, wxALL|wxEXPAND, 5);
SetSizer(GridBagSizer1);
GridBagSizer1->Fit(this);
GridBagSizer1->SetSizeHints(this);

Connect(ID_CHECKBOX1,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&BackupSettingsPanel::OnBackupOnSaveCheckBoxClick);
Connect(ID_CHECKBOX2,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&BackupSettingsPanel::OnBackupOnLaunchCheckBoxClick);
Connect(ID_CHECKBOX3,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&BackupSettingsPanel::OnBackupSubfoldersCheckBoxClick);
Connect(ID_CHOICE1,wxEVT_COMMAND_CHOICE_SELECTED,(wxObjectEventFunction)&BackupSettingsPanel::OnPurgeIntervalChoiceSelect);
Connect(ID_CHECKBOX4,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&BackupSettingsPanel::OnCheckBox_BackupClick);
Connect(ID_DIRPICKERCTRL1,wxEVT_COMMAND_DIRPICKER_CHANGED,(wxObjectEventFunction)&BackupSettingsPanel::OnDirPickerCtrl_BackupDirChanged);
Connect(ID_DIRPICKERCTRL2,wxEVT_COMMAND_DIRPICKER_CHANGED,(wxObjectEventFunction)&BackupSettingsPanel::OnDirPickerCtrl_AltBackupDirChanged);
//*)

#ifdef _MSC_VER
Create(parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("id"));

auto* sizer = new wxBoxSizer(wxVERTICAL);

BackupOnSaveCheckBox = new wxCheckBox(this, wxID_ANY, _("Backup On Save"));
sizer->Add(BackupOnSaveCheckBox, 0, wxLEFT | wxTOP, 5);
sizer->Add(MakePreferenceHint(this, _("Make a backup copy of the show folder every time you save.")), 0, wxLEFT | wxBOTTOM, 24);

BackupOnLaunchCheckBox = new wxCheckBox(this, wxID_ANY, _("Backup On Launch"));
sizer->Add(BackupOnLaunchCheckBox, 0, wxLEFT | wxTOP, 5);
sizer->Add(MakePreferenceHint(this, _("Make a backup copy of the show folder each time xLights starts.")), 0, wxLEFT | wxBOTTOM, 24);

BackupSubfoldersCheckBox = new wxCheckBox(this, wxID_ANY, _("Backup Subfolders"));
sizer->Add(BackupSubfoldersCheckBox, 0, wxLEFT | wxTOP, 5);
sizer->Add(MakePreferenceHint(this, _("Include the show folder's subfolders in the backup.")), 0, wxLEFT | wxBOTTOM, 24);

auto* purgeRow = new wxBoxSizer(wxHORIZONTAL);
purgeRow->Add(new wxStaticText(this, wxID_ANY, _("Purge Backups")), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
PurgeIntervalChoice = new wxChoice(this, wxID_ANY);
PurgeIntervalChoice->SetSelection(PurgeIntervalChoice->Append(_("Never")));
PurgeIntervalChoice->Append(_("Older than 360 days"));
PurgeIntervalChoice->Append(_("Older than 90 days"));
PurgeIntervalChoice->Append(_("Older than 30 days"));
PurgeIntervalChoice->Append(_("Older than 7 days"));
purgeRow->Add(PurgeIntervalChoice, 0, wxEXPAND);
sizer->Add(purgeRow, 0, wxLEFT | wxTOP, 5);
sizer->Add(MakePreferenceHint(this, _("Automatically delete backups older than the chosen age.")), 0, wxLEFT | wxBOTTOM, 5);

sizer->Add(MakePreferenceSectionHeader(this, _("Backup Directory")), 0, wxLEFT | wxTOP, 10);
sizer->Add(MakePreferenceHint(this, _("Where backups are written. Use the show folder, or untick to choose a custom location.")), 0, wxLEFT, 16);
auto* backupRow = new wxBoxSizer(wxHORIZONTAL);
CheckBox_Backup = new wxCheckBox(this, wxID_ANY, _("Use Show Folder"));
backupRow->Add(CheckBox_Backup, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
DirPickerCtrl_Backup = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxEmptyString, wxDefaultPosition, wxSize(400, -1), wxDIRP_DIR_MUST_EXIST | wxDIRP_USE_TEXTCTRL);
backupRow->Add(DirPickerCtrl_Backup, 1, wxEXPAND);
sizer->Add(backupRow, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, 16);

sizer->Add(MakePreferenceSectionHeader(this, _("Alternative Backup Directory")), 0, wxLEFT | wxTOP, 10);
sizer->Add(MakePreferenceHint(this, _("Optional second location backups are also copied to (e.g. an external or cloud drive).")), 0, wxLEFT, 16);
DirPickerCtrl_AltBackup = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxEmptyString, wxDefaultPosition, wxSize(400, -1), wxDIRP_DIR_MUST_EXIST | wxDIRP_USE_TEXTCTRL);
sizer->Add(DirPickerCtrl_AltBackup, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, 16);

SetSizer(sizer);
sizer->SetSizeHints(this);

BackupOnSaveCheckBox->Bind(wxEVT_CHECKBOX, &BackupSettingsPanel::OnBackupOnSaveCheckBoxClick, this);
BackupOnLaunchCheckBox->Bind(wxEVT_CHECKBOX, &BackupSettingsPanel::OnBackupOnLaunchCheckBoxClick, this);
BackupSubfoldersCheckBox->Bind(wxEVT_CHECKBOX, &BackupSettingsPanel::OnBackupSubfoldersCheckBoxClick, this);
PurgeIntervalChoice->Bind(wxEVT_CHOICE, &BackupSettingsPanel::OnPurgeIntervalChoiceSelect, this);
CheckBox_Backup->Bind(wxEVT_CHECKBOX, &BackupSettingsPanel::OnCheckBox_BackupClick, this);
DirPickerCtrl_Backup->Bind(wxEVT_DIRPICKER_CHANGED, &BackupSettingsPanel::OnDirPickerCtrl_BackupDirChanged, this);
DirPickerCtrl_AltBackup->Bind(wxEVT_DIRPICKER_CHANGED, &BackupSettingsPanel::OnDirPickerCtrl_AltBackupDirChanged, this);

#ifdef _MSC_VER
MSWDisableComposited();
#endif
#endif
}

BackupSettingsPanel::~BackupSettingsPanel()
{
//(*Destroy(BackupSettingsPanel)
//*)
}

bool BackupSettingsPanel::TransferDataToWindow() {
BackupOnSaveCheckBox->SetValue(frame->BackupOnSave());
BackupOnLaunchCheckBox->SetValue(frame->BackupOnLaunch());
Expand Down Expand Up @@ -232,13 +213,6 @@ void BackupSettingsPanel::OnCheckBox_BackupClick(wxCommandEvent& event)
}
}

void BackupSettingsPanel::OnCheckBox_AltBackupClick(wxCommandEvent& event)
{
if (wxPreferencesEditor::ShouldApplyChangesImmediately()) {
TransferDataFromWindow();
}
}

void BackupSettingsPanel::OnDirPickerCtrl_BackupDirChanged(wxFileDirPickerEvent& event)
{
if (wxPreferencesEditor::ShouldApplyChangesImmediately()) {
Expand Down
65 changes: 19 additions & 46 deletions src-ui-wx/preferences/BackupSettingsPanel.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

/***************************************************************
* This source files comes from the xLights project
* This source file comes from the xLights project
* https://www.xlights.org
* https://github.com/xLightsSequencer/xLights
* See the github commit history for a record of contributing
Expand All @@ -10,19 +10,13 @@
* License: https://github.com/xLightsSequencer/xLights/blob/master/License.txt
**************************************************************/

//(*Headers(BackupSettingsPanel)
#include <wx/panel.h>
#include <wx/filepicker.h>

class wxCheckBox;
class wxChoice;
class wxDirPickerCtrl;
class wxFlexGridSizer;
class wxGridBagSizer;
class wxStaticBoxSizer;
class wxStaticText;
//*)

#include <wx/filepicker.h>

class wxCommandEvent;
class xLightsFrame;

class BackupSettingsPanel: public wxPanel
Expand All @@ -34,46 +28,25 @@ class BackupSettingsPanel: public wxPanel
BackupSettingsPanel(wxWindow* parent, xLightsFrame *frame, wxWindowID id=wxID_ANY);
virtual ~BackupSettingsPanel();

//(*Declarations(BackupSettingsPanel)
wxCheckBox* BackupOnLaunchCheckBox;
wxCheckBox* BackupOnSaveCheckBox;
wxCheckBox* BackupSubfoldersCheckBox;
wxCheckBox* CheckBox_Backup;
wxChoice* PurgeIntervalChoice;
wxDirPickerCtrl* DirPickerCtrl_AltBackup;
wxDirPickerCtrl* DirPickerCtrl_Backup;
wxStaticText* StaticText1;
//*)

virtual bool TransferDataFromWindow() override;
virtual bool TransferDataToWindow() override;

protected:

//(*Identifiers(BackupSettingsPanel)
static const long ID_CHECKBOX1;
static const long ID_CHECKBOX2;
static const long ID_CHECKBOX3;
static const long ID_STATICTEXT1;
static const long ID_CHOICE1;
static const long ID_CHECKBOX4;
static const long ID_DIRPICKERCTRL1;
static const long ID_DIRPICKERCTRL2;
//*)

private:
xLightsFrame *frame;

//(*Handlers(BackupSettingsPanel)
void OnBackupOnSaveCheckBoxClick(wxCommandEvent& event);
void OnBackupOnLaunchCheckBoxClick(wxCommandEvent& event);
void OnBackupSubfoldersCheckBoxClick(wxCommandEvent& event);
void OnPurgeIntervalChoiceSelect(wxCommandEvent& event);
void OnCheckBox_BackupClick(wxCommandEvent& event);
void OnCheckBox_AltBackupClick(wxCommandEvent& event);
void OnDirPickerCtrl_BackupDirChanged(wxFileDirPickerEvent& event);
void OnDirPickerCtrl_AltBackupDirChanged(wxFileDirPickerEvent& event);
//*)

DECLARE_EVENT_TABLE()
wxCheckBox* BackupOnLaunchCheckBox = nullptr;
wxCheckBox* BackupOnSaveCheckBox = nullptr;
wxCheckBox* BackupSubfoldersCheckBox = nullptr;
wxCheckBox* CheckBox_Backup = nullptr;
wxChoice* PurgeIntervalChoice = nullptr;
wxDirPickerCtrl* DirPickerCtrl_AltBackup = nullptr;
wxDirPickerCtrl* DirPickerCtrl_Backup = nullptr;

void OnBackupOnSaveCheckBoxClick(wxCommandEvent& event);
void OnBackupOnLaunchCheckBoxClick(wxCommandEvent& event);
void OnBackupSubfoldersCheckBoxClick(wxCommandEvent& event);
void OnPurgeIntervalChoiceSelect(wxCommandEvent& event);
void OnCheckBox_BackupClick(wxCommandEvent& event);
void OnDirPickerCtrl_BackupDirChanged(wxFileDirPickerEvent& event);
void OnDirPickerCtrl_AltBackupDirChanged(wxFileDirPickerEvent& event);
};
Loading
Loading