diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ba494b..4db1503 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,10 +11,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Option to create new panel from selection on existing panel display. (TODO) +## [0.15.1] - 2025-03-10 + ### Fixed - Reading of FourCC values in WAV/WavPack files so that sample file details are correctly shown on all platforms. - Reading of all blocks and sub-blocks in a WavPack file and a few related bugs. +- Unintentional entries of comments in textcontrols by prohibiting usage of semicolon (;). +- Removed restriction that prevented using spaces in the ODF file name. +- Trailing whitespaces in textctrls that should be removed when writing an ODF. ## [0.15.0] - 2024-07-27 diff --git a/CMakeLists.txt b/CMakeLists.txt index c12b05c..5e2d583 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # GoOdf cmake build file -# Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) +# Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/Attack.cpp b/src/Attack.cpp index b52aceb..f13588e 100644 --- a/src/Attack.cpp +++ b/src/Attack.cpp @@ -1,6 +1,6 @@ /* * Attack.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Attack.h b/src/Attack.h index 4a20780..9c9993f 100644 --- a/src/Attack.h +++ b/src/Attack.h @@ -1,6 +1,6 @@ /* * Attack.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/AttackDialog.cpp b/src/AttackDialog.cpp index 91746ae..1405dc2 100644 --- a/src/AttackDialog.cpp +++ b/src/AttackDialog.cpp @@ -1,6 +1,6 @@ /* * AttackDialog.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/AttackDialog.h b/src/AttackDialog.h index 1af8e2e..d7dc865 100644 --- a/src/AttackDialog.h +++ b/src/AttackDialog.h @@ -1,6 +1,6 @@ /* * AttackDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Button.cpp b/src/Button.cpp index ad5db4e..2e1b49b 100644 --- a/src/Button.cpp +++ b/src/Button.cpp @@ -1,6 +1,6 @@ /* * Button.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Button.h b/src/Button.h index ee9bd69..8f2f07b 100644 --- a/src/Button.h +++ b/src/Button.h @@ -1,6 +1,6 @@ /* * Button.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/CmbDialog.cpp b/src/CmbDialog.cpp index 7ae86e0..8b946f9 100644 --- a/src/CmbDialog.cpp +++ b/src/CmbDialog.cpp @@ -1,6 +1,6 @@ /* * CmbDialog.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/CmbDialog.h b/src/CmbDialog.h index d4e0150..760151e 100644 --- a/src/CmbDialog.h +++ b/src/CmbDialog.h @@ -1,6 +1,6 @@ /* * CmbDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/CmbOrgan.h b/src/CmbOrgan.h index e002fc2..730f303 100644 --- a/src/CmbOrgan.h +++ b/src/CmbOrgan.h @@ -1,6 +1,6 @@ /* * CmbOrgan.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/CmbParser.cpp b/src/CmbParser.cpp index a9c711a..0f5f455 100644 --- a/src/CmbParser.cpp +++ b/src/CmbParser.cpp @@ -1,6 +1,6 @@ /* * CmbParser.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/CmbParser.h b/src/CmbParser.h index 945ba09..272061b 100644 --- a/src/CmbParser.h +++ b/src/CmbParser.h @@ -1,6 +1,6 @@ /* * CmbParser.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/CopyElementAttributesDialog.cpp b/src/CopyElementAttributesDialog.cpp index b21ebb1..6e8cf22 100644 --- a/src/CopyElementAttributesDialog.cpp +++ b/src/CopyElementAttributesDialog.cpp @@ -1,6 +1,6 @@ /* * CopyElementAttributesDialog.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/CopyElementAttributesDialog.h b/src/CopyElementAttributesDialog.h index 6c6473f..e441fa0 100644 --- a/src/CopyElementAttributesDialog.h +++ b/src/CopyElementAttributesDialog.h @@ -1,6 +1,6 @@ /* * CopyElementAttributesDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Coupler.cpp b/src/Coupler.cpp index 6cdf7a2..c70e99f 100644 --- a/src/Coupler.cpp +++ b/src/Coupler.cpp @@ -1,6 +1,6 @@ /* * Coupler.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Coupler.h b/src/Coupler.h index 2818baf..318bbe8 100644 --- a/src/Coupler.h +++ b/src/Coupler.h @@ -1,6 +1,6 @@ /* * Coupler.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/CouplerPanel.cpp b/src/CouplerPanel.cpp index b420d9d..b79f393 100644 --- a/src/CouplerPanel.cpp +++ b/src/CouplerPanel.cpp @@ -1,6 +1,6 @@ /* * CouplerPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -677,6 +677,7 @@ void CouplerPanel::setIsFirstRemoval(bool value) { void CouplerPanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { + m_nameField->SetToolTip(wxT("It's best to make the name unique. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_displayInvertedYes->SetToolTip(wxT("Yes means that the on and off bitmaps are reversed.")); m_displayInvertedNo->SetToolTip(wxT("No is the standard on/off bitmap display.")); m_functionChoice->SetToolTip(wxT("Any other function than 'Input' means that the user no longer has direct control over the state of this element, nor can its state be directly changed by a combination, instead it's controlled indirectly by the referenced switch(es).\n\nThe logical function Not can only reference one switch and negates (inverts) the state of the input. And, Xor, Nand, Nor as well as Or has a variable number of inputs.\n\nSee for instance https://en.wikipedia.org/wiki/Logic_gate for further explanations about logical functions.")); @@ -709,6 +710,7 @@ void CouplerPanel::setTooltipsEnabled(bool isEnabled) { m_firstMIDINoteNumberSpin->SetToolTip(wxT("First MIDI note number to forward.")); m_numberOfKeysSpin->SetToolTip(wxT("Number of keys to forward starting with FirstMIDINoteNumber.")); } else { + m_nameField->SetToolTip(wxEmptyString); m_displayInvertedYes->SetToolTip(wxEmptyString); m_displayInvertedNo->SetToolTip(wxEmptyString); m_functionChoice->SetToolTip(wxEmptyString); @@ -743,6 +745,10 @@ void CouplerPanel::setTooltipsEnabled(bool isEnabled) { } } +void CouplerPanel::refreshData() { + m_nameField->ChangeValue(m_coupler->getName()); +} + void CouplerPanel::OnNameChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_nameField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_nameField); diff --git a/src/CouplerPanel.h b/src/CouplerPanel.h index c4b9c72..b1972b8 100644 --- a/src/CouplerPanel.h +++ b/src/CouplerPanel.h @@ -1,6 +1,6 @@ /* * CouplerPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,6 +33,7 @@ class CouplerPanel : public wxPanel { void setCoupler(Coupler *coupler); void setIsFirstRemoval(bool value); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/DefaultPathsDialog.cpp b/src/DefaultPathsDialog.cpp index c32760c..8cfd9cc 100644 --- a/src/DefaultPathsDialog.cpp +++ b/src/DefaultPathsDialog.cpp @@ -1,6 +1,6 @@ /* * DefaultPathsDialog.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/DefaultPathsDialog.h b/src/DefaultPathsDialog.h index abf5979..5472fbd 100644 --- a/src/DefaultPathsDialog.h +++ b/src/DefaultPathsDialog.h @@ -1,6 +1,6 @@ /* * DefaultPathsDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/DisplayMetrics.cpp b/src/DisplayMetrics.cpp index e275b4f..8dcd3c7 100644 --- a/src/DisplayMetrics.cpp +++ b/src/DisplayMetrics.cpp @@ -1,6 +1,6 @@ /* * DisplayMetrics.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/DisplayMetrics.h b/src/DisplayMetrics.h index c1dd143..cfb6d28 100644 --- a/src/DisplayMetrics.h +++ b/src/DisplayMetrics.h @@ -1,6 +1,6 @@ /* * DisplayMetrics.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/DisplayMetricsPanel.cpp b/src/DisplayMetricsPanel.cpp index 002e62e..b1b1495 100644 --- a/src/DisplayMetricsPanel.cpp +++ b/src/DisplayMetricsPanel.cpp @@ -1,6 +1,6 @@ /* * DisplayMetricsPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/DisplayMetricsPanel.h b/src/DisplayMetricsPanel.h index e0b87c6..2228784 100644 --- a/src/DisplayMetricsPanel.h +++ b/src/DisplayMetricsPanel.h @@ -1,6 +1,6 @@ /* * DisplayMetricsPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Divisional.cpp b/src/Divisional.cpp index 49a1f7b..90a4855 100644 --- a/src/Divisional.cpp +++ b/src/Divisional.cpp @@ -1,6 +1,6 @@ /* * Divisional.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Divisional.h b/src/Divisional.h index b848e0b..22421a9 100644 --- a/src/Divisional.h +++ b/src/Divisional.h @@ -1,6 +1,6 @@ /* * Divisional.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/DivisionalCoupler.cpp b/src/DivisionalCoupler.cpp index 6f4337f..344bbe4 100644 --- a/src/DivisionalCoupler.cpp +++ b/src/DivisionalCoupler.cpp @@ -1,6 +1,6 @@ /* * DivisionalCoupler.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/DivisionalCoupler.h b/src/DivisionalCoupler.h index 27c5463..9c1dbb9 100644 --- a/src/DivisionalCoupler.h +++ b/src/DivisionalCoupler.h @@ -1,6 +1,6 @@ /* * DivisionalCoupler.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/DivisionalCouplerPanel.cpp b/src/DivisionalCouplerPanel.cpp index 6f22706..edade6f 100644 --- a/src/DivisionalCouplerPanel.cpp +++ b/src/DivisionalCouplerPanel.cpp @@ -1,6 +1,6 @@ /* * DivisionalCouplerPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -424,6 +424,7 @@ void DivisionalCouplerPanel::setIsFirstRemoval(bool value) { void DivisionalCouplerPanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { + m_nameField->SetToolTip(wxT("It's best to make the name unique. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_displayInvertedYes->SetToolTip(wxT("Yes means that the on and off bitmaps are reversed.")); m_displayInvertedNo->SetToolTip(wxT("No is the standard on/off bitmap display.")); m_functionChoice->SetToolTip(wxT("Any other function than 'Input' means that the user no longer has direct control over the state of this element, nor can its state be directly changed by a combination, instead it's controlled indirectly by the referenced switch(es).\n\nThe logical function Not can only reference one switch and negates (inverts) the state of the input. And, Xor, Nand, Nor as well as Or has a variable number of inputs.\n\nSee for instance https://en.wikipedia.org/wiki/Logic_gate for further explanations about logical functions.")); @@ -441,6 +442,7 @@ void DivisionalCouplerPanel::setTooltipsEnabled(bool isEnabled) { m_availableManuals->SetToolTip(wxT("All available manuals in the organ will be listed here.")); m_referencedManuals->SetToolTip(wxT("Here the manuals affected by this divisional coupler will be listed.")); } else { + m_nameField->SetToolTip(wxEmptyString); m_displayInvertedYes->SetToolTip(wxEmptyString); m_displayInvertedNo->SetToolTip(wxEmptyString); m_functionChoice->SetToolTip(wxEmptyString); @@ -460,6 +462,10 @@ void DivisionalCouplerPanel::setTooltipsEnabled(bool isEnabled) { } } +void DivisionalCouplerPanel::refreshData() { + m_nameField->ChangeValue(m_divCplr->getName()); +} + void DivisionalCouplerPanel::OnNameChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_nameField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_nameField); diff --git a/src/DivisionalCouplerPanel.h b/src/DivisionalCouplerPanel.h index 3aebeaf..8e4dbdb 100644 --- a/src/DivisionalCouplerPanel.h +++ b/src/DivisionalCouplerPanel.h @@ -1,6 +1,6 @@ /* * DivisionalCouplerPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,6 +32,7 @@ class DivisionalCouplerPanel : public wxPanel { void setDivisionalCoupler(DivisionalCoupler *divCplr); void setIsFirstRemoval(bool value); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/DivisionalPanel.cpp b/src/DivisionalPanel.cpp index dd4b66a..e9473b6 100644 --- a/src/DivisionalPanel.cpp +++ b/src/DivisionalPanel.cpp @@ -1,6 +1,6 @@ /* * DivisionalPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -593,11 +593,13 @@ void DivisionalPanel::setIsFirstRemoval(bool value) { void DivisionalPanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { + m_nameField->SetToolTip(wxT("It's best to make the name unique. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_isProtectedYes->SetToolTip(wxT("Yes means that the content of the divisional cannot be modified by the user.")); m_isProtectedNo->SetToolTip(wxT("No means that the user can modify the state of added elements.")); m_displayInvertedYes->SetToolTip(wxT("Yes means that the on and off bitmaps are reversed.")); m_displayInvertedNo->SetToolTip(wxT("No is the standard on/off bitmap display.")); } else { + m_nameField->SetToolTip(wxEmptyString); m_isProtectedYes->SetToolTip(wxEmptyString); m_isProtectedNo->SetToolTip(wxEmptyString); m_displayInvertedYes->SetToolTip(wxEmptyString); @@ -605,6 +607,10 @@ void DivisionalPanel::setTooltipsEnabled(bool isEnabled) { } } +void DivisionalPanel::refreshData() { + m_nameField->ChangeValue(m_divisional->getName()); +} + void DivisionalPanel::OnNameChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_nameField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_nameField); diff --git a/src/DivisionalPanel.h b/src/DivisionalPanel.h index 0e1b2c7..3285dfa 100644 --- a/src/DivisionalPanel.h +++ b/src/DivisionalPanel.h @@ -1,6 +1,6 @@ /* * DivisionalPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,6 +33,7 @@ class DivisionalPanel : public wxPanel { void setDivisional(Divisional *divisional); void setIsFirstRemoval(bool value); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/DoubleEntryDialog.cpp b/src/DoubleEntryDialog.cpp index 8187ae8..c2d998b 100644 --- a/src/DoubleEntryDialog.cpp +++ b/src/DoubleEntryDialog.cpp @@ -1,6 +1,6 @@ /* * DoubleEntryDialog.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/DoubleEntryDialog.h b/src/DoubleEntryDialog.h index 29864c4..fa84758 100644 --- a/src/DoubleEntryDialog.h +++ b/src/DoubleEntryDialog.h @@ -1,6 +1,6 @@ /* * DoubleEntryDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Drawstop.cpp b/src/Drawstop.cpp index c015fbb..3773a94 100644 --- a/src/Drawstop.cpp +++ b/src/Drawstop.cpp @@ -1,6 +1,6 @@ /* * Drawstop.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Drawstop.h b/src/Drawstop.h index 03eec95..0db59d5 100644 --- a/src/Drawstop.h +++ b/src/Drawstop.h @@ -1,6 +1,6 @@ /* * Drawstop.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Enclosure.cpp b/src/Enclosure.cpp index c25f9ae..00af040 100644 --- a/src/Enclosure.cpp +++ b/src/Enclosure.cpp @@ -1,6 +1,6 @@ /* * Enclosure.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Enclosure.h b/src/Enclosure.h index f0b9c7a..fa1491a 100644 --- a/src/Enclosure.h +++ b/src/Enclosure.h @@ -1,6 +1,6 @@ /* * Enclosure.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/EnclosurePanel.cpp b/src/EnclosurePanel.cpp index ee12154..d2893d8 100644 --- a/src/EnclosurePanel.cpp +++ b/src/EnclosurePanel.cpp @@ -1,6 +1,6 @@ /* * EnclosurePanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -134,14 +134,20 @@ void EnclosurePanel::setIsFirstRemoval(bool value) { void EnclosurePanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { + m_nameField->SetToolTip(wxT("It's best to make the name unique. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_ampMinLvlSpin->SetToolTip(wxT("Minimal amplitude when enclosure is fully closed (percentage scaling). NOTE: It's possible to set to 0, but if that level is reached any sound will be totally muted and attacks counted as released!")); m_midiInputNumberSpin->SetToolTip(wxT("This number is used while building the initial MIDI configuration. 0 means no association. 1 maps to first enclosure, 2 to second enclosure and so on.")); } else { + m_nameField->SetToolTip(wxEmptyString); m_ampMinLvlSpin->SetToolTip(wxEmptyString); m_midiInputNumberSpin->SetToolTip(wxEmptyString); } } +void EnclosurePanel::refreshData() { + m_nameField->ChangeValue(m_enclosure->getName()); +} + void EnclosurePanel::OnNameChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_nameField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_nameField); diff --git a/src/EnclosurePanel.h b/src/EnclosurePanel.h index f8568d5..1262cea 100644 --- a/src/EnclosurePanel.h +++ b/src/EnclosurePanel.h @@ -1,6 +1,6 @@ /* * EnclosurePanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,6 +33,7 @@ class EnclosurePanel : public wxPanel { void setEnclosure(Enclosure *enclosure); void setIsFirstRemoval(bool value); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/GOODF.cpp b/src/GOODF.cpp index af0c513..f523daa 100644 --- a/src/GOODF.cpp +++ b/src/GOODF.cpp @@ -1,6 +1,6 @@ /* * GOODF.cpp is a part of GOODF software - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GOODF.h b/src/GOODF.h index ada9bfc..d81046f 100644 --- a/src/GOODF.h +++ b/src/GOODF.h @@ -1,6 +1,6 @@ /* * GOODF.h is a part of GOODF software - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GOODFDef.h.in b/src/GOODFDef.h.in index e91a239..d4ccc43 100644 --- a/src/GOODFDef.h.in +++ b/src/GOODFDef.h.in @@ -1,6 +1,6 @@ /* * GOODFDef.h.in is a part of GOODF software - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GOODFFrame.cpp b/src/GOODFFrame.cpp index ac35d12..60e6451 100644 --- a/src/GOODFFrame.cpp +++ b/src/GOODFFrame.cpp @@ -1,6 +1,6 @@ /* * GOODFFrame.cpp is a part of GOODF software - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -592,7 +592,7 @@ void GOODFFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { info.SetName(wxT("GoOdf")); info.SetVersion(wxT(GOODF_VERSION)); info.SetDescription(wxT("A software for creating and editing GrandOrgue ODFs")); - info.SetCopyright(wxT("Copyright (C) 2024 Lars Palo and contributors (see AUTHORS)\nReleased under GNU GPLv3 licence")); + info.SetCopyright(wxT("Copyright (C) 2025 Lars Palo and contributors (see AUTHORS)\nReleased under GNU GPLv3 licence")); info.SetWebSite(wxT("https://github.com/GrandOrgue/GoOdf")); wxAboutBox(info); @@ -655,6 +655,7 @@ void GOODFFrame::OnClose(wxCloseEvent& event) { } void GOODFFrame::OnWriteODF(wxCommandEvent& WXUNUSED(event)) { + FixAnyIllegalEntries(); if (m_organPanel->getOdfPath().IsEmpty() || m_organPanel->getOdfName().IsEmpty()) { wxMessageDialog incomplete(this, wxT("Both path (location) and name for ODF must be set!"), wxT("Cannot write ODF"), wxOK|wxCENTRE); incomplete.ShowModal(); @@ -3476,3 +3477,169 @@ void GOODFFrame::SetImportXfadeMenuItemState() { else m_toolsMenu->Enable(ID_GLOBAL_PARSE_LEGACY_XFADES_OPTION, true); } + +void GOODFFrame::FixAnyIllegalEntries() { + m_organPanel->fixTrailingSpacesInStrings(); + m_organ->fixTrailingSpacesInStrings(); + + if (m_Splitter->GetWindow2() == m_organPanel) { + m_organPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_enclosurePanel) { + m_enclosurePanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_tremulantPanel) { + m_tremulantPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_windchestPanel) { + m_windchestPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_switchPanel) { + m_switchPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_rankPanel) { + m_rankPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_stopPanel) { + m_stopPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_manualPanel) { + m_manualPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_couplerPanel) { + m_couplerPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_divisionalPanel) { + m_divisionalPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_divCplrPanel) { + m_divCplrPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_generalPanel) { + m_generalPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_reversiblePistonPanel) { + m_reversiblePistonPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_panelPanel) { + m_panelPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_guiButtonPanel) { + m_guiButtonPanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_guiEnclosurePanel) { + m_guiEnclosurePanel->refreshData(); + } else if (m_Splitter->GetWindow2() == m_guiLabelPanel) { + m_guiLabelPanel->refreshData(); + } + + // Any name entries in the organ tree above the panels should be updated too + int count = (int) m_organTreeCtrl->GetChildrenCount(tree_manuals, false); + if (count > 0) { + wxTreeItemId currentMan = m_organTreeCtrl->GetLastChild(tree_manuals); + for (int i = count - 1; i >= 0; i--) { + m_organTreeCtrl->SetItemText(currentMan, m_organ->getOrganManualAt(i)->getName()); + + // Each manual also can contain Stops, Couplers and Divisionals + wxTreeItemId manDivisionals = m_organTreeCtrl->GetLastChild(currentMan); + wxTreeItemId manCouplers = m_organTreeCtrl->GetPrevSibling(manDivisionals); + wxTreeItemId manStops = m_organTreeCtrl->GetPrevSibling(manCouplers); + int divCount = (int) m_organTreeCtrl->GetChildrenCount(manDivisionals); + if (divCount > 0) { + wxTreeItemId currentDiv = m_organTreeCtrl->GetLastChild(manDivisionals); + for (int j = divCount - 1; j >= 0; j--) { + m_organTreeCtrl->SetItemText(currentDiv, m_organ->getOrganManualAt(i)->getDivisionalAt(j)->getName()); + if (j > 0) + currentDiv = m_organTreeCtrl->GetPrevSibling(currentDiv); + } + } + int cplrCount = (int) m_organTreeCtrl->GetChildrenCount(manCouplers); + if (cplrCount > 0) { + wxTreeItemId currentCplr = m_organTreeCtrl->GetLastChild(manCouplers); + for (int j = cplrCount - 1; j >= 0; j--) { + m_organTreeCtrl->SetItemText(currentCplr, m_organ->getOrganManualAt(i)->getCouplerAt(j)->getName()); + if (j > 0) + currentCplr = m_organTreeCtrl->GetPrevSibling(currentCplr); + } + } + int stopCount = (int) m_organTreeCtrl->GetChildrenCount(manStops); + if (stopCount > 0) { + wxTreeItemId currentStop = m_organTreeCtrl->GetLastChild(manStops); + for (int j = stopCount - 1; j >= 0; j--) { + m_organTreeCtrl->SetItemText(currentStop, m_organ->getOrganManualAt(i)->getStopAt(j)->getName()); + if (j > 0) + currentStop = m_organTreeCtrl->GetPrevSibling(currentStop); + } + } + + if (i > 0) + currentMan = m_organTreeCtrl->GetPrevSibling(currentMan); + } + } + + count = (int) m_organTreeCtrl->GetChildrenCount(tree_windchestgrps); + if (count > 0) { + wxTreeItemId currentWc = m_organTreeCtrl->GetLastChild(tree_windchestgrps); + for (int i = count - 1; i >= 0; i--) { + m_organTreeCtrl->SetItemText(currentWc, m_organ->getOrganWindchestgroupAt(i)->getName()); + if (i > 0) + currentWc = m_organTreeCtrl->GetPrevSibling(currentWc); + } + } + + count = (int) m_organTreeCtrl->GetChildrenCount(tree_enclosures); + if (count > 0) { + wxTreeItemId currentEnc = m_organTreeCtrl->GetLastChild(tree_enclosures); + for (int i = count - 1; i >= 0; i--) { + m_organTreeCtrl->SetItemText(currentEnc, m_organ->getOrganEnclosureAt(i)->getName()); + if (i > 0) + currentEnc = m_organTreeCtrl->GetPrevSibling(currentEnc); + } + } + + count = (int) m_organTreeCtrl->GetChildrenCount(tree_tremulants); + if (count > 0) { + wxTreeItemId currentTr = m_organTreeCtrl->GetLastChild(tree_tremulants); + for (int i = count - 1; i >= 0; i--) { + m_organTreeCtrl->SetItemText(currentTr, m_organ->getOrganTremulantAt(i)->getName()); + if (i > 0) + currentTr = m_organTreeCtrl->GetPrevSibling(currentTr); + } + } + + count = (int) m_organTreeCtrl->GetChildrenCount(tree_ranks); + if (count > 0) { + wxTreeItemId currentRk = m_organTreeCtrl->GetLastChild(tree_ranks); + for (int i = count - 1; i >= 0; i--) { + m_organTreeCtrl->SetItemText(currentRk, m_organ->getOrganRankAt(i)->getName()); + if (i > 0) + currentRk = m_organTreeCtrl->GetPrevSibling(currentRk); + } + } + + count = (int) m_organTreeCtrl->GetChildrenCount(tree_switches); + if (count > 0) { + wxTreeItemId currentSw = m_organTreeCtrl->GetLastChild(tree_switches); + for (int i = count - 1; i >= 0; i--) { + m_organTreeCtrl->SetItemText(currentSw, m_organ->getOrganSwitchAt(i)->getName()); + if (i > 0) + currentSw = m_organTreeCtrl->GetPrevSibling(currentSw); + } + } + + count = (int) m_organTreeCtrl->GetChildrenCount(tree_reversiblePistons); + if (count > 0) { + wxTreeItemId currentP = m_organTreeCtrl->GetLastChild(tree_reversiblePistons); + for (int i = count - 1; i >= 0; i--) { + m_organTreeCtrl->SetItemText(currentP, m_organ->getReversiblePistonAt(i)->getName()); + if (i > 0) + currentP = m_organTreeCtrl->GetPrevSibling(currentP); + } + } + + count = (int) m_organTreeCtrl->GetChildrenCount(tree_divisionalCouplers); + if (count > 0) { + wxTreeItemId currentDc = m_organTreeCtrl->GetLastChild(tree_divisionalCouplers); + for (int i = count - 1; i >= 0; i--) { + m_organTreeCtrl->SetItemText(currentDc, m_organ->getOrganDivisionalCouplerAt(i)->getName()); + if (i > 0) + currentDc = m_organTreeCtrl->GetPrevSibling(currentDc); + } + } + + count = (int) m_organTreeCtrl->GetChildrenCount(tree_generals); + if (count > 0) { + wxTreeItemId currentG = m_organTreeCtrl->GetLastChild(tree_generals); + for (int i = count - 1; i >= 0; i--) { + m_organTreeCtrl->SetItemText(currentG, m_organ->getOrganGeneralAt(i)->getName()); + if (i > 0) + currentG = m_organTreeCtrl->GetPrevSibling(currentG); + } + } + +} diff --git a/src/GOODFFrame.h b/src/GOODFFrame.h index 494a13e..dfb1f63 100644 --- a/src/GOODFFrame.h +++ b/src/GOODFFrame.h @@ -1,6 +1,6 @@ /* * GOODFFrame.h is a part of GOODF software - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -191,6 +191,7 @@ class GOODFFrame : public wxFrame { void UpdateFrameSizeAndPos(); void RecreateLogWindow(); void SetImportXfadeMenuItemState(); + void FixAnyIllegalEntries(); }; diff --git a/src/GOODFFunctions.h b/src/GOODFFunctions.h index a3f8341..51adbd5 100644 --- a/src/GOODFFunctions.h +++ b/src/GOODFFunctions.h @@ -1,6 +1,6 @@ /* * GOODFFunctions.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -48,9 +48,16 @@ namespace GOODF_functions { if (str->StartsWith(wxT(" "))) { str->Replace(wxT(" "), wxT(""), false); ctrl->SetValue(*str); + } else if (str->Find(wxT(";")) != wxNOT_FOUND) { + str->Replace(wxT(";"), wxT(""), false); + ctrl->SetValue(*str); } } + inline void RemoveTrailingWhitespace(wxString *str) { + str->Trim(); + } + inline wxString fixSeparator(wxString pathToCheck) { if (pathToCheck.Contains("/")) { pathToCheck.Replace("/", "\\"); diff --git a/src/GUIButton.cpp b/src/GUIButton.cpp index 01c8054..3a872ed 100644 --- a/src/GUIButton.cpp +++ b/src/GUIButton.cpp @@ -1,6 +1,6 @@ /* * GUIButton.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIButton.h b/src/GUIButton.h index 2ce959d..7979c8d 100644 --- a/src/GUIButton.h +++ b/src/GUIButton.h @@ -1,6 +1,6 @@ /* * GUIButton.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIButtonPanel.cpp b/src/GUIButtonPanel.cpp index 0a025fe..633814a 100644 --- a/src/GUIButtonPanel.cpp +++ b/src/GUIButtonPanel.cpp @@ -1,6 +1,6 @@ /* * GUIButtonPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -796,7 +796,7 @@ void GUIButtonPanel::updatePositionValues() { void GUIButtonPanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { - m_labelTextField->SetToolTip(wxT("If another string is desired than the button name (or a shorter one for display reasons) it can be overridden here.")); + m_labelTextField->SetToolTip(wxT("If another string is desired than the button name (or a shorter one for display reasons) it can be overridden here. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_labelFont->SetToolTip(wxT("Font face and size can be set here. The default value is derived from the display metrics control label font of the panel.")); m_labelColourChoice->SetToolTip(wxT("Colour of the font can be chosen here. If a custom value is chosen the picker will be activated.")); m_labelColourPick->SetToolTip(wxT("A custom colour can be picked here.")); @@ -874,6 +874,10 @@ void GUIButtonPanel::setTooltipsEnabled(bool isEnabled) { } } +void GUIButtonPanel::refreshData() { + m_labelTextField->ChangeValue(m_button->getDispLabelText()); +} + void GUIButtonPanel::OnLabelTextChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_labelTextField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_labelTextField); diff --git a/src/GUIButtonPanel.h b/src/GUIButtonPanel.h index b9df7a8..ea9b5dc 100644 --- a/src/GUIButtonPanel.h +++ b/src/GUIButtonPanel.h @@ -1,6 +1,6 @@ /* * GUIButtonPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,6 +35,7 @@ class GUIButtonPanel : public wxPanel { void setButton(GUIButton *button); void updatePositionValues(); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/GUICoupler.cpp b/src/GUICoupler.cpp index f649ef2..3262c5c 100644 --- a/src/GUICoupler.cpp +++ b/src/GUICoupler.cpp @@ -1,6 +1,6 @@ /* * GUICoupler.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUICoupler.h b/src/GUICoupler.h index 11ef07f..a86a425 100644 --- a/src/GUICoupler.h +++ b/src/GUICoupler.h @@ -1,6 +1,6 @@ /* * GUICoupler.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIDivisional.cpp b/src/GUIDivisional.cpp index b567506..1dcd9cc 100644 --- a/src/GUIDivisional.cpp +++ b/src/GUIDivisional.cpp @@ -1,6 +1,6 @@ /* * GUIDivisional.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIDivisional.h b/src/GUIDivisional.h index e016c90..9a66030 100644 --- a/src/GUIDivisional.h +++ b/src/GUIDivisional.h @@ -1,6 +1,6 @@ /* * GUIDivisional.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIDivisionalCoupler.cpp b/src/GUIDivisionalCoupler.cpp index 5adc62d..462936e 100644 --- a/src/GUIDivisionalCoupler.cpp +++ b/src/GUIDivisionalCoupler.cpp @@ -1,6 +1,6 @@ /* * GUIDivisionalCoupler.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIDivisionalCoupler.h b/src/GUIDivisionalCoupler.h index a151efe..63391d0 100644 --- a/src/GUIDivisionalCoupler.h +++ b/src/GUIDivisionalCoupler.h @@ -1,6 +1,6 @@ /* * GUIDivisionalCoupler.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIElements.cpp b/src/GUIElements.cpp index 478ae15..6d88644 100644 --- a/src/GUIElements.cpp +++ b/src/GUIElements.cpp @@ -1,6 +1,6 @@ /* * GUIElements.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIElements.h b/src/GUIElements.h index 6e18e7c..1d5f62d 100644 --- a/src/GUIElements.h +++ b/src/GUIElements.h @@ -1,6 +1,6 @@ /* * GUIElements.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIEnclosure.cpp b/src/GUIEnclosure.cpp index f6aef39..6dfb37d 100644 --- a/src/GUIEnclosure.cpp +++ b/src/GUIEnclosure.cpp @@ -1,6 +1,6 @@ /* * GUIEnclosure.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIEnclosure.h b/src/GUIEnclosure.h index 3f66305..8b107ec 100644 --- a/src/GUIEnclosure.h +++ b/src/GUIEnclosure.h @@ -1,6 +1,6 @@ /* * GUIEnclosure.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIEnclosurePanel.cpp b/src/GUIEnclosurePanel.cpp index 62b17e4..e4d0a2f 100644 --- a/src/GUIEnclosurePanel.cpp +++ b/src/GUIEnclosurePanel.cpp @@ -1,6 +1,6 @@ /* * GUIEnclosurePanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -649,7 +649,7 @@ void GUIEnclosurePanel::updatePositionValues() { void GUIEnclosurePanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { - m_labelTextField->SetToolTip(wxT("If another string is desired than the button name (or a shorter one for display reasons) it can be overridden here.")); + m_labelTextField->SetToolTip(wxT("If another string is desired than the button name (or a shorter one for display reasons) it can be overridden here. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_labelFont->SetToolTip(wxT("Font face and size can be set here. The default value is derived from the display metrics control label font of the panel.")); m_labelColourChoice->SetToolTip(wxT("Colour of the font can be chosen here. If a custom value is chosen the picker will be activated.")); m_labelColourPick->SetToolTip(wxT("A custom colour can be picked here.")); @@ -713,6 +713,10 @@ void GUIEnclosurePanel::setTooltipsEnabled(bool isEnabled) { } } +void GUIEnclosurePanel::refreshData() { + m_labelTextField->ChangeValue(m_enclosure->getDispLabelText()); +} + void GUIEnclosurePanel::OnLabelTextChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_labelTextField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_labelTextField); diff --git a/src/GUIEnclosurePanel.h b/src/GUIEnclosurePanel.h index c6a28ab..7a85097 100644 --- a/src/GUIEnclosurePanel.h +++ b/src/GUIEnclosurePanel.h @@ -1,6 +1,6 @@ /* * GUIEnclosurePanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,6 +36,7 @@ class GUIEnclosurePanel : public wxPanel { void setEnclosure(GUIEnclosure *enclosure); void updatePositionValues(); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/GUIGeneral.cpp b/src/GUIGeneral.cpp index c37bde3..5a76aa5 100644 --- a/src/GUIGeneral.cpp +++ b/src/GUIGeneral.cpp @@ -1,6 +1,6 @@ /* * GUIGeneral.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIGeneral.h b/src/GUIGeneral.h index ee375ef..31d5006 100644 --- a/src/GUIGeneral.h +++ b/src/GUIGeneral.h @@ -1,6 +1,6 @@ /* * GUIGeneral.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIItemBtn.h b/src/GUIItemBtn.h index ba70861..79cb5bf 100644 --- a/src/GUIItemBtn.h +++ b/src/GUIItemBtn.h @@ -1,6 +1,6 @@ /* * GUIItemBtn.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUILabel.cpp b/src/GUILabel.cpp index 4113457..7e19141 100644 --- a/src/GUILabel.cpp +++ b/src/GUILabel.cpp @@ -1,6 +1,6 @@ /* * GUILabel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUILabel.h b/src/GUILabel.h index b11341c..f7eff23 100644 --- a/src/GUILabel.h +++ b/src/GUILabel.h @@ -1,6 +1,6 @@ /* * GUILabel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUILabelPanel.cpp b/src/GUILabelPanel.cpp index 7a2d7a7..5bbda9e 100644 --- a/src/GUILabelPanel.cpp +++ b/src/GUILabelPanel.cpp @@ -1,6 +1,6 @@ /* * GUILabelPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -694,7 +694,7 @@ void GUILabelPanel::updatePositionValues() { void GUILabelPanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { - m_labelTextField->SetToolTip(wxT("For a normal label the text written here is what will be shown on the label. NOTE: On some of the setter elements of GrandOrgue this property cannot be set!")); + m_labelTextField->SetToolTip(wxT("For a normal label the text written here is what will be shown on the label. NOTE: On some of the setter elements of GrandOrgue this property cannot be set! Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_labelFont->SetToolTip(wxT("Font face and size can be set here. The default value is derived from the display metrics control label font of the panel.")); m_labelColourChoice->SetToolTip(wxT("Colour of the font can be chosen here. If a custom value is chosen the picker will be activated.")); m_labelColourPick->SetToolTip(wxT("A custom colour can be picked here.")); @@ -760,6 +760,10 @@ void GUILabelPanel::setTooltipsEnabled(bool isEnabled) { } } +void GUILabelPanel::refreshData() { + m_labelTextField->ChangeValue(m_label->getName()); +} + void GUILabelPanel::OnLabelTextChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_labelTextField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_labelTextField); diff --git a/src/GUILabelPanel.h b/src/GUILabelPanel.h index ddc35b0..b746a6e 100644 --- a/src/GUILabelPanel.h +++ b/src/GUILabelPanel.h @@ -1,6 +1,6 @@ /* * GUILabelPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,6 +35,7 @@ class GUILabelPanel : public wxPanel { void setLabel(GUILabel *label); void updatePositionValues(); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/GUIManual.cpp b/src/GUIManual.cpp index 556b8dd..c7b9dab 100644 --- a/src/GUIManual.cpp +++ b/src/GUIManual.cpp @@ -1,6 +1,6 @@ /* * GUIManual.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -774,7 +774,6 @@ void GUIManual::updateKeyInfo() { // otherwise it should be displayed as C unless next key also would be a natural for any reason bool nextIsNatural = false; if (m_displayKeys > 1) { - int nextKeyNbr = getDisplayKeyAt(i + 1)->second; nextIsNatural = (((key_nb % 12) < 5 && !(key_nb & 1)) || ((key_nb % 12) >= 5 && (key_nb & 1))) ? true : false; } if (key_nb % 12 == 4 || key_nb % 12 == 11 || nextIsNatural) { @@ -822,7 +821,6 @@ void GUIManual::updateKeyInfo() { // otherwise it should be displayed as C unless next key also would be a natural for any reason bool nextIsNatural = false; if (m_displayKeys > 1) { - int nextKeyNbr = getDisplayKeyAt(i + 1)->second; nextIsNatural = (((key_nb % 12) < 5 && !(key_nb & 1)) || ((key_nb % 12) >= 5 && (key_nb & 1))) ? true : false; } if (key_nb % 12 == 4 || key_nb % 12 == 11 || nextIsNatural) { @@ -869,7 +867,6 @@ void GUIManual::updateKeyInfo() { // otherwise it should be displayed as C unless next key also would be a natural for any reason bool nextIsNatural = false; if (m_displayKeys > 1) { - int nextKeyNbr = getDisplayKeyAt(i + 1)->second; nextIsNatural = (((key_nb % 12) < 5 && !(key_nb & 1)) || ((key_nb % 12) >= 5 && (key_nb & 1))) ? true : false; } if (key_nb % 12 == 4 || key_nb % 12 == 11 || nextIsNatural) { @@ -913,7 +910,6 @@ void GUIManual::updateKeyInfo() { // otherwise it should be displayed as C unless next key also would be a natural for any reason bool nextIsNatural = false; if (m_displayKeys > 1) { - int nextKeyNbr = getDisplayKeyAt(i + 1)->second; nextIsNatural = (((key_nb % 12) < 5 && !(key_nb & 1)) || ((key_nb % 12) >= 5 && (key_nb & 1))) ? true : false; } if (key_nb % 12 == 4 || key_nb % 12 == 11 || nextIsNatural) { diff --git a/src/GUIManual.h b/src/GUIManual.h index f8ddb09..2d1e910 100644 --- a/src/GUIManual.h +++ b/src/GUIManual.h @@ -1,6 +1,6 @@ /* * GUIManual.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIManualPanel.cpp b/src/GUIManualPanel.cpp index f849998..927aa27 100644 --- a/src/GUIManualPanel.cpp +++ b/src/GUIManualPanel.cpp @@ -1,6 +1,6 @@ /* * GUIManualPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIManualPanel.h b/src/GUIManualPanel.h index 19c9228..9b598e7 100644 --- a/src/GUIManualPanel.h +++ b/src/GUIManualPanel.h @@ -1,6 +1,6 @@ /* * GUIManualPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIPanelRepresentation.cpp b/src/GUIPanelRepresentation.cpp index 645fe1d..c8dacfd 100644 --- a/src/GUIPanelRepresentation.cpp +++ b/src/GUIPanelRepresentation.cpp @@ -1,6 +1,6 @@ /* * GUIPanelRepresentation.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIPanelRepresentation.h b/src/GUIPanelRepresentation.h index e6b5e78..806a88e 100644 --- a/src/GUIPanelRepresentation.h +++ b/src/GUIPanelRepresentation.h @@ -1,6 +1,6 @@ /* * GUIPanelRepresentation.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIRepresentationDrawingPanel.cpp b/src/GUIRepresentationDrawingPanel.cpp index a1ed3fe..fc10803 100644 --- a/src/GUIRepresentationDrawingPanel.cpp +++ b/src/GUIRepresentationDrawingPanel.cpp @@ -1,6 +1,6 @@ /* * GUIRepresentationDrawingPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIRepresentationDrawingPanel.h b/src/GUIRepresentationDrawingPanel.h index 51342bf..f26c029 100644 --- a/src/GUIRepresentationDrawingPanel.h +++ b/src/GUIRepresentationDrawingPanel.h @@ -1,6 +1,6 @@ /* * GUIRepresentationDrawingPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIReversiblePiston.cpp b/src/GUIReversiblePiston.cpp index 5ffa788..8df09f5 100644 --- a/src/GUIReversiblePiston.cpp +++ b/src/GUIReversiblePiston.cpp @@ -1,6 +1,6 @@ /* * GUIReversiblePiston.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIReversiblePiston.h b/src/GUIReversiblePiston.h index 2c62e1c..a3d5936 100644 --- a/src/GUIReversiblePiston.h +++ b/src/GUIReversiblePiston.h @@ -1,6 +1,6 @@ /* * GUIReversiblePiston.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIStop.cpp b/src/GUIStop.cpp index e9ceb07..a1228f5 100644 --- a/src/GUIStop.cpp +++ b/src/GUIStop.cpp @@ -1,6 +1,6 @@ /* * GUIStop.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUIStop.h b/src/GUIStop.h index 5953992..2b4f867 100644 --- a/src/GUIStop.h +++ b/src/GUIStop.h @@ -1,6 +1,6 @@ /* * GUIStop.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUISwitch.cpp b/src/GUISwitch.cpp index 58a4d0b..baf9fac 100644 --- a/src/GUISwitch.cpp +++ b/src/GUISwitch.cpp @@ -1,6 +1,6 @@ /* * GUIGoSwitch.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUISwitch.h b/src/GUISwitch.h index 8a47abf..554dac5 100644 --- a/src/GUISwitch.h +++ b/src/GUISwitch.h @@ -1,6 +1,6 @@ /* * GUISwitch.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUITremulant.cpp b/src/GUITremulant.cpp index 7fad346..a83176a 100644 --- a/src/GUITremulant.cpp +++ b/src/GUITremulant.cpp @@ -1,6 +1,6 @@ /* * GUITremulant.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GUITremulant.h b/src/GUITremulant.h index 7075f7d..af1167e 100644 --- a/src/GUITremulant.h +++ b/src/GUITremulant.h @@ -1,6 +1,6 @@ /* * GUITremulant.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/General.cpp b/src/General.cpp index bb7b09a..e1e88dd 100644 --- a/src/General.cpp +++ b/src/General.cpp @@ -1,6 +1,6 @@ /* * General.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/General.h b/src/General.h index 6fac8d1..df0c784 100644 --- a/src/General.h +++ b/src/General.h @@ -1,6 +1,6 @@ /* * General.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GeneralPanel.cpp b/src/GeneralPanel.cpp index 76c152d..173c423 100644 --- a/src/GeneralPanel.cpp +++ b/src/GeneralPanel.cpp @@ -1,6 +1,6 @@ /* * GeneralPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -706,11 +706,13 @@ void GeneralPanel::setIsFirstRemoval(bool value) { void GeneralPanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { + m_nameField->SetToolTip(wxT("It's best to make the name unique. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_isProtectedYes->SetToolTip(wxT("Yes means that the content of the general cannot be modified by the user.")); m_isProtectedNo->SetToolTip(wxT("No means that the user can modify the state of added elements.")); m_displayInvertedYes->SetToolTip(wxT("Yes means that the on and off bitmaps are reversed.")); m_displayInvertedNo->SetToolTip(wxT("No is the standard on/off bitmap display.")); } else { + m_nameField->SetToolTip(wxEmptyString); m_isProtectedYes->SetToolTip(wxEmptyString); m_isProtectedNo->SetToolTip(wxEmptyString); m_displayInvertedYes->SetToolTip(wxEmptyString); @@ -718,6 +720,10 @@ void GeneralPanel::setTooltipsEnabled(bool isEnabled) { } } +void GeneralPanel::refreshData() { + m_nameField->ChangeValue(m_general->getName()); +} + void GeneralPanel::OnNameChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_nameField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_nameField); diff --git a/src/GeneralPanel.h b/src/GeneralPanel.h index 3a9b41e..fce9a63 100644 --- a/src/GeneralPanel.h +++ b/src/GeneralPanel.h @@ -1,6 +1,6 @@ /* * GeneralPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,6 +33,7 @@ class GeneralPanel : public wxScrolledWindow { void setGeneral(General *general); void setIsFirstRemoval(bool value); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/GoColor.cpp b/src/GoColor.cpp index c81b8ff..e9cfa49 100644 --- a/src/GoColor.cpp +++ b/src/GoColor.cpp @@ -1,6 +1,6 @@ /* * GoColor.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoColor.h b/src/GoColor.h index 85f7436..d2be207 100644 --- a/src/GoColor.h +++ b/src/GoColor.h @@ -1,6 +1,6 @@ /* * GoColor.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoFontSize.cpp b/src/GoFontSize.cpp index 5449063..71a0448 100644 --- a/src/GoFontSize.cpp +++ b/src/GoFontSize.cpp @@ -1,6 +1,6 @@ /* * GoFontSize.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoFontSize.h b/src/GoFontSize.h index 5618dc8..1013a3b 100644 --- a/src/GoFontSize.h +++ b/src/GoFontSize.h @@ -1,6 +1,6 @@ /* * GoFontSize.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoImage.cpp b/src/GoImage.cpp index b497137..a59c1e0 100644 --- a/src/GoImage.cpp +++ b/src/GoImage.cpp @@ -1,6 +1,6 @@ /* * Image.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoImage.h b/src/GoImage.h index fe3a493..8e01f05 100644 --- a/src/GoImage.h +++ b/src/GoImage.h @@ -1,6 +1,6 @@ /* * GoImage.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoImagePanel.cpp b/src/GoImagePanel.cpp index b73e827..1b9a9e1 100644 --- a/src/GoImagePanel.cpp +++ b/src/GoImagePanel.cpp @@ -1,6 +1,6 @@ /* * GoImagePanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoImagePanel.h b/src/GoImagePanel.h index 3ca7e5f..c61ce57 100644 --- a/src/GoImagePanel.h +++ b/src/GoImagePanel.h @@ -1,6 +1,6 @@ /* * GoImagePanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoPanel.cpp b/src/GoPanel.cpp index ca58fb5..d07ee56 100644 --- a/src/GoPanel.cpp +++ b/src/GoPanel.cpp @@ -1,6 +1,6 @@ /* * GoPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoPanel.h b/src/GoPanel.h index 16e93de..ee082c7 100644 --- a/src/GoPanel.h +++ b/src/GoPanel.h @@ -1,6 +1,6 @@ /* * GoPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoPanelPanel.cpp b/src/GoPanelPanel.cpp index 27998f9..b6f38d8 100644 --- a/src/GoPanelPanel.cpp +++ b/src/GoPanelPanel.cpp @@ -1,6 +1,6 @@ /* * GoPanelPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -688,3 +688,8 @@ void GoPanelPanel::setTooltipsEnabled(bool isEnabled) { m_showPanelBtn->SetToolTip(wxEmptyString); } } + +void GoPanelPanel::refreshData() { + m_nameField->ChangeValue(m_panel->getName()); + m_groupField->ChangeValue(m_panel->getGroup()); +} diff --git a/src/GoPanelPanel.h b/src/GoPanelPanel.h index 2fc9e46..39b0b20 100644 --- a/src/GoPanelPanel.h +++ b/src/GoPanelPanel.h @@ -1,6 +1,6 @@ /* * GoPanelPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,6 +35,7 @@ class GoPanelPanel : public wxPanel { void setIsFirstRemoval(bool value); void updateRepresentationLayout(); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/GoPanelSize.cpp b/src/GoPanelSize.cpp index 51ba671..e750a88 100644 --- a/src/GoPanelSize.cpp +++ b/src/GoPanelSize.cpp @@ -1,6 +1,6 @@ /* * GoPanelSize.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoPanelSize.h b/src/GoPanelSize.h index 8867b1b..2172546 100644 --- a/src/GoPanelSize.h +++ b/src/GoPanelSize.h @@ -1,6 +1,6 @@ /* * GoPanelSize.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoSwitch.cpp b/src/GoSwitch.cpp index 3ad5d08..e793a89 100644 --- a/src/GoSwitch.cpp +++ b/src/GoSwitch.cpp @@ -1,6 +1,6 @@ /* * GoSwitch.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/GoSwitch.h b/src/GoSwitch.h index 8699edd..2696cd9 100644 --- a/src/GoSwitch.h +++ b/src/GoSwitch.h @@ -1,6 +1,6 @@ /* * GoSwitch.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Loop.cpp b/src/Loop.cpp index 0e77a0c..7a5492f 100644 --- a/src/Loop.cpp +++ b/src/Loop.cpp @@ -1,6 +1,6 @@ /* * Loop.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Loop.h b/src/Loop.h index 06e613e..b5d42dd 100644 --- a/src/Loop.h +++ b/src/Loop.h @@ -1,6 +1,6 @@ /* * Loop.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Manual.cpp b/src/Manual.cpp index 32c0a6c..3368ad0 100644 --- a/src/Manual.cpp +++ b/src/Manual.cpp @@ -1,6 +1,6 @@ /* * Manual.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Manual.h b/src/Manual.h index 9d32015..5d25919 100644 --- a/src/Manual.h +++ b/src/Manual.h @@ -1,6 +1,6 @@ /* * Manual.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/ManualKeyCopyDialog.cpp b/src/ManualKeyCopyDialog.cpp index d5eed50..8ae6e91 100644 --- a/src/ManualKeyCopyDialog.cpp +++ b/src/ManualKeyCopyDialog.cpp @@ -1,6 +1,6 @@ /* * ManualKeyCopyDialog.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/ManualKeyCopyDialog.h b/src/ManualKeyCopyDialog.h index cc6977a..63bb2ee 100644 --- a/src/ManualKeyCopyDialog.h +++ b/src/ManualKeyCopyDialog.h @@ -1,6 +1,6 @@ /* * ManualKeyCopyDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/ManualPanel.cpp b/src/ManualPanel.cpp index 2f60ae7..2017f39 100644 --- a/src/ManualPanel.cpp +++ b/src/ManualPanel.cpp @@ -1,6 +1,6 @@ /* * ManualPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -475,6 +475,7 @@ void ManualPanel::setIsFirstRemoval(bool value) { void ManualPanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { + m_nameField->SetToolTip(wxT("It's best to make the name unique. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_thisIsThePedalCheckbox->SetToolTip(wxT("If checked this manual is written as [Manual000] and assumed to be the pedal. Only the very first manual can be set to be the pedal as [Manual000].")); m_numberOfLogicalKeysSpin->SetToolTip(wxT("This is the total number of keys on a manual, including not directly playable ones (for instance not by physical keys - but reachable by octave couplers!). Normally, if you want 61 keys for a manual then the value for this property should also be set to 61.")); m_firstAccessibleKeyLogicalKeyNumberSpin->SetToolTip(wxT("The number of the first usable key.")); @@ -493,6 +494,7 @@ void ManualPanel::setTooltipsEnabled(bool isEnabled) { m_midiKeyMapKeys->SetToolTip(wxT("Allows to map the MIDI note in MIDIKey999 to a different number. NOTE: If there's no special reason to change this, the mapping should be left 'as is' by default!")); m_midiKeyMapValue->SetToolTip(wxT("This is the number that the chosen MIDIKey will map to. NOTE: If there's no special reason to change this, the mapping should be left 'as is' by default!")); } else { + m_nameField->SetToolTip(wxEmptyString); m_thisIsThePedalCheckbox->SetToolTip(wxEmptyString); m_numberOfLogicalKeysSpin->SetToolTip(wxEmptyString); m_firstAccessibleKeyLogicalKeyNumberSpin->SetToolTip(wxEmptyString); @@ -513,6 +515,10 @@ void ManualPanel::setTooltipsEnabled(bool isEnabled) { } } +void ManualPanel::refreshData() { + m_nameField->ChangeValue(m_manual->getName()); +} + void ManualPanel::OnNameChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_nameField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_nameField); diff --git a/src/ManualPanel.h b/src/ManualPanel.h index fb4f097..ef171cf 100644 --- a/src/ManualPanel.h +++ b/src/ManualPanel.h @@ -1,6 +1,6 @@ /* * ManualPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,6 +34,7 @@ class ManualPanel : public wxPanel { void setManual(Manual *manual); void setIsFirstRemoval(bool value); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/Organ.cpp b/src/Organ.cpp index 71970d3..30f7afa 100644 --- a/src/Organ.cpp +++ b/src/Organ.cpp @@ -1,6 +1,6 @@ /* * Organ.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General wxLicense as published by @@ -2074,3 +2074,120 @@ bool Organ::isElementReferenced(GoSwitch *sw) { return isReferenced; } + +void Organ::fixTrailingSpacesInStrings() { + GOODF_functions::RemoveTrailingWhitespace(&m_churchName); + GOODF_functions::RemoveTrailingWhitespace(&m_churchAddress); + GOODF_functions::RemoveTrailingWhitespace(&m_organBuilder); + GOODF_functions::RemoveTrailingWhitespace(&m_organBuildDate); + GOODF_functions::RemoveTrailingWhitespace(&m_organComments); + GOODF_functions::RemoveTrailingWhitespace(&m_recordingDetails); + + for (Enclosure &e : m_Enclosures) { + wxString name = e.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + e.setName(name); + } + + for (Tremulant &t : m_Tremulants) { + wxString name = t.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + t.setName(name); + } + + for (Windchestgroup &w : m_Windchestgroups) { + wxString name = w.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + w.setName(name); + } + + for (GoSwitch &s : m_Switches) { + wxString name = s.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + s.setName(name); + } + + for (Rank &r : m_Ranks) { + wxString name = r.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + r.setName(name); + } + + for (Stop &s : m_Stops) { + wxString name = s.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + s.setName(name); + } + + for (Manual &m : m_Manuals) { + wxString name = m.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + m.setName(name); + } + + for (Coupler &c : m_Couplers) { + wxString name = c.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + c.setName(name); + } + + for (Divisional &d : m_Divisionals) { + wxString name = d.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + d.setName(name); + } + + for (DivisionalCoupler &dc : m_DivisionalCouplers) { + wxString name = dc.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + dc.setName(name); + } + + for (General &g : m_Generals) { + wxString name = g.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + g.setName(name); + } + + for (ReversiblePiston &rp : m_ReversiblePistons) { + wxString name = rp.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + rp.setName(name); + } + + for (GoPanel &p : m_Panels) { + wxString name = p.getName(); + GOODF_functions::RemoveTrailingWhitespace(&name); + p.setName(name); + wxString group = p.getGroup(); + GOODF_functions::RemoveTrailingWhitespace(&group); + p.setGroup(group); + for (unsigned i = 0; i < (unsigned) p.getNumberOfGuiElements(); i++) { + GUIElement *guiElement = p.getGuiElementAt(i); + // Test if it's a button type + GUIButton *btnElement = dynamic_cast(guiElement); + if (btnElement) { + wxString label = btnElement->getDispLabelText(); + GOODF_functions::RemoveTrailingWhitespace(&label); + btnElement->setDispLabelText(label); + continue; + } + GUIEnclosure *encElement = dynamic_cast(guiElement); + if (encElement) { + wxString label = encElement->getDispLabelText(); + GOODF_functions::RemoveTrailingWhitespace(&label); + encElement->setDispLabelText(label); + continue; + } + GUILabel *labelElement = dynamic_cast(guiElement); + if (labelElement) { + wxString label = labelElement->getName(); + GOODF_functions::RemoveTrailingWhitespace(&label); + labelElement->setName(label); + continue; + } + } + } + + updateOrganElements(); +} diff --git a/src/Organ.h b/src/Organ.h index f3df062..0592acc 100644 --- a/src/Organ.h +++ b/src/Organ.h @@ -1,6 +1,6 @@ /* * Organ.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General wxLicense as published by @@ -186,6 +186,7 @@ class Organ { void setModified(bool modified); void doInheritLegacyXfades(); bool isElementReferenced(GoSwitch *sw); + void fixTrailingSpacesInStrings(); private: wxString m_odfRoot; diff --git a/src/OrganFileParser.cpp b/src/OrganFileParser.cpp index 534031d..af09f31 100644 --- a/src/OrganFileParser.cpp +++ b/src/OrganFileParser.cpp @@ -1,6 +1,6 @@ /* * OrganFileParser.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/OrganFileParser.h b/src/OrganFileParser.h index 9433281..8e99aab 100644 --- a/src/OrganFileParser.h +++ b/src/OrganFileParser.h @@ -1,6 +1,6 @@ /* * OrganFileParser.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/OrganPanel.cpp b/src/OrganPanel.cpp index b7297e6..984a0d1 100644 --- a/src/OrganPanel.cpp +++ b/src/OrganPanel.cpp @@ -1,6 +1,6 @@ /* * OrganPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General wxLicense as published by @@ -605,13 +605,13 @@ void OrganPanel::setTooltipsEnabled(bool isEnabled) { wxButton *infoPath = (wxButton*) FindWindow(ID_BROWSE_FOR_INFO_PATH); infoPath->SetToolTip(wxT("An organinfo file can be selected here but it is not necessary and not even supported for organ packages!")); m_odfPathField->SetToolTip(wxT("The full path to where the .organ file will be written is shown here. Set it with the 'Browse' button.")); - m_organNameField->SetToolTip(wxT("This is the file name of the .organ file. NOTE: Spaces in the filename will be removed! To 'Save as...' just change the name here and save.")); - m_churchNameField->SetToolTip(wxT("The curch name is an important property as it's the name of the organ as shown in GrandOrgue. Make it unique for every different organ!")); - m_churchAddressField->SetToolTip(wxT("This value is shown in GrandOrgue.")); - m_organBuilderField->SetToolTip(wxT("This value is shown in GrandOrgue.")); - m_organBuildDateField->SetToolTip(wxT("This value is shown in GrandOrgue.")); - m_organCommentsField->SetToolTip(wxT("This value is shown in GrandOrgue.")); - m_recordingDetailsField->SetToolTip(wxT("This value is shown in GrandOrgue.")); + m_organNameField->SetToolTip(wxT("This is the file name of the .organ file. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved! To 'Save as...' just change the name here and save.")); + m_churchNameField->SetToolTip(wxT("The curch name is an important property as it's the name of the organ as shown in GrandOrgue. Make it unique for every different organ! NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); + m_churchAddressField->SetToolTip(wxT("This value is shown in GrandOrgue. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); + m_organBuilderField->SetToolTip(wxT("This value is shown in GrandOrgue. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); + m_organBuildDateField->SetToolTip(wxT("This value is shown in GrandOrgue. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); + m_organCommentsField->SetToolTip(wxT("This value is shown in GrandOrgue. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); + m_recordingDetailsField->SetToolTip(wxT("This value is shown in GrandOrgue. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_infoPathField->SetToolTip(wxT("NOTE: This value is shown in GrandOrgue, but is not supported for the new organ package format! To clear any file here, click the 'Browse' button to the right and then 'Cancel'!")); m_amplitudeLevelSpin->SetToolTip(wxT("Linear volume (expressed as a percentage). A value of 0 (zero) will mute sound output!")); m_gainSpin->SetToolTip(wxT("Logarithmic volume. A value of 0 gain is equivalent to an amplitude level of 100.")); @@ -648,6 +648,15 @@ void OrganPanel::setTooltipsEnabled(bool isEnabled) { } } +void OrganPanel::fixTrailingSpacesInStrings() { + GOODF_functions::RemoveTrailingWhitespace(&m_odfName); +} + +void OrganPanel::refreshData() { + m_organNameField->ChangeValue(m_odfName); + getDataFromOrgan(); +} + void OrganPanel::getDataFromOrgan() { m_churchNameField->ChangeValue(m_currentOrgan->getChurchName()); m_churchAddressField->ChangeValue(m_currentOrgan->getChurchAddress()); @@ -737,12 +746,12 @@ wxString OrganPanel::GetDirectoryPath() { } void OrganPanel::OnOrganFileNameChange(wxCommandEvent& WXUNUSED(event)) { - m_odfName = m_organNameField->GetValue(); - if (m_odfName.Contains(wxT(" "))) { - m_odfName.Replace(wxT(" "), wxT("")); - m_organNameField->SetValue(m_odfName); + wxString content = m_organNameField->GetValue(); + GOODF_functions::CheckForStartingWhitespace(&content, m_organNameField); + if (!m_odfName.IsSameAs(m_organNameField->GetValue())) { + m_odfName = m_organNameField->GetValue(); + ::wxGetApp().m_frame->m_organ->setModified(true); } - ::wxGetApp().m_frame->m_organ->setModified(true); } void OrganPanel::OnChurchNameChange(wxCommandEvent& WXUNUSED(event)) { diff --git a/src/OrganPanel.h b/src/OrganPanel.h index cb575d6..d94fecd 100644 --- a/src/OrganPanel.h +++ b/src/OrganPanel.h @@ -1,6 +1,6 @@ /* * OrganPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General wxLicense as published by @@ -37,6 +37,8 @@ class OrganPanel : public wxPanel { void setOdfPath(wxString path); void setOdfName(wxString name); void setTooltipsEnabled(bool isEnabled); + void fixTrailingSpacesInStrings(); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/Pipe.cpp b/src/Pipe.cpp index 624a912..c2a1829 100644 --- a/src/Pipe.cpp +++ b/src/Pipe.cpp @@ -1,6 +1,6 @@ /* * Pipe.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Pipe.h b/src/Pipe.h index 7fdb031..7bd0ee1 100644 --- a/src/Pipe.h +++ b/src/Pipe.h @@ -1,6 +1,6 @@ /* * Pipe.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/PipeBorrowingDialog.cpp b/src/PipeBorrowingDialog.cpp index 04ade17..64f0360 100644 --- a/src/PipeBorrowingDialog.cpp +++ b/src/PipeBorrowingDialog.cpp @@ -1,6 +1,6 @@ /* * PipeBorrowingDialog.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/PipeBorrowingDialog.h b/src/PipeBorrowingDialog.h index 60ffe94..762a3d5 100644 --- a/src/PipeBorrowingDialog.h +++ b/src/PipeBorrowingDialog.h @@ -1,6 +1,6 @@ /* * PipeBorrowingDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/PipeCopyOffsetDialog.cpp b/src/PipeCopyOffsetDialog.cpp index 96cabb6..1c786f1 100644 --- a/src/PipeCopyOffsetDialog.cpp +++ b/src/PipeCopyOffsetDialog.cpp @@ -1,6 +1,6 @@ /* * PipeCopyOffsetDialog.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/PipeCopyOffsetDialog.h b/src/PipeCopyOffsetDialog.h index f6c97fd..450cd66 100644 --- a/src/PipeCopyOffsetDialog.h +++ b/src/PipeCopyOffsetDialog.h @@ -1,6 +1,6 @@ /* * PipeCopyOffsetDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/PipeDialog.cpp b/src/PipeDialog.cpp index 6a28fb7..26afcb3 100644 --- a/src/PipeDialog.cpp +++ b/src/PipeDialog.cpp @@ -1,6 +1,6 @@ /* * PipeDialog.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/PipeDialog.h b/src/PipeDialog.h index 5a41bda..6b88313 100644 --- a/src/PipeDialog.h +++ b/src/PipeDialog.h @@ -1,6 +1,6 @@ /* * PipeDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/PipeLoadingDialog.cpp b/src/PipeLoadingDialog.cpp index fb4f2aa..101ef44 100644 --- a/src/PipeLoadingDialog.cpp +++ b/src/PipeLoadingDialog.cpp @@ -1,6 +1,6 @@ /* * PipeLoadingDialog.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/PipeLoadingDialog.h b/src/PipeLoadingDialog.h index ecf78ae..48f104d 100644 --- a/src/PipeLoadingDialog.h +++ b/src/PipeLoadingDialog.h @@ -1,6 +1,6 @@ /* * PipeLoadingDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Rank.cpp b/src/Rank.cpp index d93c03a..46d3e33 100644 --- a/src/Rank.cpp +++ b/src/Rank.cpp @@ -1,6 +1,6 @@ /* * Rank.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Rank.h b/src/Rank.h index 7c767c0..5f10bf4 100644 --- a/src/Rank.h +++ b/src/Rank.h @@ -1,6 +1,6 @@ /* * Rank.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/RankPanel.cpp b/src/RankPanel.cpp index 687f404..86b7728 100644 --- a/src/RankPanel.cpp +++ b/src/RankPanel.cpp @@ -1,6 +1,6 @@ /* * RankPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -677,6 +677,7 @@ Rank* RankPanel::getCurrentRank() { void RankPanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { + m_nameField->SetToolTip(wxT("It's best to make the name unique. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_firstMidiNoteNumberSpin->SetToolTip(wxT("The MIDI note number for the first pipe decides the number matching when auto loading pipes with many of the buttons below.")); m_numberOfLogicalPipesSpin->SetToolTip(wxT("Set the desired number of pipes for the rank here.")); m_harmonicNumberSpin->SetToolTip(wxT("This value together with MIDI note and PitchFraction affects the automatic re-tuning in different temperaments.")); @@ -708,6 +709,7 @@ void RankPanel::setTooltipsEnabled(bool isEnabled) { m_flexiblePipeLoadingBtn->SetToolTip(wxT("Use this button to auto load samples for the rank with more fexibility than the other buttons allow.")); m_pipeTreeCtrl->SetToolTip(wxT("The pipe tree pipe(s), attacks and releases can be right clicked to bring up a pop-up menu.")); } else { + m_nameField->SetToolTip(wxEmptyString); m_firstMidiNoteNumberSpin->SetToolTip(wxEmptyString); m_numberOfLogicalPipesSpin->SetToolTip(wxEmptyString); m_harmonicNumberSpin->SetToolTip(wxEmptyString); @@ -741,6 +743,10 @@ void RankPanel::setTooltipsEnabled(bool isEnabled) { } } +void RankPanel::refreshData() { + m_nameField->ChangeValue(m_rank->getName()); +} + void RankPanel::SetPipeReadingOptions(wxString atkFolder, bool oneAttack, bool loadRelease, wxString releaseFolder, bool extractTime, wxString tremFolder, bool loadAsTremOff) { m_attackFolder = atkFolder; m_loadOnlyOneAttack = oneAttack; diff --git a/src/RankPanel.h b/src/RankPanel.h index 7785061..27906e6 100644 --- a/src/RankPanel.h +++ b/src/RankPanel.h @@ -1,6 +1,6 @@ /* * RankPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,6 +38,7 @@ class RankPanel : public wxPanel { void setIsFirstRemoval(bool value); Rank* getCurrentRank(); void setTooltipsEnabled(bool isEnabled); + void refreshData(); void SetPipeReadingOptions(wxString atkFolder, bool oneAttack, bool loadRelease, wxString releaseFolder, bool extractTime, wxString tremFolder, bool loadAsTremOff); wxString GetAttackFolderOption(); bool GetOneAttackOption(); diff --git a/src/RankReference.cpp b/src/RankReference.cpp index bde1232..28920da 100644 --- a/src/RankReference.cpp +++ b/src/RankReference.cpp @@ -1,6 +1,6 @@ /* * RankReference.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/RankReference.h b/src/RankReference.h index bb18f66..630063d 100644 --- a/src/RankReference.h +++ b/src/RankReference.h @@ -1,6 +1,6 @@ /* * RankReference.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Release.cpp b/src/Release.cpp index 87340a6..cc35709 100644 --- a/src/Release.cpp +++ b/src/Release.cpp @@ -1,6 +1,6 @@ /* * Release.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Release.h b/src/Release.h index 6d7f9c8..4000b55 100644 --- a/src/Release.h +++ b/src/Release.h @@ -1,6 +1,6 @@ /* * Release.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/ReleaseDialog.cpp b/src/ReleaseDialog.cpp index 69bb7f6..db21530 100644 --- a/src/ReleaseDialog.cpp +++ b/src/ReleaseDialog.cpp @@ -1,6 +1,6 @@ /* * ReleaseDialog.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/ReleaseDialog.h b/src/ReleaseDialog.h index c1a1b6d..24b209a 100644 --- a/src/ReleaseDialog.h +++ b/src/ReleaseDialog.h @@ -1,6 +1,6 @@ /* * ReleaseDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/ReversiblePiston.cpp b/src/ReversiblePiston.cpp index 91f88b8..2f97994 100644 --- a/src/ReversiblePiston.cpp +++ b/src/ReversiblePiston.cpp @@ -1,6 +1,6 @@ /* * ReversiblePiston.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/ReversiblePiston.h b/src/ReversiblePiston.h index 8819c35..fb76fb8 100644 --- a/src/ReversiblePiston.h +++ b/src/ReversiblePiston.h @@ -1,6 +1,6 @@ /* * ReversiblePiston.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/ReversiblePistonPanel.cpp b/src/ReversiblePistonPanel.cpp index 6e00e60..5718d12 100644 --- a/src/ReversiblePistonPanel.cpp +++ b/src/ReversiblePistonPanel.cpp @@ -1,6 +1,6 @@ /* * ReversiblePistonPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -300,6 +300,7 @@ void ReversiblePistonPanel::setIsFirstRemoval(bool value) { void ReversiblePistonPanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { + m_nameField->SetToolTip(wxT("It's best to make the name unique. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_displayInvertedYes->SetToolTip(wxT("Yes means that the on and off bitmaps are reversed.")); m_displayInvertedNo->SetToolTip(wxT("No is the standard on/off bitmap display.")); m_availableStops->SetToolTip(wxT("Here all available elements are listed that the reversible piston can target. Select one element and click the button below to use it as target. NOTE: Only one element can be targeted and make sure that the target element can receive 'Input'! This is a legacy feature of GrandOrgue, the same result can be achieved with just creating another GUI Element for the target element and style it appropriately!")); @@ -309,6 +310,7 @@ void ReversiblePistonPanel::setTooltipsEnabled(bool isEnabled) { m_objecTypeField->SetToolTip(wxT("This textfield for object type is automatically populated depending on what element is chosen.")); m_manualField->SetToolTip(wxT("This textfield for manual is automatically populated depending on what element is chosen.")); } else { + m_nameField->SetToolTip(wxEmptyString); m_displayInvertedYes->SetToolTip(wxEmptyString); m_displayInvertedNo->SetToolTip(wxEmptyString); m_availableStops->SetToolTip(wxEmptyString); @@ -320,6 +322,10 @@ void ReversiblePistonPanel::setTooltipsEnabled(bool isEnabled) { } } +void ReversiblePistonPanel::refreshData() { + m_nameField->ChangeValue(m_piston->getName()); +} + void ReversiblePistonPanel::OnNameChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_nameField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_nameField); diff --git a/src/ReversiblePistonPanel.h b/src/ReversiblePistonPanel.h index 3fbfdbf..e0848ea 100644 --- a/src/ReversiblePistonPanel.h +++ b/src/ReversiblePistonPanel.h @@ -1,6 +1,6 @@ /* * ReversiblePistonPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,6 +32,7 @@ class ReversiblePistonPanel : public wxPanel { void setReversiblePiston(ReversiblePiston *piston); void setIsFirstRemoval(bool value); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/SampleFileInfoDialog.cpp b/src/SampleFileInfoDialog.cpp index abf0a45..cfcc540 100644 --- a/src/SampleFileInfoDialog.cpp +++ b/src/SampleFileInfoDialog.cpp @@ -1,6 +1,6 @@ /* * SampleFileInfoDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/SampleFileInfoDialog.h b/src/SampleFileInfoDialog.h index fae55f7..4a0b122 100644 --- a/src/SampleFileInfoDialog.h +++ b/src/SampleFileInfoDialog.h @@ -1,6 +1,6 @@ /* * SampleFileInfoDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Stop.cpp b/src/Stop.cpp index 09f8b5b..0bb3dd8 100644 --- a/src/Stop.cpp +++ b/src/Stop.cpp @@ -1,6 +1,6 @@ /* * Stop.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Stop.h b/src/Stop.h index e8be942..5e9fa0d 100644 --- a/src/Stop.h +++ b/src/Stop.h @@ -1,6 +1,6 @@ /* * Stop.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/StopPanel.cpp b/src/StopPanel.cpp index 3aee70d..6be92e7 100644 --- a/src/StopPanel.cpp +++ b/src/StopPanel.cpp @@ -1,6 +1,6 @@ /* * StopPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -644,6 +644,7 @@ void StopPanel::setTooltipsEnabled(bool isEnabled) { m_internalRankPanel->setTooltipsEnabled(isEnabled); if (isEnabled) { + m_nameField->SetToolTip(wxT("It's best to make the name unique. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_displayInvertedYes->SetToolTip(wxT("Yes means that the on and off bitmaps are reversed.")); m_displayInvertedNo->SetToolTip(wxT("No is the standard on/off bitmap display.")); m_functionChoice->SetToolTip(wxT("Any other function than 'Input' means that the user no longer has direct control over the state of this element, nor can its state be directly changed by a combination, instead it's controlled indirectly by the referenced switch(es).\n\nThe logical function Not can only reference one switch and negates (inverts) the state of the input. And, Xor, Nand, Nor as well as Or has a variable number of inputs.\n\nSee for instance https://en.wikipedia.org/wiki/Logic_gate for further explanations about logical functions.")); @@ -671,6 +672,7 @@ void StopPanel::setTooltipsEnabled(bool isEnabled) { m_pipeCountSpin->SetToolTip(wxT("Number of pipes to use from the rank.")); m_firstAccessibleKeyNumberSpin->SetToolTip(wxT("Key number offset (from FirstAccessiblePipeLogicalKeyNumber) for the pipe referenced by FirstPipeNumber.")); } else { + m_nameField->SetToolTip(wxEmptyString); m_displayInvertedYes->SetToolTip(wxEmptyString); m_displayInvertedNo->SetToolTip(wxEmptyString); m_functionChoice->SetToolTip(wxEmptyString); @@ -700,6 +702,10 @@ void StopPanel::setTooltipsEnabled(bool isEnabled) { } } +void StopPanel::refreshData() { + m_nameField->ChangeValue(m_stop->getName()); +} + RankPanel* StopPanel::GetInternalRankPanel() { return m_internalRankPanel; } diff --git a/src/StopPanel.h b/src/StopPanel.h index 830e919..b3c05c4 100644 --- a/src/StopPanel.h +++ b/src/StopPanel.h @@ -1,6 +1,6 @@ /* * StopPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,6 +37,7 @@ class StopPanel : public wxPanel { void setIsFirstRemoval(bool value); Stop* getCurrentStop(); void setTooltipsEnabled(bool isEnabled); + void refreshData(); RankPanel* GetInternalRankPanel(); private: diff --git a/src/StopRankImportDialog.cpp b/src/StopRankImportDialog.cpp index d08b427..9d28ac3 100644 --- a/src/StopRankImportDialog.cpp +++ b/src/StopRankImportDialog.cpp @@ -1,6 +1,6 @@ /* * StopRankImportDialog.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (See AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (See AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/StopRankImportDialog.h b/src/StopRankImportDialog.h index ae8ff2f..d28c4da 100644 --- a/src/StopRankImportDialog.h +++ b/src/StopRankImportDialog.h @@ -1,6 +1,6 @@ /* * StopRankImportDialog.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (See AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (See AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/SwitchPanel.cpp b/src/SwitchPanel.cpp index 8b07ab2..50c7b41 100644 --- a/src/SwitchPanel.cpp +++ b/src/SwitchPanel.cpp @@ -1,6 +1,6 @@ /* * SwitchPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -66,7 +66,7 @@ SwitchPanel::SwitchPanel(wxWindow *parent) : wxPanel(parent) { wxStaticText *switchNameText = new wxStaticText ( this, wxID_STATIC, - wxT("switch name: ") + wxT("Switch name: ") ); firstRow->Add(switchNameText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); m_nameField = new wxTextCtrl( @@ -362,6 +362,7 @@ void SwitchPanel::setIsFirstRemoval(bool value) { void SwitchPanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { + m_nameField->SetToolTip(wxT("It's best to make the name unique. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_displayInvertedYes->SetToolTip(wxT("Yes means that the on and off bitmaps are reversed.")); m_displayInvertedNo->SetToolTip(wxT("No is the standard on/off bitmap display.")); m_functionChoice->SetToolTip(wxT("Any other function than 'Input' means that the user no longer has direct control over the state of this element, nor can its state be directly changed by a combination, instead it's controlled indirectly by the referenced switch(es).\n\nThe logical function Not can only reference one switch and negates (inverts) the state of the input. And, Xor, Nand, Nor as well as Or has a variable number of inputs.\n\nSee for instance https://en.wikipedia.org/wiki/Logic_gate for further explanations about logical functions.")); @@ -377,6 +378,7 @@ void SwitchPanel::setTooltipsEnabled(bool isEnabled) { m_storeInGeneralYes->SetToolTip(wxT("This stop is possible to store in generals.")); m_storeInGeneralNo->SetToolTip(wxT("This stop is not stored in generals unless 'Full' is used to set it.")); } else { + m_nameField->SetToolTip(wxEmptyString); m_displayInvertedYes->SetToolTip(wxEmptyString); m_displayInvertedNo->SetToolTip(wxEmptyString); m_functionChoice->SetToolTip(wxEmptyString); @@ -394,6 +396,10 @@ void SwitchPanel::setTooltipsEnabled(bool isEnabled) { } } +void SwitchPanel::refreshData() { + m_nameField->ChangeValue(m_switch->getName()); +} + void SwitchPanel::OnNameChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_nameField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_nameField); diff --git a/src/SwitchPanel.h b/src/SwitchPanel.h index a810c7a..6c99323 100644 --- a/src/SwitchPanel.h +++ b/src/SwitchPanel.h @@ -1,6 +1,6 @@ /* * SwitchPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,6 +33,7 @@ class SwitchPanel : public wxPanel { void setSwitch(GoSwitch *sw); void setIsFirstRemoval(bool value); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/Tremulant.cpp b/src/Tremulant.cpp index f3f43dc..5f5ef0b 100644 --- a/src/Tremulant.cpp +++ b/src/Tremulant.cpp @@ -1,6 +1,6 @@ /* * Tremulant.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Tremulant.h b/src/Tremulant.h index 84762bb..43aa645 100644 --- a/src/Tremulant.h +++ b/src/Tremulant.h @@ -1,6 +1,6 @@ /* * Tremulant.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/TremulantPanel.cpp b/src/TremulantPanel.cpp index 743df7a..357ce24 100644 --- a/src/TremulantPanel.cpp +++ b/src/TremulantPanel.cpp @@ -1,6 +1,6 @@ /* * TremulantPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -484,6 +484,7 @@ void TremulantPanel::setIsFirstRemoval(bool value) { void TremulantPanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { + m_nameField->SetToolTip(wxT("It's best to make the name unique. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_displayInvertedYes->SetToolTip(wxT("Yes means that the on and off bitmaps are reversed.")); m_displayInvertedNo->SetToolTip(wxT("No is the standard on/off bitmap display.")); m_functionChoice->SetToolTip(wxT("Any other function than 'Input' means that the user no longer has direct control over the state of this element, nor can its state be directly changed by a combination, instead it's controlled indirectly by the referenced switch(es).\n\nThe logical function Not can only reference one switch and negates (inverts) the state of the input. And, Xor, Nand, Nor as well as Or has a variable number of inputs.\n\nSee for instance https://en.wikipedia.org/wiki/Logic_gate for further explanations about logical functions.")); @@ -504,6 +505,7 @@ void TremulantPanel::setTooltipsEnabled(bool isEnabled) { m_stopRateSpin->SetToolTip(wxT("Stop time of the tremulant. Only used for a 'Synth' tremulant.")); m_ampModDepthSpin->SetToolTip(wxT("How much the amplitude will be modulated. Only used for a 'Synth' tremulant. A higher value means greater modulation.")); } else { + m_nameField->SetToolTip(wxEmptyString); m_displayInvertedYes->SetToolTip(wxEmptyString); m_displayInvertedNo->SetToolTip(wxEmptyString); m_functionChoice->SetToolTip(wxEmptyString); @@ -526,6 +528,10 @@ void TremulantPanel::setTooltipsEnabled(bool isEnabled) { } } +void TremulantPanel::refreshData() { + m_nameField->ChangeValue(m_tremulant->getName()); +} + void TremulantPanel::OnNameChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_nameField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_nameField); diff --git a/src/TremulantPanel.h b/src/TremulantPanel.h index 1aeee2e..de79322 100644 --- a/src/TremulantPanel.h +++ b/src/TremulantPanel.h @@ -1,6 +1,6 @@ /* * TremulantPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,6 +33,7 @@ class TremulantPanel : public wxPanel { void setTremulant(Tremulant *tremulant); void setIsFirstRemoval(bool value); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/src/WAVfileParser.cpp b/src/WAVfileParser.cpp index c3f3ac2..beff71b 100644 --- a/src/WAVfileParser.cpp +++ b/src/WAVfileParser.cpp @@ -1,6 +1,6 @@ /* * WAVfileParser.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -253,7 +253,6 @@ bool WAVfileParser::tryParsingWvFile(wxString file) { unsigned uBuffer; unsigned char uChBuffer; unsigned blockNumber = 0; - bool continueParsingFile = true; unsigned wavpackSamplerates[16] = { 6000, 8000, diff --git a/src/WAVfileParser.h b/src/WAVfileParser.h index 625497b..06592fe 100644 --- a/src/WAVfileParser.h +++ b/src/WAVfileParser.h @@ -1,6 +1,6 @@ /* * WAVfileParser.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Windchestgroup.cpp b/src/Windchestgroup.cpp index 269be50..fc87d2c 100644 --- a/src/Windchestgroup.cpp +++ b/src/Windchestgroup.cpp @@ -1,6 +1,6 @@ /* * Windchestgroup.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/Windchestgroup.h b/src/Windchestgroup.h index 853307d..3efbb37 100644 --- a/src/Windchestgroup.h +++ b/src/Windchestgroup.h @@ -1,6 +1,6 @@ /* * Windchestgroup.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/WindchestgroupPanel.cpp b/src/WindchestgroupPanel.cpp index fe7b30f..c4b75ee 100644 --- a/src/WindchestgroupPanel.cpp +++ b/src/WindchestgroupPanel.cpp @@ -1,6 +1,6 @@ /* * WindchestgroupPanel.cpp is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -423,6 +423,7 @@ void WindchestgroupPanel::setIsFirstRemoval(bool value) { void WindchestgroupPanel::setTooltipsEnabled(bool isEnabled) { if (isEnabled) { + m_nameField->SetToolTip(wxT("The name of this windchest is used in listings so it's best to make it unique. NOTE: Leading spaces and usage of semicolon (;) is prohibited and any trailing spaces will be removed when organ is saved!")); m_availableEnclosures->SetToolTip(wxT("Here all available enclosures of the organ are listed.")); m_referencedEnclosures->SetToolTip(wxT("The enclosure(s) listed here will affect this windchestgroup and thus any rank/pipe placed on this windchest. Do note that it's possible that more than one enclosure can affect one winchest, and it's also possible that many windchests are affected by the same enclosure.")); m_availableTremulants->SetToolTip(wxT("Here all available tremulants of the organ are listed.")); @@ -437,6 +438,7 @@ void WindchestgroupPanel::setTooltipsEnabled(bool isEnabled) { m_trackerDelaySpin->SetToolTip(wxT("Set overall tracker delay of the windhcestgroup here.")); m_pitchCorrectionSpin->SetToolTip(wxT("Set overall pitch adjustment for any other temperament than 'Original' for the windchestgroup here.")); } else { + m_nameField->SetToolTip(wxEmptyString); m_availableEnclosures->SetToolTip(wxEmptyString); m_referencedEnclosures->SetToolTip(wxEmptyString); m_availableTremulants->SetToolTip(wxEmptyString); @@ -453,6 +455,10 @@ void WindchestgroupPanel::setTooltipsEnabled(bool isEnabled) { } } +void WindchestgroupPanel::refreshData() { + m_nameField->ChangeValue(m_windchest->getName()); +} + void WindchestgroupPanel::OnNameChange(wxCommandEvent& WXUNUSED(event)) { wxString content = m_nameField->GetValue(); GOODF_functions::CheckForStartingWhitespace(&content, m_nameField); diff --git a/src/WindchestgroupPanel.h b/src/WindchestgroupPanel.h index 3edacee..36e8d1e 100644 --- a/src/WindchestgroupPanel.h +++ b/src/WindchestgroupPanel.h @@ -1,6 +1,6 @@ /* * WindchestgroupPanel.h is part of GoOdf. - * Copyright (C) 2024 Lars Palo and contributors (see AUTHORS) + * Copyright (C) 2025 Lars Palo and contributors (see AUTHORS) * * GoOdf is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,6 +33,7 @@ class WindchestgroupPanel : public wxPanel { void setWindchest(Windchestgroup *windchest); void setIsFirstRemoval(bool value); void setTooltipsEnabled(bool isEnabled); + void refreshData(); private: DECLARE_EVENT_TABLE() diff --git a/version.txt b/version.txt index a551051..e815b86 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.15.0 +0.15.1