Permalink
Browse files

fixed blocking on language change

  • Loading branch information...
1 parent acaa996 commit 529e6eda83d226fd5d7d972a13168eafa6ea50d7 @jim618 jim618 committed Feb 25, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/main/java/org/multibit/viewsystem/swing/MultiBitFrame.java
@@ -118,6 +118,7 @@
public static final int WIDTH_OF_AMOUNT_FIELD = 160;
private StatusBar statusBar;
+ private boolean online = false;
private static final long serialVersionUID = 7621813615342923041L;
@@ -324,9 +325,7 @@ private void initUI() {
contentPane.add(viewPanel, constraints);
statusBar = new StatusBar(controller, this);
- if (controller.getMultiBitService() != null && controller.getMultiBitService().getPeerGroup() != null) {
- statusBar.updateOnlineStatusText(controller.getMultiBitService().getPeerGroup().numPeers() > 0);
- }
+ statusBar.updateOnlineStatusText(online);
constraints.fill = GridBagConstraints.BOTH;
constraints.gridx = 0;
@@ -677,6 +676,7 @@ public void recreateAllViews(boolean clearCache, boolean initUI) {
initUI();
applyComponentOrientation(ComponentOrientation.getOrientation(controller.getLocaliser().getLocale()));
}
+
statusBar.refreshOnlineStatusText();
updateHeader();
@@ -688,7 +688,9 @@ public void recreateAllViews(boolean clearCache, boolean initUI) {
if (!clearCache && viewFactory != null) {
yourWalletsView = (YourWalletsPanel) viewFactory.getView(View.YOUR_WALLETS_VIEW);
}
+
viewFactory = new ViewFactory(controller, this);
+
if (!clearCache && yourWalletsView != null) {
viewFactory.addView(View.YOUR_WALLETS_VIEW, yourWalletsView);
}
@@ -820,12 +822,14 @@ public void run() {
}
public void nowOnline() {
+ online = true;
if (statusBar != null) {
statusBar.updateOnlineStatusText(true);
}
}
public void nowOffline() {
+ online = false;
if (statusBar != null) {
statusBar.updateOnlineStatusText(false);
}

0 comments on commit 529e6ed

Please sign in to comment.