Skip to content

Commit ca51ab8

Browse files
committed
Added functionality to show/hide items and flag for distros...
1 parent ba356d2 commit ca51ab8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

FlashDevelop/Managers/ButtonManager.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,15 @@ public static Boolean ValidateFlagAction(ToolStripItem item, String action)
206206
if (chunks[chunks.Length - 1] != language.ToUpper()) return false;
207207
}
208208
}
209+
if (action.Contains("DistroIs?"))
210+
{
211+
String[] chunks = action.Split('?');
212+
if (chunks.Length == 2)
213+
{
214+
String distro = DistroConfig.DISTRIBUTION_NAME;
215+
if (chunks[chunks.Length - 1] != distro) return false;
216+
}
217+
}
209218
if (action.Contains("IsActiveSyntax"))
210219
{
211220
String language = document.SciControl.ConfigurationLanguage;
@@ -258,6 +267,14 @@ public static void ExecuteFlagAction(ToolStripItem item, String action, Boolean
258267
{
259268
item.Enabled = !value;
260269
}
270+
else if (action.StartsWithOrdinal("Visible:"))
271+
{
272+
item.Visible = value;
273+
}
274+
else if (action.StartsWithOrdinal("Invisible:"))
275+
{
276+
item.Visible = !value;
277+
}
261278
}
262279

263280
/// <summary>

0 commit comments

Comments
 (0)