Skip to content

Commit

Permalink
Don't show file parameter "Open folder" link in remote app
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeoliphant committed Nov 8, 2024
1 parent 9260786 commit ffb3081
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dependencies/stompbox
2 changes: 1 addition & 1 deletion StompboxShared/Interface/AudioFilePlayerInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected override void AddControls(Dock dock)

vStack.Children.Add(new TextBlock(Plugin.Name) { HorizontalAlignment = EHorizontalAlignment.Center, TextColor = foregroundColor });

vStack.Children.Add(CreateFileControl(Plugin.Parameters[0], true));
vStack.Children.Add(CreateFileControl(Plugin.Parameters[0]));

UIElement levelControl = CreateControl(Plugin.Parameters[1]);
levelControl.HorizontalAlignment = EHorizontalAlignment.Center;
Expand Down
6 changes: 4 additions & 2 deletions StompboxShared/Interface/PluginInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,10 @@ protected UIElement CreateEnumControl(PluginParameter parameter)
return enumInterface;
}

protected UIElement CreateFileControl(PluginParameter parameter, bool showOpenFolder)
protected UIElement CreateFileControl(PluginParameter parameter)
{
bool showOpenFolder = !StompboxClient.Instance.InClientMode;

int offset = (showOpenFolder ? 1 : 0);

FileInterface fileInterface = new FileInterface(showOpenFolder ? parameter.FilePath : null, parameter.EnumValues, foregroundColor)
Expand Down Expand Up @@ -716,7 +718,7 @@ protected override void AddControls(Dock dock)
}
else if (parameter.ParameterType == EParameterType.File)
{
textStack.Children.Add(CreateFileControl(parameter, true));
textStack.Children.Add(CreateFileControl(parameter));

haveTextParams = true;
}
Expand Down

0 comments on commit ffb3081

Please sign in to comment.