Skip to content

Commit

Permalink
Fix some warnings, put the html Check Sequence report in the Show Fol…
Browse files Browse the repository at this point in the history
…der where safari might actualy have permission to open it, maybe.
  • Loading branch information
dkulp committed Jan 15, 2025
1 parent 7ef6400 commit 4fe5b56
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions xLights/PaletteMgmtDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,8 @@ void PaletteMgmtDialog::OnButtonLoadPalette2Click(wxCommandEvent& event)

void PaletteMgmtDialog::OnButtonCopyClick(wxCommandEvent& event)
{
wxColour c;
for (int i=1; i<=6; i++) {
//~ c=panel1->GetPaletteColor(i);
//~ wxColour c=panel1->GetPaletteColor(i);
//~ panel2->SetPaletteColor(i,&c);
}
}
Expand Down
1 change: 0 additions & 1 deletion xLights/ShowFolderSearchDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ void ShowFolderSearchDialog::ValidateWindow()

wxString ShowFolderSearchDialog::FindLogFolder() const
{
static log4cpp::Category& logger_base = log4cpp::Category::getInstance(std::string("log_base"));
wxString dir;
#ifdef __WXMSW__
wxGetEnv("APPDATA", &dir);
Expand Down
2 changes: 0 additions & 2 deletions xLights/controllers/FPP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3159,8 +3159,6 @@ static void CreateController(Discovery &discovery, DiscoveredData *inst) {
}

static void ProcessFPPSystems(Discovery &discovery, const std::string &systemsString) {
static log4cpp::Category& logger_base = log4cpp::Category::getInstance(std::string("log_base"));

wxJSONValue origJson;
wxJSONReader reader;
bool parsed = reader.Parse(systemsString, &origJson) == 0;
Expand Down
3 changes: 1 addition & 2 deletions xLights/controllers/HinksPix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,9 @@ bool HinksPix::UploadInputUniverses(Controller* controller, std::vector<HinksPix
DisplayError("Getting HinksPix Input Mode FAILED.");
return false;
}
wxString const cur_mode = data.ItemAt("MODE").AsString();

//Set Controller Input mode
//if (cur_mode != type) //send mode every time
//if (data.ItemAt("MODE").AsString() != type) //send mode every time
{
auto const ret = GetJSONControllerData(GetJSONPostURL(), cmd);
if (ret.find("\"OK\"") == std::string::npos) {
Expand Down
2 changes: 1 addition & 1 deletion xLights/effects/EffectPanelUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void EffectPanelUtils::enableControlsByName(wxWindow *window, const wxString &na
w->Enable(enable);
}
wxString n2 = "IDD_" + name.SubString(3, name.size());
w = window->FindWindow(name);
w = window->FindWindow(n2);
if (w != nullptr) {
w->Enable(enable);
}
Expand Down
7 changes: 5 additions & 2 deletions xLights/xLightsMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4955,7 +4955,7 @@ std::string FormatSectionSummary(const std::string& section, int errcount, int w
wxString darkCol = (!IsDarkMode() ? "#000000" : "#FFFFFF");
wxString errCol = (errcount == 0) ? darkCol : "#FF0000";
wxString warnCol = (warncount == 0) ? darkCol : "#9ACD32";
return wxString::Format("<h4>Section Errors \(%s\) <span style='color:%s;'>%d</span>. Warnings <span style='color:%s;'>%d</span>.</h4><br>", section, errCol, errcount, warnCol, warncount).ToStdString();
return wxString::Format("<h4>Section Errors (%s) <span style='color:%s;'>%d</span>. Warnings <span style='color:%s;'>%d</span>.</h4><br>", section, errCol, errcount, warnCol, warncount).ToStdString();
}

std::string xLightsFrame::CheckSequence(bool displayInEditor, bool writeToFile)
Expand All @@ -4975,7 +4975,10 @@ std::string xLightsFrame::CheckSequence(bool displayInEditor, bool writeToFile)
wxString darkTextCol = (IsDarkMode() ? "#FFFFFF" : "#000000");

wxFile f;
wxString filename = wxFileName::CreateTempFileName("xLightsCheckSequence") + ".html";
wxFileName fnTemp;
fnTemp.AssignTempFileName("xLightsCheckSequence");
wxFileName fn(GetShowDirectory(), fnTemp.GetFullName() + ".html");
wxString filename = fn.GetFullPath();
TempFileManager::GetTempFileManager().AddTempFile(filename);

if (writeToFile || displayInEditor) {
Expand Down

0 comments on commit 4fe5b56

Please sign in to comment.