Skip to content

Commit 4c33130

Browse files
committed
Sync with BitBucket.
1 parent 8a7d174 commit 4c33130

File tree

11 files changed

+24
-15
lines changed

11 files changed

+24
-15
lines changed

src/org/yccheok/jstock/data/gui.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,6 @@ SaveToCloudJDialog_SignOut=Sign out
757757
OptionsAlertJPanel_SignOut=Sign out
758758
OptionsNetworkJPanel_GoogleFinance=Google Finance
759759
OptionsNetworkJPanel_YahooFinance=Yahoo Finance
760-
OptionsNetworkJPanel_KLSEInfo=KLSE Info
761760
WatchlistInfo_Country=Country
762761
WatchlistInfo_Name=Watchlist Name
763762
WatchlistInfo_Size=Size

src/org/yccheok/jstock/data/gui_de.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,6 @@ SaveToCloudJDialog_SignOut=Sign out
753753
OptionsAlertJPanel_SignOut=Sign out
754754
OptionsNetworkJPanel_GoogleFinance=Google Finance
755755
OptionsNetworkJPanel_YahooFinance=Yahoo Finance
756-
OptionsNetworkJPanel_KLSEInfo=KLSE Info
757756
WatchlistInfo_Country=Country
758757
WatchlistInfo_Name=Watchlist Name
759758
WatchlistInfo_Size=Size

src/org/yccheok/jstock/data/gui_en.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,6 @@ SaveToCloudJDialog_SignOut=Sign out
757757
OptionsAlertJPanel_SignOut=Sign out
758758
OptionsNetworkJPanel_GoogleFinance=Google Finance
759759
OptionsNetworkJPanel_YahooFinance=Yahoo Finance
760-
OptionsNetworkJPanel_KLSEInfo=KLSE Info
761760
WatchlistInfo_Country=Country
762761
WatchlistInfo_Name=Watchlist Name
763762
WatchlistInfo_Size=Size

src/org/yccheok/jstock/data/gui_it.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,6 @@ SaveToCloudJDialog_SignOut=Sign out
757757
OptionsAlertJPanel_SignOut=Sign out
758758
OptionsNetworkJPanel_GoogleFinance=Google Finance
759759
OptionsNetworkJPanel_YahooFinance=Yahoo Finance
760-
OptionsNetworkJPanel_KLSEInfo=KLSE Info
761760
WatchlistInfo_Country=Country
762761
WatchlistInfo_Name=Watchlist Name
763762
WatchlistInfo_Size=Size

src/org/yccheok/jstock/data/gui_zh.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,6 @@ SaveToCloudJDialog_SignOut=\u767b\u51fa
750750
OptionsAlertJPanel_SignOut=\u767b\u51fa
751751
OptionsNetworkJPanel_GoogleFinance=\u8c37\u6b4c\u8d22\u7ecf
752752
OptionsNetworkJPanel_YahooFinance=\u96c5\u864e\u8d22\u7ecf
753-
OptionsNetworkJPanel_KLSEInfo=KLSE Info
754753
WatchlistInfo_Country=Country
755754
WatchlistInfo_Name=Watchlist Name
756755
WatchlistInfo_Size=Size

src/org/yccheok/jstock/data/gui_zh_TW.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,6 @@ SaveToCloudJDialog_SignOut=\u767b\u51fa
748748
OptionsAlertJPanel_SignOut=\u767b\u51fa
749749
OptionsNetworkJPanel_GoogleFinance=\u8c37\u6b4c\u8ca1\u7d93
750750
OptionsNetworkJPanel_YahooFinance=\u96c5\u864e\u8ca1\u7d93
751-
OptionsNetworkJPanel_KLSEInfo=KLSE Info
752751
WatchlistInfo_Country=Country
753752
WatchlistInfo_Name=Watchlist Name
754753
WatchlistInfo_Size=Size

src/org/yccheok/jstock/gui/IndicatorScannerJPanel.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,13 @@ public void run() {
379379
Utils.playAlertSound();
380380
}
381381
try {
382-
Thread.sleep(jStockOptions.getAlertSpeed() * 1000);
382+
// Make it rest for 1 minute. Yahoo does have quota
383+
// for every ip. If we are too greedy, we will get
384+
// Error message: "Unable to process request at this time -- error 999"
385+
// https://help.yahoo.com/kb/SLN2253.html
386+
Thread.sleep(1*60*1000);
387+
388+
//Thread.sleep(jStockOptions.getAlertSpeed() * 1000);
383389
}
384390
catch (InterruptedException exp) {
385391
log.error(null, exp);

src/org/yccheok/jstock/gui/JStock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3739,7 +3739,7 @@ public void initJStockOptions(JStockOptions jStockOptions) {
37393739

37403740
/* Hard core fix. */
37413741
if (this.jStockOptions.getScanningSpeed() == 0) {
3742-
this.jStockOptions.setScanningSpeed(5000);
3742+
this.jStockOptions.setScanningSpeed(1*60*1000);
37433743
}
37443744

37453745
final String proxyHost = this.jStockOptions.getProxyServer();

src/org/yccheok/jstock/gui/JStockOptions.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ public JStockOptions() {
119119
this.singleIndicatorAlert = true;
120120
this.proxyServer = "";
121121
this.proxyPort = -1;
122-
this.scanningSpeed = 10000;
122+
// In milliseconds.
123+
this.scanningSpeed = 1*60*1000;
124+
// In seconds.
123125
this.alertSpeed = 5;
124126
this.looknFeel = null;
125127
this.alwaysOnTop = false;
@@ -189,7 +191,9 @@ public JStockOptions() {
189191
private transient String indicatorPassword;
190192
private String proxyServer;
191193
private int proxyPort;
192-
private int scanningSpeed; /* In ms. */
194+
// In milliseconds.
195+
private int scanningSpeed;
196+
// In seconds.
193197
private int alertSpeed;
194198
// Opps! Spelling mistake (Should be lookNFeel). However, due to XML
195199
// serialization compatibility, we decide not to fix it.
@@ -563,6 +567,12 @@ private Object readResolve() {
563567

564568
if (this.priceSources == null) {
565569
this.priceSources = new EnumMap<Country, PriceSource>(Country.class);
570+
} else {
571+
// Still here for xstream backward compatible. Shall be removed
572+
// after a while.
573+
if (this.priceSources.get(Country.Malaysia) == PriceSource.KLSEInfo) {
574+
this.priceSources.put(Country.Malaysia, PriceSource.Yahoo);
575+
}
566576
}
567577

568578
if (this.currencies == null) {

src/org/yccheok/jstock/gui/OptionsNetworkJPanel.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,10 @@ private static String[] getPriceSourceEntryValues(Country country) {
535535

536536
private volatile SwingWorker testConnectionSwingWorker = null;
537537

538-
private static final Map<String, String> priceSourceEntries = new HashMap<String, String>();
538+
private static final Map<String, String> priceSourceEntries = new HashMap<>();
539539
static {
540540
priceSourceEntries.put(PriceSource.Yahoo.name(), GUIBundle.getString("OptionsNetworkJPanel_YahooFinance"));
541541
priceSourceEntries.put(PriceSource.Google.name(), GUIBundle.getString("OptionsNetworkJPanel_GoogleFinance"));
542-
priceSourceEntries.put(PriceSource.KLSEInfo.name(), GUIBundle.getString("OptionsNetworkJPanel_KLSEInfo"));
543542
}
544543

545544
// Variables declaration - do not modify//GEN-BEGIN:variables

0 commit comments

Comments
 (0)