Skip to content

Commit

Permalink
Minor spacing and messaging improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
fireduck64 committed Jul 12, 2019
1 parent e9c190d commit 556447b
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 11 deletions.
9 changes: 5 additions & 4 deletions iceleaf/src/AddressPanel.java
Expand Up @@ -62,7 +62,7 @@ public void setupPanel()
c.weightx = 0.0;
c.weighty= 0.0;
c.gridheight = 1;
c.anchor = GridBagConstraints.NORTHWEST;
c.anchor = GridBagConstraints.WEST;

c.gridwidth = 1;
panel.add(new JLabel("Wallet to view addresses of:"), c);
Expand All @@ -87,7 +87,7 @@ public class UpdateThread extends PeriodicThread
{
public UpdateThread()
{
super(15000);
super(45000);

}
public void runPass()
Expand All @@ -98,13 +98,15 @@ public void runPass()
if (wallet_name == null)
{
setMessageBox("no wallet selected");
setStatusBox("");
return;
}

SnowBlossomClient client = ice_leaf.getWalletPanel().getWallet( wallet_name );
if (client == null)
{
setMessageBox("no wallet selected");
setStatusBox("");
return;
}
ByteArrayOutputStream bout = new ByteArrayOutputStream();
Expand All @@ -115,8 +117,6 @@ public void runPass()

for(AddressSpecHash hash : WalletUtil.getAddressesByAge(db, ice_leaf.getParams()))
{


String address = hash.toAddressString(ice_leaf.getParams());
boolean used = db.getUsedAddressesMap().containsKey(address);
BalanceInfo bi = client.getBalance(hash);
Expand All @@ -133,6 +133,7 @@ public void runPass()
catch(Throwable t)
{
setMessageBox(ErrorUtil.getThrowInfo(t));
setStatusBox("");
}
}

Expand Down
2 changes: 1 addition & 1 deletion iceleaf/src/BasePanel.java
Expand Up @@ -84,7 +84,7 @@ public void setup()
GridBagConstraints c = new GridBagConstraints();
c.gridheight = 1;
c.gridwidth = GridBagConstraints.REMAINDER;
c.anchor = GridBagConstraints.NORTHWEST;
c.anchor = GridBagConstraints.WEST;

c.weightx=0.0;
c.weighty=0.0;
Expand Down
3 changes: 2 additions & 1 deletion iceleaf/src/MakeWalletPanel.java
Expand Up @@ -59,7 +59,7 @@ public void setupPanel()
c.weighty= 0.0;
c.gridheight = 1;
c.gridwidth = 1;
c.anchor = GridBagConstraints.NORTHWEST;
c.anchor = GridBagConstraints.WEST;


panel.add(new JLabel("Name for new wallet: "), c);
Expand Down Expand Up @@ -186,6 +186,7 @@ else if (import_seed_button.isSelected())
}

name_field.setText("");
import_field.setText("");
ice_leaf.getWalletPanel().wake();

}
Expand Down
2 changes: 1 addition & 1 deletion iceleaf/src/NodePanel.java
Expand Up @@ -38,7 +38,7 @@ public void setupPanel()
c.weightx = 0.0;
c.weighty= 0.0;
c.gridheight = 1;
c.anchor = GridBagConstraints.NORTHWEST;
c.anchor = GridBagConstraints.WEST;

c.gridwidth = GridBagConstraints.REMAINDER;
if (ice_leaf_prefs.getBoolean("node_run_local", false))
Expand Down
2 changes: 1 addition & 1 deletion iceleaf/src/NodeSelectionPanel.java
Expand Up @@ -49,7 +49,7 @@ public void setupPanel()
c.weightx = 0.0;
c.weighty= 0.0;
c.gridheight = 1;
c.anchor = GridBagConstraints.NORTHWEST;
c.anchor = GridBagConstraints.WEST;

c.gridwidth = GridBagConstraints.REMAINDER;

Expand Down
9 changes: 8 additions & 1 deletion iceleaf/src/SendPanel.java
Expand Up @@ -71,7 +71,7 @@ public void setupPanel()
c.weightx = 0.0;
c.weighty= 0.0;
c.gridheight = 1;
c.anchor = GridBagConstraints.NORTHWEST;
c.anchor = GridBagConstraints.WEST;


c.gridwidth = 1;
Expand Down Expand Up @@ -145,9 +145,11 @@ public void run()
SubmitReply reply = ice_leaf.getStubHolder().getBlockingStub().submitTransaction(tx_result.getTx());
ChainHash tx_hash = new ChainHash(tx_result.getTx().getTxHash());
setMessageBox(String.format("%s\n%s", tx_hash.toString(), reply.toString()));
setStatusBox("");

send_state = 0;
setProgressBar(0, SEND_DELAY);
setStatusBox("");

return;
}
Expand All @@ -163,11 +165,13 @@ public void run()
setupTx();


setStatusBox("Time delay to review");
for(int i=0; i<SEND_DELAY; i+=SEND_DELAY_STEP)
{
setProgressBar(i, SEND_DELAY);
sleep(SEND_DELAY_STEP);
}
setStatusBox("Ready to broadcast");
setProgressBar(SEND_DELAY, SEND_DELAY);
synchronized(state_obj)
{
Expand All @@ -176,6 +180,7 @@ public void run()
}
catch(Throwable t)
{
setStatusBox("Error");
setMessageBox(ErrorUtil.getThrowInfo(t));

synchronized(state_obj)
Expand All @@ -189,6 +194,8 @@ public void run()

private void setupTx() throws Exception
{
setStatusBox("Creating transaction");
setMessageBox("");
TransactionFactoryConfig.Builder config = TransactionFactoryConfig.newBuilder();
config.setSign(true);
config.setChangeFreshAddress(true);
Expand Down
2 changes: 1 addition & 1 deletion iceleaf/src/SettingsPanel.java
Expand Up @@ -24,7 +24,7 @@ public void setupPanel()
c.weightx = 0.0;
c.weighty= 0.0;
c.gridheight = 1;
c.anchor = GridBagConstraints.NORTHWEST;
c.anchor = GridBagConstraints.WEST;

c.gridwidth = 1;
panel.add(new JLabel("Wallet Directory"), c);
Expand Down
2 changes: 1 addition & 1 deletion iceleaf/src/WalletPanel.java
Expand Up @@ -49,7 +49,7 @@ public void setupPanel()
c.weightx = 0.0;
c.weighty= 0.0;
c.gridheight = 1;
c.anchor = GridBagConstraints.NORTHWEST;
c.anchor = GridBagConstraints.WEST;

c.gridwidth = GridBagConstraints.REMAINDER;

Expand Down

0 comments on commit 556447b

Please sign in to comment.