Possible patch file for some of the places; needs testing and checked by a better wxWidgets programmer than me.
Tim S.
From b9dc8c854549650067c3aaacc0fc08c844c4d75b Mon Sep 17 00:00:00 2001
From: Tim S <stahta01@users.sourceforge.net>
Date: Tue, 27 Mar 2018 11:32:46 -0400
Subject: [PATCH] - UI: Disable options if makefile (Thanks stahta01)
---
src/sdk/projectfileoptionsdlg.cpp | 2 +-
src/src/projectoptionsdlg.cpp | 17 +++++++++++++----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/sdk/projectfileoptionsdlg.cpp b/src/sdk/projectfileoptionsdlg.cpp
index 7288b6d4a..a823df668 100644
--- a/src/sdk/projectfileoptionsdlg.cpp
+++ b/src/sdk/projectfileoptionsdlg.cpp
@@ -186,7 +186,7 @@ ProjectFileOptionsDlg::ProjectFileOptionsDlg(wxWindow* parent, ProjectFile* pf)
XRCCTRL(*this, "staticIncludedFilesLabel", wxStaticText)->Hide();
XRCCTRL(*this, "staticIncludedFiles", wxStaticText)->Hide();
- if (pf->AutoGeneratedBy())
+ if (pf->AutoGeneratedBy() || pf->GetParentProject()->IsMakefileCustom())
{
XRCCTRL(*this, "tabBuild", wxPanel)->Enable(false);
XRCCTRL(*this, "tabAdvanced", wxPanel)->Enable(false);
diff --git a/src/src/projectoptionsdlg.cpp b/src/src/projectoptionsdlg.cpp
index 5be29342d..9c817a9c8 100644
--- a/src/src/projectoptionsdlg.cpp
+++ b/src/src/projectoptionsdlg.cpp
@@ -126,7 +126,9 @@ ProjectOptionsDlg::ProjectOptionsDlg(wxWindow* parent, cbProject* project)
bool hasPCH = compiler && compiler->GetSwitches().supportsPCH;
XRCCTRL(*this, "rbPCHStrategy", wxRadioBox)->Enable(hasPCH);
- XRCCTRL(*this, "chkExtendedObjNames", wxCheckBox)->SetValue(m_Project->GetExtendedObjectNamesGeneration());
+ wxCheckBox* chkEON = XRCCTRL(*this, "chkExtendedObjNames", wxCheckBox);
+ chkEON->SetValue(m_Project->GetExtendedObjectNamesGeneration());
+ chkEON->Enable(!(m_Project->IsMakefileCustom()));
XRCCTRL(*this, "chkShowNotes", wxCheckBox)->SetValue(m_Project->GetShowNotesOnLoad());
XRCCTRL(*this, "txtNotes", wxTextCtrl)->SetValue(m_Project->GetNotes());
@@ -271,8 +273,13 @@ void ProjectOptionsDlg::DoTargetChange(bool saveOld)
TargetFilenameGenerationPolicy prefixPolicy;
TargetFilenameGenerationPolicy extensionPolicy;
target->GetTargetFilenameGenerationPolicy(prefixPolicy, extensionPolicy);
- XRCCTRL(*this, "chkAutoGenPrefix", wxCheckBox)->SetValue(prefixPolicy == tgfpPlatformDefault);
- XRCCTRL(*this, "chkAutoGenExt", wxCheckBox)->SetValue(extensionPolicy == tgfpPlatformDefault);
+ wxCheckBox* chkAGP = XRCCTRL(*this, "chkAutoGenPrefix", wxCheckBox);
+ bool customMake = m_Project->IsMakefileCustom();
+ chkAGP->SetValue(prefixPolicy == tgfpPlatformDefault);
+ chkAGP->Enable(!customMake);
+ wxCheckBox* chkAGE = XRCCTRL(*this, "chkAutoGenExt", wxCheckBox);
+ chkAGE->SetValue(extensionPolicy == tgfpPlatformDefault);
+ chkAGE->Enable(!customMake);
chkCR->Enable(false);
chkSL->Enable(target->GetTargetType() == ttDynamicLib);
@@ -1330,7 +1337,9 @@ void ProjectOptionsDlg::EndModal(int retCode)
m_Project->SetMakefileExecutionDir(XRCCTRL(*this, "txtExecutionDir", wxTextCtrl)->GetValue());
m_Project->SetTargetType(TargetType(XRCCTRL(*this, "cmbProjectType", wxComboBox)->GetSelection()));
m_Project->SetModeForPCH((PCHMode)XRCCTRL(*this, "rbPCHStrategy", wxRadioBox)->GetSelection());
- m_Project->SetExtendedObjectNamesGeneration(XRCCTRL(*this, "chkExtendedObjNames", wxCheckBox)->GetValue());
+ wxCheckBox* chkEON = XRCCTRL(*this, "chkExtendedObjNames", wxCheckBox);
+ m_Project->SetExtendedObjectNamesGeneration(chkEON->GetValue());
+ chkEON->Enable(!(m_Project->IsMakefileCustom()));
m_Project->SetShowNotesOnLoad(XRCCTRL(*this, "chkShowNotes", wxCheckBox)->GetValue());
m_Project->SetCheckForExternallyModifiedFiles(XRCCTRL(*this, "chkCheckFiles", wxCheckBox)->GetValue());
m_Project->SetNotes(XRCCTRL(*this, "txtNotes", wxTextCtrl)->GetValue());
--
2.16.2.windows.1