mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-25 02:04:23 +00:00
Projucer: Added an option to the module settings page to set selected modules to use or not use global paths
This commit is contained in:
parent
2bd5aa04aa
commit
f454b97e56
1 changed files with 19 additions and 6 deletions
|
|
@ -36,7 +36,7 @@ public:
|
|||
header ("Modules", Icon (getIcons().modules, Colours::transparentBlack)),
|
||||
setCopyModeButton ("Set copy-mode for all modules..."),
|
||||
copyPathButton ("Set paths for all modules..."),
|
||||
globalPathsButton ("Enable/disable global path for all modules...")
|
||||
globalPathsButton ("Enable/disable global path for modules...")
|
||||
{
|
||||
listHeader = new ListBoxHeader ( { "Module", "Version", "Make Local Copy", "Paths" },
|
||||
{ 0.25f, 0.2f, 0.2f, 0.35f } );
|
||||
|
|
@ -234,18 +234,31 @@ private:
|
|||
PopupMenu m;
|
||||
m.addItem (1, "Set all modules to use global paths");
|
||||
m.addItem (2, "Set all modules to not use global paths");
|
||||
m.addItem (3, "Set selected modules to use global paths");
|
||||
m.addItem (4, "Set selected modules to not use global paths");
|
||||
|
||||
auto res = m.showAt (&globalPathsButton);
|
||||
|
||||
if (res != 0)
|
||||
{
|
||||
auto enableGlobalPaths = (res == 1);
|
||||
auto enableGlobalPaths = (res % 2 == 1);
|
||||
|
||||
auto& modules = project.getModules();
|
||||
auto moduleIDs = modules.getAllModules();
|
||||
auto& moduleList = project.getModules();
|
||||
|
||||
for (auto id : moduleIDs)
|
||||
modules.shouldUseGlobalPath (id).setValue (enableGlobalPaths);
|
||||
if (res < 3)
|
||||
{
|
||||
auto moduleIDs = moduleList.getAllModules();
|
||||
|
||||
for (auto id : moduleIDs)
|
||||
moduleList.shouldUseGlobalPath (id).setValue (enableGlobalPaths);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto selected = list.getSelectedRows();
|
||||
|
||||
for (auto i = 0; i < selected.size(); ++i)
|
||||
moduleList.shouldUseGlobalPath (moduleList.getModuleID (selected[i])).setValue (enableGlobalPaths);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue