mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GT-2886 - fixed NPE when trying to beep
This commit is contained in:
parent
146a83f953
commit
2f58ec7b47
8 changed files with 53 additions and 39 deletions
|
@ -1909,7 +1909,7 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the status text in the active component window.
|
||||
* Set the status text in the active component window
|
||||
* @param text status text
|
||||
*/
|
||||
public void setStatusText(String text) {
|
||||
|
@ -1918,6 +1918,30 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the status text in the active component window
|
||||
*
|
||||
* @param text string to be displayed in the Status display area
|
||||
* @param beep whether to beep or not
|
||||
*/
|
||||
public void setStatusText(String text, boolean beep) {
|
||||
if (root == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
setStatusText(text);
|
||||
if (beep) {
|
||||
Toolkit.getDefaultToolkit().beep();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A convenience method to make an attention-grabbing noise to the user
|
||||
*/
|
||||
public static void beep() {
|
||||
Toolkit.getDefaultToolkit().beep();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the menu group associated with a cascaded submenu. This allows
|
||||
* a cascading menu item to be grouped with a specific set of actions.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue