diff --git a/build.xml b/build.xml index 265ed3f..e4ff72f 100644 --- a/build.xml +++ b/build.xml @@ -2,7 +2,7 @@ - + @@ -37,7 +37,7 @@ - + diff --git a/src/net/soartex/patcher/Listeners.java b/src/net/soartex/texture_patcher/Listeners.java similarity index 99% rename from src/net/soartex/patcher/Listeners.java rename to src/net/soartex/texture_patcher/Listeners.java index 4558a64..c16e552 100644 --- a/src/net/soartex/patcher/Listeners.java +++ b/src/net/soartex/texture_patcher/Listeners.java @@ -1,4 +1,4 @@ -package net.soartex.patcher; +package net.soartex.texture_patcher; import java.awt.Desktop; import java.awt.GridBagConstraints; @@ -229,6 +229,8 @@ protected BrowseListener (final Texture_Patcher t_p) { t_p.checkUpdate.setEnabled(true); t_p.patch.setEnabled(true); + t_p.prefsnode.put("path", file.getAbsolutePath()); + } protected final class ZipFileFilter extends FileFilter { @@ -910,7 +912,7 @@ protected void compileTexturepack () { progressdialog.setString("Compressing texture pack file (" + ++count + "/" + files.size() + ")"); - final ZipEntry zipentry = new ZipEntry(zipentrypath); + final ZipEntry zipentry = new ZipEntry(zipentrypath.replace("\\", "/")); zipout.putNextEntry(zipentry); diff --git a/src/net/soartex/patcher/TableModel.java b/src/net/soartex/texture_patcher/TableModel.java similarity index 95% rename from src/net/soartex/patcher/TableModel.java rename to src/net/soartex/texture_patcher/TableModel.java index ea2bfd2..142a4de 100644 --- a/src/net/soartex/patcher/TableModel.java +++ b/src/net/soartex/texture_patcher/TableModel.java @@ -1,4 +1,4 @@ -package net.soartex.patcher; +package net.soartex.texture_patcher; import javax.swing.table.AbstractTableModel; diff --git a/src/net/soartex/patcher/Texture_Patcher.java b/src/net/soartex/texture_patcher/Texture_Patcher.java similarity index 97% rename from src/net/soartex/patcher/Texture_Patcher.java rename to src/net/soartex/texture_patcher/Texture_Patcher.java index 4f800a4..379c51d 100644 --- a/src/net/soartex/patcher/Texture_Patcher.java +++ b/src/net/soartex/texture_patcher/Texture_Patcher.java @@ -1,4 +1,4 @@ -package net.soartex.patcher; +package net.soartex.texture_patcher; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; @@ -20,6 +20,7 @@ import java.util.Date; import java.util.HashMap; import java.util.Properties; +import java.util.prefs.Preferences; import javax.swing.ButtonGroup; import javax.swing.JButton; @@ -41,8 +42,9 @@ public final class Texture_Patcher implements Runnable { - protected final static float VERSION = 1.2F; + protected final static float VERSION = 1.0F; + protected final Preferences prefsnode = Preferences.userNodeForPackage(Texture_Patcher.class); protected final Properties config = new Properties(); protected boolean stopped = false; @@ -533,7 +535,8 @@ protected void initializeComponents () { gbc.anchor = GridBagConstraints.NORTH; gbc.insets = insets; - path = new JTextField(); + path = new JTextField(prefsnode.get("path", "")); + path.setEditable(false); frame.add(path, gbc); @@ -588,6 +591,13 @@ protected void initializeComponents () { frame.add(patch, gbc); + if (!path.getText().equals("")) { + + checkUpdate.setEnabled(true); + patch.setEnabled(true); + + } + gbc = new GridBagConstraints(); gbc.gridx = 0;