mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Merge remote-tracking branch 'origin/GP-4558_ghidragon_action_chooser_dialog_bugs'
This commit is contained in:
@@ -46,6 +46,7 @@ public class ShowActionChooserDialogAction extends DockingAction {
|
|||||||
Tool tool = DockingWindowManager.getActiveInstance().getTool();
|
Tool tool = DockingWindowManager.getActiveInstance().getTool();
|
||||||
|
|
||||||
if (focusedWindow instanceof DockingDialog dialog) {
|
if (focusedWindow instanceof DockingDialog dialog) {
|
||||||
|
context = dialog.getDialogComponent().getActionContext(null);
|
||||||
showActionsDialog(tool, dialog, context);
|
showActionsDialog(tool, dialog, context);
|
||||||
}
|
}
|
||||||
else if (focusedWindow instanceof DockingFrame dockingFrame) {
|
else if (focusedWindow instanceof DockingFrame dockingFrame) {
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ public class ActionChooserDialog extends DialogComponentProvider {
|
|||||||
"This dialog initialy shows only locally relevant actions. Repeat initial keybinding " +
|
"This dialog initialy shows only locally relevant actions. Repeat initial keybinding " +
|
||||||
"to show More. Use up down arrows to scroll through list of actions and press" +
|
"to show More. Use up down arrows to scroll through list of actions and press" +
|
||||||
" enter to invoke selected action. Type text to filter list.");
|
" enter to invoke selected action. Type text to filter list.");
|
||||||
|
setOkEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -308,7 +309,8 @@ public class ActionChooserDialog extends DialogComponentProvider {
|
|||||||
Color fgName = getForeground(); // defaults to list foreground; handles selected state
|
Color fgName = getForeground(); // defaults to list foreground; handles selected state
|
||||||
Color fgKeyBinding = isSelected ? getForeground() : Messages.HINT;
|
Color fgKeyBinding = isSelected ? getForeground() : Messages.HINT;
|
||||||
|
|
||||||
if (!action.isEnabled()) {
|
ActionContext context = model.getContext();
|
||||||
|
if (!(action.isValidContext(context) && action.isEnabledForContext(context))) {
|
||||||
fgName = isSelected ? getForeground() : Colors.FOREGROUND_DISABLED;
|
fgName = isSelected ? getForeground() : Colors.FOREGROUND_DISABLED;
|
||||||
fgKeyBinding = isSelected ? getForeground() : Colors.FOREGROUND_DISABLED;
|
fgKeyBinding = isSelected ? getForeground() : Colors.FOREGROUND_DISABLED;
|
||||||
disabledText = isSelected ? " <I>disabled</I>" : "";
|
disabledText = isSelected ? " <I>disabled</I>" : "";
|
||||||
|
|||||||
Reference in New Issue
Block a user