Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added ability to hide items in voukoder menu #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Core/EncoderOptionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ struct EncoderOptionInfo
bool isForced = false;
bool isActive = false;
bool prependNoIfFalse = false;
bool visible = true;

struct ComboItem
{
Expand Down
4 changes: 4 additions & 0 deletions Core/OptionResourceUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ bool OptionResourceUtils::CreateOptionInfo(EncoderOptionInfo &optionInfo, const
if (resource.find("prependNoIfFalse") != resource.end())
optionInfo.prependNoIfFalse = resource["prependNoIfFalse"].get<bool>();

// Optional: Should this item be invisible?
if (resource.find("visible") != resource.end())
optionInfo.visible = resource["visible"].get<bool>();

// Get the control type
std::string type = resource["control"]["type"].get<std::string>();

Expand Down
4 changes: 4 additions & 0 deletions Core/wxOptionEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ void wxOptionEditor::Configure(EncoderInfo encoderInfo, OptionContainer options)
// Add all options to the group
for (const EncoderOptionInfo &optionInfo : group.options)
{
//skip this item if it is flagged as invisible
if (!optionInfo.visible)
continue;

wxOptionProperty *optionProperty = new wxOptionProperty(optionInfo);
m_propertyGrid->AppendIn(category, optionProperty);

Expand Down