mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-08-10 16:43:14 +00:00
add menu item to lock all open wallets in a window
This commit is contained in:
@@ -1300,6 +1300,17 @@ public class AppController implements Initializable {
|
||||
}
|
||||
}
|
||||
|
||||
public void lockWallets(ActionEvent event) {
|
||||
for(Tab tab : tabs.getTabs()) {
|
||||
TabData tabData = (TabData)tab.getUserData();
|
||||
if(tabData instanceof WalletTabData walletTabData) {
|
||||
if(!walletTabData.getWalletForm().isLocked()) {
|
||||
EventManager.get().post(new WalletLockEvent(walletTabData.getWalletForm().getMasterWallet()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void refreshWallet(ActionEvent event) {
|
||||
WalletForm selectedWalletForm = getSelectedWalletForm();
|
||||
if(selectedWalletForm != null) {
|
||||
|
||||
@@ -332,6 +332,10 @@ public class WalletForm {
|
||||
return walletUtxosEntry;
|
||||
}
|
||||
|
||||
public boolean isLocked() {
|
||||
return lockedProperty.get();
|
||||
}
|
||||
|
||||
public BooleanProperty lockedProperty() {
|
||||
return lockedProperty;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user