Explorar el Código

Cache version.version in MainFrame

Change-Id: I5d2eccb3e1470159f2ee416994c1b1465af8f068
Reviewed-on: http://gerrit.dmdirc.com/418
Tested-by: Gregory Holmes <greboid@dmdirc.com>
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.6.3
Gregory Holmes hace 14 años
padre
commit
0aa40dd5e2
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5
    2
      src/com/dmdirc/addons/ui_swing/MainFrame.java

+ 5
- 2
src/com/dmdirc/addons/ui_swing/MainFrame.java Ver fichero

@@ -97,6 +97,8 @@ public final class MainFrame extends JFrame implements WindowListener,
97 97
     private SwingController controller;
98 98
     /** Status bar. */
99 99
     private SwingStatusBar statusBar;
100
+    /** Client Version. */
101
+    private String version;
100 102
 
101 103
     /**
102 104
      * Creates new form MainFrame.
@@ -122,6 +124,8 @@ public final class MainFrame extends JFrame implements WindowListener,
122 124
 
123 125
         showVersion = IdentityManager.getGlobalConfig().getOptionBool("ui",
124 126
                 "showversion");
127
+        version = IdentityManager.getGlobalConfig().getOption("version",
128
+                    "version");
125 129
         IdentityManager.getGlobalConfig().addChangeListener("ui", "lookandfeel",
126 130
                 this);
127 131
         IdentityManager.getGlobalConfig().addChangeListener("ui", "showversion",
@@ -230,8 +234,7 @@ public final class MainFrame extends JFrame implements WindowListener,
230 234
     @Override
231 235
     public String getTitlePrefix() {
232 236
         if (showVersion) {
233
-            return "DMDirc " + IdentityManager.getGlobalConfig().getOption(
234
-                    "version", "version");
237
+            return "DMDirc " + version;
235 238
         } else {
236 239
             return "DMDirc";
237 240
         }

Loading…
Cancelar
Guardar