X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f8105809ef8f7cb0d1a9933f3f790b7b446c7cfa..fcdb9b388a28bfdd7083ae5357b5427dac2429bf:/utils/configtool/src/configtooldoc.cpp?ds=sidebyside diff --git a/utils/configtool/src/configtooldoc.cpp b/utils/configtool/src/configtooldoc.cpp index 5dd41d2461..660af43535 100644 --- a/utils/configtool/src/configtooldoc.cpp +++ b/utils/configtool/src/configtooldoc.cpp @@ -575,6 +575,7 @@ void ctConfigToolDoc::RefreshDependencies(ctConfigItem* item) wxString precludes = item->GetPropertyString(wxT("precludes")); wxString enabledIf = item->GetPropertyString(wxT("enabled-if")); wxString enabledIfNot = item->GetPropertyString(wxT("enabled-if-not")); + wxString indeterminateIf = item->GetPropertyString(wxT("indeterminate-if")); wxString context = item->GetPropertyString(wxT("context")); if (!requires.IsEmpty()) @@ -589,6 +590,9 @@ void ctConfigToolDoc::RefreshDependencies(ctConfigItem* item) if (!enabledIf.IsEmpty()) item->StringToArray(enabledIf, requiresArr); + if (!indeterminateIf.IsEmpty()) + item->StringToArray(indeterminateIf, requiresArr); + // Add the parent to the list of dependencies, if the // parent is a check or radio group. ctConfigItem* parent = item->GetParent(); @@ -639,7 +643,7 @@ void ctConfigToolDoc::GenerateSetup(ctConfigItem* item, wxString& str) wxString name = item->GetName(); // We don't process the platform choice - if (item->GetName() == wxT("Platform")) + if (item->GetName() == wxT("Target")) return; if (item->IsInActiveContext() && @@ -689,8 +693,8 @@ wxString ctConfigToolDoc::GenerateConfigureCommand() str << path << wxT("configure"); - // Find the platform option to use - ctConfigItem* platformsFolder = GetTopItem()->FindItem(wxT("Platform")); + // Find the target to use + ctConfigItem* platformsFolder = GetTopItem()->FindItem(wxT("Target")); if (platformsFolder) { for ( wxNode* node = platformsFolder->GetChildren().GetFirst(); node; node = node->GetNext() ) @@ -714,7 +718,7 @@ void ctConfigToolDoc::GenerateConfigureCommand(ctConfigItem* item, wxString& str { // We don't process the platform group, since we've // already done so. - if (item->GetName() == wxT("Platform")) + if (item->GetName() == wxT("Target")) return; if (item->IsInActiveContext() && @@ -791,6 +795,51 @@ wxString ctConfigToolDoc::GetFrameworkDir(bool makeUnix) return path; } +/// Finds the next item in the tree +ctConfigItem* ctConfigToolDoc::FindNextItem(ctConfigItem* item, bool wrap) +{ + if (!item) + return GetTopItem(); + + // First, try to find the first child + if (item->GetChildCount() > 0) + { + return item->GetChild(0); + } + else + { + ctConfigItem* p = item; + while (p) + { + ctConfigItem* toFind = FindNextSibling(p); + if (toFind) + return toFind; + p = p->GetParent(); + } + } + + // Finally, wrap around to the root. + if (wrap) + return GetTopItem(); + else + return NULL; +} + +/// Finds the next sibling in the tree +ctConfigItem* ctConfigToolDoc::FindNextSibling(ctConfigItem* item) +{ + if (item->GetParent()) + { + wxNode* node = item->GetParent()->GetChildren().Member(item); + if (node && node->GetNext()) + { + ctConfigItem* nextItem = (ctConfigItem*) node->GetNext()->GetData(); + return nextItem; + } + } + return NULL; +} + /* * Implements a document editing command. @@ -990,3 +1039,4 @@ bool ctConfigCommand::DoAndUndo(bool doCmd) return TRUE; } +