Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b0f050f
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Mar 21, 2025
a64b4bc
touching publish.yml
tig Mar 21, 2025
320384e
Merge branch 'v2_release' into v2_develop
tig Mar 21, 2025
4048436
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Mar 29, 2025
3b0311d
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Mar 29, 2025
04b6e94
Nuked ContextMenuv2 - use PopverMenu instead
tig Mar 29, 2025
fea8e90
WIP context menu stuff
tig Mar 30, 2025
90121f1
More robust dispose
tig Mar 30, 2025
cad6b4e
Removed ConextMenu; use PopoverMenu instead
tig Mar 30, 2025
f7f64c9
Code cleanup
tig Mar 30, 2025
e7d36e8
Code cleanup2
tig Mar 30, 2025
26a9b79
Start on migrating UICatalog
tig Mar 30, 2025
8b67742
Progress
tig Mar 30, 2025
7f95c51
Progress on nav
tig Mar 31, 2025
7e6a024
Improved RadioGroup
tig Mar 31, 2025
9fdfbd5
Improved RadioGroup
tig Mar 31, 2025
bcdf7de
Improved RadioGroup
tig Mar 31, 2025
cdce4a3
Mostly done
tig Mar 31, 2025
1c39896
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Apr 1, 2025
2cee67f
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Apr 1, 2025
25d054d
meged v2_develop
tig Apr 1, 2025
d5979b5
meged v2_develop
tig Apr 1, 2025
2e99663
fixed unit test fail
tig Apr 1, 2025
e9ffa13
Cleaned up FlagSelector
tig Apr 1, 2025
4a33679
Cleaned up FlagSelector
tig Apr 1, 2025
c026486
WIP: Unit tests
tig Apr 1, 2025
73045e8
Merge branch 'v2_2975-UICatalog-Menuv2' of tig:tig/Terminal.Gui into …
tig Apr 1, 2025
399a6c5
Tons of fixes. Ported v1 MenuBar tests
tig Apr 1, 2025
4ec2a6e
Massive UICatalog code cleanup
tig Apr 2, 2025
0c61f38
unit test fix
tig Apr 2, 2025
aabb825
api doc typos
tig Apr 2, 2025
0ac6888
api doc typos
tig Apr 2, 2025
beff88b
Implemente MenuBarv2 helpers for easing porting. Ported CharMap
tig Apr 2, 2025
25446e1
Remvoed old UICatalog code
tig Apr 2, 2025
9c3cf8f
Fixed UICatalog theme bug
tig Apr 2, 2025
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
2 changes: 1 addition & 1 deletion Terminal.Gui/Application/ApplicationPopover.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ public void Hide (IPopover? popover)
// If there's an existing popover, hide it.
if (_activePopover is View popoverView && popoverView == popover)
{
popoverView.Visible = false;
_activePopover = null;
popoverView.Visible = false;
Application.Top?.SetNeedsDraw ();
}
}
Expand Down
8 changes: 6 additions & 2 deletions Terminal.Gui/View/View.Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,18 @@ private void SetupCommands ()
/// </returns>
protected bool? RaiseAccepting (ICommandContext? ctx)
{
Logging.Trace($"{ctx?.Source?.Title}");
CommandEventArgs args = new () { Context = ctx };

// Best practice is to invoke the virtual method first.
// This allows derived classes to handle the event and potentially cancel it.
Logging.Trace ($"Calling OnAccepting...");
args.Cancel = OnAccepting (args) || args.Cancel;

if (!args.Cancel)
{
// If the event is not canceled by the virtual method, raise the event to notify any external subscribers.
Logging.Trace ($"Raising Accepting...");
Accepting?.Invoke (this, args);
}

Expand All @@ -148,11 +151,12 @@ private void SetupCommands ()

if (SuperView is { })
{
return SuperView?.InvokeCommand (Command.Accept, ctx) is true;
Logging.Trace ($"Invoking Accept on SuperView: {SuperView.Title}...");
return SuperView?.InvokeCommand (Command.Accept, ctx);
}
}

return Accepting is null ? null : args.Cancel;
return args.Cancel;
}

/// <summary>
Expand Down
10 changes: 10 additions & 0 deletions Terminal.Gui/View/View.Keyboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,11 @@ bool RaiseKeyUp (Key k)

private static bool InvokeCommandsBoundToKeyOnAdornment (Adornment adornment, Key key, ref bool? handled)
{
if (!adornment.Enabled)
{
return false;
}

bool? adornmentHandled = adornment.InvokeCommands (key);

if (adornmentHandled is true)
Expand Down Expand Up @@ -599,6 +604,11 @@ private static bool InvokeCommandsBoundToKeyOnAdornment (Adornment adornment, Ke
/// </returns>
internal bool? InvokeCommandsBoundToHotKey (Key hotKey)
{
if (!Enabled)
{
return false;
}

bool? handled = null;
// Process this View
if (HotKeyBindings.TryGet (hotKey, out KeyBinding binding))
Expand Down
Loading
Loading