X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2Festimate%2FEstimateTime.java;h=ef6979358edaefb64828469f18a2c41e6daf8846;hp=7a502e4332ed03e9aca1d451d170f7bd70aa4800;hb=326f489e36aa7f235bc19409a57bf4955cd50f24;hpb=8c8868ae29b3252f02e094c02307384cf61ba667 diff --git a/tim/prune/function/estimate/EstimateTime.java b/tim/prune/function/estimate/EstimateTime.java index 7a502e4..ef69793 100644 --- a/tim/prune/function/estimate/EstimateTime.java +++ b/tim/prune/function/estimate/EstimateTime.java @@ -29,6 +29,7 @@ import tim.prune.data.Unit; import tim.prune.gui.DecimalNumberField; import tim.prune.gui.DisplayUtils; import tim.prune.gui.GuiGridLayout; +import tim.prune.tips.TipManager; /** * Class to calculate and show the results of estimating (hike) time for the current range @@ -86,7 +87,8 @@ public class EstimateTime extends GenericFunction } if (_dialog == null) { - // TODO: Check whether params are at default, show tip message if unaltered? + // First time in, check whether params are at default, show tip message if unaltered + showTip(); _dialog = new JDialog(_parentFrame, I18nManager.getText(getNameKey()), true); _dialog.setLocationRelativeTo(_parentFrame); _dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); @@ -360,4 +362,16 @@ public class EstimateTime extends GenericFunction } _dialog.dispose(); } + + /** + * Show a tip to use the learn function, if appropriate + */ + private void showTip() + { + EstimationParameters currParams = new EstimationParameters( + Config.getConfigString(Config.KEY_ESTIMATION_PARAMS)); + if (currParams.sameAsDefaults()) { + _app.showTip(TipManager.Tip_LearnTimeParams); + } + } }