[jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/install s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Mon Feb 14 21:32:36 MST 2005
Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install
In directory www.crosswire.org:/tmp/cvs-serv8471/java/jsword/org/crosswire/jsword/book/install
Modified Files:
InstallManager.java InstallManager.properties
Log Message:
Fixed the Saved sites problem.
Index: InstallManager.properties
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/InstallManager.properties,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** InstallManager.properties 27 Aug 2004 11:41:55 -0000 1.4
--- InstallManager.properties 15 Feb 2005 04:32:34 -0000 1.5
***************
*** 1,3 ****
! #Crosswire-FTP=sword-ftp://ftp.crosswire.org/pub/sword/raw
! Download\ From\ Crosswire=sword-http://www.crosswire.org/ftpmirror/pub/sword
! #Beta=sword-ftp://ftp.sword.cx/pub/sword/betaraw
--- 1,3 ----
! #Crosswire-FTP=sword-ftp\://ftp.crosswire.org/pub/sword/raw
! Download\ From\ Crosswire=sword-http\://www.crosswire.org/ftpmirror/pub/sword
! #Beta=sword-ftp\://ftp.sword.cx/pub/sword/betaraw
Index: InstallManager.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/InstallManager.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** InstallManager.java 16 Aug 2004 22:08:44 -0000 1.13
--- InstallManager.java 15 Feb 2005 04:32:34 -0000 1.14
***************
*** 2,5 ****
--- 2,7 ----
import java.io.IOException;
+ import java.io.OutputStream;
+ import java.net.URL;
import java.util.Collections;
import java.util.HashMap;
***************
*** 12,17 ****
--- 14,21 ----
import org.crosswire.common.util.EventListenerList;
import org.crosswire.common.util.Logger;
+ import org.crosswire.common.util.NetUtil;
import org.crosswire.common.util.Reporter;
import org.crosswire.common.util.ResourceUtil;
+ import org.crosswire.jsword.util.Project;
/**
***************
*** 87,95 ****
/**
! *
*/
public void save()
{
! // PENDING(joe): write
}
--- 91,116 ----
/**
! * Save all properties to the user's local area.
! * Uses the same property name so as to override it.
*/
public void save()
{
! Properties props = new Properties();
! for (Iterator it = installers.keySet().iterator(); it.hasNext(); )
! {
! String name = (String) it.next();
! Installer installer = (Installer) installers.get(name);
! props.setProperty(name, installer.getURL());
! }
! URL outputURL = Project.instance().getWritablePropertiesURL(getClass().getName()); //$NON-NLS-1$
! try
! {
! OutputStream out = NetUtil.getOutputStream(outputURL);
! props.store(out, "Saved Installer Sites"); //$NON-NLS-1$
! }
! catch (IOException e)
! {
! log.error("Failed to save installers", e); //$NON-NLS-1$
! }
}
More information about the jsword-svn
mailing list