Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/derwin12/xLights
Browse files Browse the repository at this point in the history
  • Loading branch information
derwin12 committed Nov 18, 2024
2 parents bc7ad8f + 6bdbedb commit 0af418c
Show file tree
Hide file tree
Showing 82 changed files with 128 additions and 201 deletions.
2 changes: 1 addition & 1 deletion macOS
1 change: 0 additions & 1 deletion xLights/BatchRenderDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ void BatchRenderDialog::OnFilterChoiceSelect(wxCommandEvent& event)

wxTreeListItem item = CheckListBox_Sequences->GetFirstItem();
while (item.IsOk()) {
auto seq = CheckListBox_Sequences->GetItemText(item);
if (filelist.Index(CheckListBox_Sequences->GetItemText(item)) != wxNOT_FOUND) {
CheckListBox_Sequences->CheckItem(item);
break;
Expand Down
15 changes: 7 additions & 8 deletions xLights/CheckboxSelectDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <wx/menu.h>

//(*IdInit(CheckboxSelectDialog)
const long CheckboxSelectDialog::ID_CHECKLISTBOXITEMS = wxNewId();
const long CheckboxSelectDialog::ID_BUTTONOK = wxNewId();
const long CheckboxSelectDialog::ID_BUTTONCANCEL = wxNewId();
const wxWindowID CheckboxSelectDialog::ID_CHECKLISTBOXITEMS = wxNewId();
const wxWindowID CheckboxSelectDialog::ID_BUTTONOK = wxNewId();
const wxWindowID CheckboxSelectDialog::ID_BUTTONCANCEL = wxNewId();
//*)

const long CheckboxSelectDialog::ID_MCU_SELECTALL = wxNewId();
Expand All @@ -45,7 +45,7 @@ CheckboxSelectDialog::CheckboxSelectDialog(wxWindow* parent, const wxString &tit
FlexGridSizer1 = new wxFlexGridSizer(0, 1, 0, 0);
FlexGridSizer1->AddGrowableCol(0);
FlexGridSizer1->AddGrowableRow(0);
CheckListBox_Items = new wxCheckListBox(this, ID_CHECKLISTBOXITEMS, wxDefaultPosition, wxSize(-1,300), 0, 0, 0, wxDefaultValidator, _T("ID_CHECKLISTBOXITEMS"));
CheckListBox_Items = new wxCheckListBox(this, ID_CHECKLISTBOXITEMS, wxDefaultPosition, wxSize(-1,300), 0, 0, wxLB_EXTENDED, wxDefaultValidator, _T("ID_CHECKLISTBOXITEMS"));
FlexGridSizer1->Add(CheckListBox_Items, 1, wxALL|wxEXPAND, 5);
FlexGridSizer2 = new wxFlexGridSizer(0, 3, 0, 0);
Button_Ok = new wxButton(this, ID_BUTTONOK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTONOK"));
Expand All @@ -55,12 +55,11 @@ CheckboxSelectDialog::CheckboxSelectDialog(wxWindow* parent, const wxString &tit
FlexGridSizer2->Add(Button_Cancel, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
FlexGridSizer1->Add(FlexGridSizer2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
SetSizer(FlexGridSizer1);
FlexGridSizer1->Fit(this);
FlexGridSizer1->SetSizeHints(this);

Connect(ID_CHECKLISTBOXITEMS,wxEVT_COMMAND_CHECKLISTBOX_TOGGLED,(wxObjectEventFunction)&CheckboxSelectDialog::OnCheckListBox_ItemsToggled);
Connect(ID_BUTTONOK,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&CheckboxSelectDialog::OnButton_OkClick);
Connect(ID_BUTTONCANCEL,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&CheckboxSelectDialog::OnButton_CancelClick);
Connect(ID_CHECKLISTBOXITEMS, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, (wxObjectEventFunction)&CheckboxSelectDialog::OnCheckListBox_ItemsToggled);
Connect(ID_BUTTONOK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&CheckboxSelectDialog::OnButton_OkClick);
Connect(ID_BUTTONCANCEL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&CheckboxSelectDialog::OnButton_CancelClick);
//*)

Connect(ID_CHECKLISTBOXITEMS, wxEVT_CONTEXT_MENU, (wxObjectEventFunction)& CheckboxSelectDialog::OnListRClick);
Expand Down
16 changes: 8 additions & 8 deletions xLights/CheckboxSelectDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
**************************************************************/

//(*Headers(CheckboxSelectDialog)
#include <wx/button.h>
#include <wx/checklst.h>
#include <wx/dialog.h>
#include <wx/sizer.h>
//*)
#include <wx/button.h>
#include <wx/checklst.h>
#include <wx/dialog.h>
#include <wx/sizer.h>
//*)

class CheckboxSelectDialog: public wxDialog
{
Expand All @@ -36,9 +36,9 @@ class CheckboxSelectDialog: public wxDialog
protected:

//(*Identifiers(CheckboxSelectDialog)
static const long ID_CHECKLISTBOXITEMS;
static const long ID_BUTTONOK;
static const long ID_BUTTONCANCEL;
static const wxWindowID ID_CHECKLISTBOXITEMS;
static const wxWindowID ID_BUTTONOK;
static const wxWindowID ID_BUTTONCANCEL;
//*)

static const long ID_MCU_SELECTALL;
Expand Down
2 changes: 1 addition & 1 deletion xLights/ColorCurve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,10 @@ void ColorCurve::LoadXCC(const std::string& filename)
if (root->GetName() == "colorcurve")
{
wxString data = root->GetAttribute("data");
wxString v = root->GetAttribute("SourceVersion");

// Add any colorcurve version conversion logic here
// Source version will be the program version that created the custom model
//wxString v = root->GetAttribute("SourceVersion");

Deserialise(data.ToStdString());
SetActive(true);
Expand Down
4 changes: 2 additions & 2 deletions xLights/ColorPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ void ColorPanel::SetButtonColor(ColorCurveButton* btn, const std::string& cstr,
}

wxString ColorPanel::GetRandomColorString() {
wxString ChildName,AttrName;
wxString AttrName;
wxString ret;
// get palette
wxColour color;
Expand Down Expand Up @@ -891,7 +891,7 @@ std::string ColorPanel::GetCurrentPalette() const

wxString ColorPanel::GetColorString(bool colourOnly)
{
wxString s,ChildName,AttrName;
wxString s, AttrName;
wxColour color;
for (int i=0; i < PALETTE_SIZE; i++)
{
Expand Down
1 change: 0 additions & 1 deletion xLights/ConvertDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@ void ConvertDialog::WriteHLSFile(const wxString& filename) const

bool ConvertDialog::WriteLedBlinkyFile(const wxString& filename)
{
wxString ChannelName, TestName;
wxXmlDocument doc;
wxXmlNode* root = new wxXmlNode(wxXML_ELEMENT_NODE, "LEDAnimation");
doc.SetRoot(root);
Expand Down
3 changes: 1 addition & 2 deletions xLights/CustomModelDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,6 @@ void CustomModelDialog::ReverseSubmodels() {
if (root->GetName() == "subModel") {
const bool isRanges = root->GetAttribute("type", "") == "ranges";
if (isRanges) {
wxArrayString rows;
int line = 0;
while (root->HasAttribute(wxString::Format("line%d", line))) {
auto l = root->GetAttribute(wxString::Format("line%d", line), "");
Expand Down Expand Up @@ -3542,4 +3541,4 @@ void CustomModelDialog::OnRedoGrid(wxCommandEvent& event) {
next_channel++;
SpinCtrlNextChannel->SetValue(next_channel);
}
}
}
1 change: 0 additions & 1 deletion xLights/DragColoursBitmapButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ void DragColoursBitmapButton::OnMouseLeftDown(wxMouseEvent& event)
return;
}

wxString data;
wxTextDataObject dragData(_c);

#ifdef __linux__
Expand Down
1 change: 0 additions & 1 deletion xLights/DragValueCurveBitmapButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ void DragValueCurveBitmapButton::OnMouseLeftDown(wxMouseEvent& event)
return;
}

wxString data;
wxTextDataObject dragData(_vc);

#ifdef __linux__
Expand Down
3 changes: 1 addition & 2 deletions xLights/EffectTreeDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,6 @@ void EffectTreeDialog::PurgeDanglingGifs() {
}

void EffectTreeDialog::OnDropEffect(wxCommandEvent& event) {
wxArrayString parms = wxSplit(event.GetString(), ',');
int x = event.GetExtraLong() >> 16;
int y = event.GetExtraLong() & 0xFFFF;

Expand Down Expand Up @@ -1900,4 +1899,4 @@ void EffectTreeDialog::SortTreeCtrl(wxTreeCtrl* treeCtrl, const wxTreeItemId& it
SortTreeCtrl(treeCtrl, childId);
childId = treeCtrl->GetNextChild(itemId, cookie);
}
}
}
2 changes: 1 addition & 1 deletion xLights/EffectsPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ wxString EffectsPanel::GetRandomEffectStringFromWindow(wxWindow *w, const wxStri
// modifed for partially random, allow random colors also -DJ
wxString EffectsPanel::GetRandomEffectString(int effidx)
{
wxString s,ChildName,AttrName;
wxString s;
wxString prefix=",E_";

// get effect controls
Expand Down
3 changes: 1 addition & 2 deletions xLights/FileConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void FileConverter::ReadLorFile(ConvertParameters& params)
logger_base.debug(" Map Empty Channels? %s.", toStr(params.map_empty_channels));
logger_base.debug(" Map No Network Channels? %s.", toStr(params.map_no_network_channels));

wxString NodeName, msg, deviceType, networkAsString;
wxString NodeName, deviceType, networkAsString;
wxArrayString context;
int unit, circuit, rampdiff;
int i, twinklestate;
Expand Down Expand Up @@ -1148,7 +1148,6 @@ bool FileConverter::LoadVixenProfile(ConvertParameters& params, const wxString&

void FileConverter::ReadVixFile(ConvertParameters& params)
{
wxString msg;
std::vector<unsigned char> VixSeqData;
wxArrayInt VixChannels;
wxArrayString VixChannelNames;
Expand Down
20 changes: 10 additions & 10 deletions xLights/LOREdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ std::string LOREditEffect::GetSettings(std::string& palette) const
wxString thickness = parms[3];
wxString vcThickness;
thickness = RescaleWithRangeI(thickness, "E_VALUECURVE_Spirals_Thickness", 0, 100, 0, 100, vcThickness, SPIRALS_THICKNESS_MIN, SPIRALS_THICKNESS_MAX);
wxString thicknessChange = parms[4];
// wxString thicknessChange = parms[4]; //unused
wxString blend = parms[5];
wxString show3d = parms[6];
wxString speed = parms[7];
Expand Down Expand Up @@ -522,8 +522,8 @@ std::string LOREditEffect::GetSettings(std::string& palette) const
velocity = RescaleWithRangeI(velocity, "IGNORE", 1, 10, 1, 10, vcCrap, -1, -1);
wxString fade = parms[3];
fade = RescaleWithRangeI(fade, "IGNORE", 1, 100, 1, 100, vcCrap, -1, -1);
wxString pattern = parms[4]; // not used
wxString rateChange = parms[5]; // not used
// wxString pattern = parms[4]; // not used
// wxString rateChange = parms[5]; // not used
settings += ",E_SLIDER_Fireworks_Explosions=" + explosionRate;
settings += ",E_SLIDER_Fireworks_Count=" + particles;
settings += ",E_SLIDER_Fireworks_Fade=" + fade;
Expand Down Expand Up @@ -752,19 +752,19 @@ std::string LOREditEffect::GetSettings(std::string& palette) const
// MAX: pinwheel_1, color_per_arm, 10, 100, 32, 50, 10, 32, 200, 200, 50, 50
// pinwheel_1,color_per_arm,10,15,0,0,5,15,200,200,-24,0

wxString style = parms[0];
wxString colour_mode = parms[1];
// wxString style = parms[0]; // unused
// wxString colour_mode = parms[1]; //unused
wxString arms = parms[2];
wxString vcCrap;
arms = RescaleWithRangeI(arms, "IGNORE", 1, 10, 1, 10, vcCrap, -1, -1);
wxString armwidth = parms[3];
wxString vcArmWidth;
armwidth = RescaleWithRangeI(armwidth, "E_VALUECURVE_Pinwheel_Thickness", 0, 100, 0, 100, vcArmWidth, PINWHEEL_THICKNESS_MIN, PINWHEEL_THICKNESS_MAX);
wxString innerRadius = parms[4]; // not used
// wxString innerRadius = parms[4]; // not used
wxString bend = parms[5];
wxString vcBend;
bend = RescaleWithRangeI(bend, "E_VALUECURVE_Pinwheel_Twist", 0, 50, -360, 360, vcBend, PINWHEEL_TWIST_MIN, PINWHEEL_TWIST_MAX);
wxString curvature = parms[6]; // not used
// wxString curvature = parms[6]; // not used
wxString speed = parms[7];
wxString vcSpeed;
bool ccw = false;
Expand All @@ -784,7 +784,7 @@ std::string LOREditEffect::GetSettings(std::string& palette) const
wxString vcLength;
length = RescaleWithRangeI(length, "E_VALUECURVE_Pinwheel_ArmSize", 1, 100, 0, 400, vcLength, PINWHEEL_ARMSIZE_MIN, PINWHEEL_ARMSIZE_MAX);

wxString height = parms[9];
// wxString height = parms[9]; //unused

wxString x = parms[10];
wxString vcX;
Expand Down Expand Up @@ -826,7 +826,7 @@ std::string LOREditEffect::GetSettings(std::string& palette) const
wxString bend = parms[2];
wxString vcBend;
bend = RescaleWithRangeI(bend, "E_VALUECURVE_Pinwheel_Twist", -10, 10, -360, 360, vcBend, PINWHEEL_TWIST_MIN, PINWHEEL_TWIST_MAX);
wxString colour = parms[3]; // not used
// wxString colour = parms[3]; // not used
wxString CCW = parms[4];
wxString speed = parms[5];
wxString vcSpeed;
Expand Down Expand Up @@ -912,7 +912,7 @@ std::string LOREditEffect::GetSettings(std::string& palette) const
wxString speed = parms[6];
speed = RescaleWithRangeI(speed, "IGNORE", 0, 50, 0, 50, vcCrap, -1, -1);
if (parms.size() > 7) {
wxString unknown1 = parms[7]; // unused
// wxString unknown1 = parms[7]; // unused
}

settings += ",E_TEXTCTRL_Text=" + text;
Expand Down
2 changes: 0 additions & 2 deletions xLights/LayoutPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6803,8 +6803,6 @@ void LayoutPanel::DeleteSelectedGroups()
}
}

wxString const namesToDelete = wxJoin(groupsToDelete, ',');

if (wxMessageBox("Are you sure you want to delete the following group(s)?:\n\n" + groupsToConfirm, "Confirm Remove?", wxICON_QUESTION | wxYES_NO) == wxYES) {

CreateUndoPoint("All", wxJoin(groupsToDelete, ','));
Expand Down
2 changes: 0 additions & 2 deletions xLights/MatrixFaceDownloadDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,6 @@ void MatrixFaceDownloadDialog::OnCheckBox_FilterUnsuitableClick(wxCommandEvent&

void MatrixFaceDownloadDialog::OnSearchCtrlFacesSearchClicked(wxCommandEvent& event)
{
wxString const searchFor = SearchCtrlFaces->GetValue().Lower();

// cant search if tree is empty
if (TreeCtrl_Navigator->GetChildrenCount(TreeCtrl_Navigator->GetRootItem()) == 0) {
wxBell();
Expand Down
1 change: 0 additions & 1 deletion xLights/ModelGroupPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,6 @@ bool MGTextDropTarget::OnDropText(wxCoord x, wxCoord y, const wxString& data)

void ModelGroupPanel::OnDrop(wxCommandEvent& event)
{
wxArrayString parms = wxSplit(event.GetString(), ',');
int x = event.GetExtraLong() >> 16;
int y = event.GetExtraLong() & 0xFFFF;

Expand Down
3 changes: 1 addition & 2 deletions xLights/ModelPreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1212,8 +1212,7 @@ bool ModelPreview::StartDrawing(wxDouble pointSize, bool fromPaint)
wxImage image(mBackgroundImage);
if (image.IsOk()) {
backgroundSize.Set(image.GetWidth(), image.GetHeight());
background = currentContext->createTexture(image);
background->Finalize();
background = currentContext->createTexture(image, mBackgroundImage, true);
logger_base.debug(" Loaded.");
} else {
logger_base.debug(" Failed.");
Expand Down
1 change: 0 additions & 1 deletion xLights/ModelStateDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,6 @@ void ModelStateDialog::CopyStates(wxGridEvent& event)

wxMultiChoiceDialog dlg(GetParent(), "", "Select States", choices);
if (dlg.ShowModal() == wxID_OK) {
wxArrayString allNodes;
int stateIdx { 1 };
for (auto const& idx : dlg.GetSelections()) {
auto sd = stateData[choices.at(idx)];
Expand Down
2 changes: 1 addition & 1 deletion xLights/PaletteMgmtDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void PaletteMgmtDialog::OnButtonDeleteClick(wxCommandEvent& event)

void PaletteMgmtDialog::SavePalette(EffectsPanel* panel)
{
wxString ChildName,AttrName;
wxString AttrName;
wxColour color;
wxString name = wxGetTextFromUser(_("Enter name for palette"), _("Save Color Palette"));
name.Trim(true);
Expand Down
1 change: 0 additions & 1 deletion xLights/SeqExportDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ void SeqExportDialog::SetDefaultName()
fsd = cwd;
}
wxString curV = TextCtrlFilename->GetValue();
wxString fn = curV == "" ? cwd + wxFileName::GetPathSeparator() + _model : curV;
wxFileName name(cwd, _model);
if (fmt == "LOR. *.lms or *.las") {
name.SetExt("lms");
Expand Down
10 changes: 5 additions & 5 deletions xLights/SeqFileUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3291,7 +3291,7 @@ std::string LPEParseEffectSettings(const wxString& effectType, const wxArrayStri
wxString thickness = parms[3];
wxString vcThickness;
thickness = RescaleWithRangeI(thickness, "E_VALUECURVE_Spirals_Thickness", 0, 100, 0, 100, vcThickness, SPIRALS_THICKNESS_MIN, SPIRALS_THICKNESS_MAX);
wxString thicknessChange = parms[4];
// wxString thicknessChange = parms[4]; //unused
wxString blend = parms[5];
wxString show3d = parms[6];
wxString speed = parms[7];
Expand Down Expand Up @@ -3461,8 +3461,8 @@ std::string LPEParseEffectSettings(const wxString& effectType, const wxArrayStri
velocity = RescaleWithRangeI(velocity, "IGNORE", 1, 10, 1, 10, vcCrap, -1, -1);
wxString fade = parms[3];
fade = RescaleWithRangeI(fade, "IGNORE", 1, 100, 1, 100, vcCrap, -1, -1);
wxString pattern = parms[4]; // not used
wxString rateChange = parms[5]; // not used
//wxString pattern = parms[4]; // not used
//wxString rateChange = parms[5]; // not used
settings += ",E_SLIDER_Fireworks_Explosions=" + explosionRate;
settings += ",E_SLIDER_Fireworks_Count=" + particles;
settings += ",E_SLIDER_Fireworks_Fade=" + fade;
Expand Down Expand Up @@ -3596,7 +3596,7 @@ std::string LPEParseEffectSettings(const wxString& effectType, const wxArrayStri
wxString bend = parms[2];
wxString vcBend;
bend = RescaleWithRangeI(bend, "E_VALUECURVE_Pinwheel_Twist", -10, 10, -360, 360, vcBend, PINWHEEL_TWIST_MIN, PINWHEEL_TWIST_MAX);
wxString colour = parms[3]; // not used
//wxString colour = parms[3]; // not used
wxString CCW = parms[4];
wxString speed = parms[5];
wxString vcSpeed;
Expand Down Expand Up @@ -3678,7 +3678,7 @@ std::string LPEParseEffectSettings(const wxString& effectType, const wxArrayStri
wxString speed = parms[6];
speed = RescaleWithRangeI(speed, "IGNORE", 0, 50, 0, 50, vcCrap, -1, -1);
if (parms.size() > 7) {
wxString unknown1 = parms[7]; // unused
//wxString unknown1 = parms[7]; // unused
}

settings += ",E_TEXTCTRL_Text=" + text;
Expand Down
1 change: 0 additions & 1 deletion xLights/SubModelsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2556,7 +2556,6 @@ void SubModelsDialog::OnListCtrl_SubModelsBeginDrag(wxListEvent& event)

void SubModelsDialog::OnDrop(wxCommandEvent& event)
{
wxArrayString parms = wxSplit(event.GetString(), ',');
int x = event.GetExtraLong() >> 16;
int y = event.GetExtraLong() & 0xFFFF;

Expand Down
3 changes: 0 additions & 3 deletions xLights/TabConvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ void xLightsFrame::WriteLSPFile(const wxString& filename, long numChans, unsigne

*/

wxString ChannelName, TestName;
int channels_exported = 0;
unsigned long rgb;
wxFile f;
Expand Down Expand Up @@ -396,7 +395,6 @@ void xLightsFrame::WriteLSPFile(const wxString& filename, long numChans, unsigne

void xLightsFrame::WriteHLSFile(const wxString& filename, long numChans, unsigned int startFrame, unsigned int endFrame, SeqDataType* dataBuf)
{
wxString ChannelName, TestName;
int seqidx = 0;

wxFile f;
Expand Down Expand Up @@ -1131,7 +1129,6 @@ void xLightsFrame::WriteGIFForPreset(const std::string& preset)

if (presetNode != nullptr) {
auto cp = presetNode->GetAttribute("settings");
auto v = presetNode->GetAttribute("xLightsVersion", "4.0");

CopyFormat1 pd(cp);
if (pd.IsOk()) {
Expand Down
Loading

0 comments on commit 0af418c

Please sign in to comment.