X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2FSaveConfig.java;h=c229437f7ac4cccbcb03e852bf9aa39667d48736;hb=6f96fb8a39cd8dadff3602eec8a26ed2a7d1fca8;hp=af7eb83e20eee289c03f2588e1a27fe67f14eca5;hpb=649c5da6ee1bbc590699e11a92316ece2ea8512d;p=GpsPrune.git diff --git a/tim/prune/function/SaveConfig.java b/tim/prune/function/SaveConfig.java index af7eb83..c229437 100644 --- a/tim/prune/function/SaveConfig.java +++ b/tim/prune/function/SaveConfig.java @@ -4,6 +4,7 @@ import java.awt.BorderLayout; import java.awt.Component; import java.awt.FlowLayout; import java.awt.GridLayout; +import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; @@ -86,13 +87,16 @@ public class SaveConfig extends GenericFunction { mainPanel.add(new JLabel(keyLabel)); String val = conf.getProperty(key); + String tipText = val; if (Config.isKeyBoolean(key)) { val = Config.getConfigBoolean(key)?I18nManager.getText("dialog.about.yes"):I18nManager.getText("dialog.about.no"); } else if (val != null && val.length() > 30) { val = val.substring(0, 30) + " ..."; } - mainPanel.add(new JLabel(val)); + JLabel label = new JLabel(val); + label.setToolTipText(tipText); + mainPanel.add(label); } } dialogPanel.add(mainPanel, BorderLayout.CENTER); @@ -155,6 +159,13 @@ public class SaveConfig extends GenericFunction */ private void saveConfig(File inSaveFile) { + // Set current window position in config + Rectangle currBounds = _app.getFrame().getBounds(); + String windowBounds = "" + currBounds.x + "x" + currBounds.y + "x" + + currBounds.width + "x" + currBounds.height; + Config.setConfigString(Config.KEY_WINDOW_BOUNDS, windowBounds); + + // TODO: Check for null inSaveFile, then just call finish() ? FileOutputStream outStream = null; try {