[jsword-svn]
bibledesktop/java/main/org/crosswire/bibledesktop/book s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Tue Sep 28 15:25:08 MST 2004
Update of /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book
In directory www.crosswire.org:/tmp/cvs-serv14651/java/main/org/crosswire/bibledesktop/book
Modified Files:
Msg.properties Msg.java SitePane.java
Log Message:
User confirmation of download
Index: Msg.properties
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/Msg.properties,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Msg.properties 8 Sep 2004 19:57:58 -0000 1.4
--- Msg.properties 28 Sep 2004 22:25:06 -0000 1.5
***************
*** 28,31 ****
--- 28,35 ----
SitesPane.Local=Installed Books
+ SitePane.Size={0} is {1,number,###,###,###.#}KB. Continue?
+ SitePane.ConfirmationTitle=Download Book
+ SitePane.Installed=Book already installed: {0}
+
EditSitePane.EditSitesTitle=Edit Update Sites
EditSitePane.MissingSite=Missing site name
Index: SitePane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/SitePane.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** SitePane.java 21 Sep 2004 17:46:47 -0000 1.9
--- SitePane.java 28 Sep 2004 22:25:06 -0000 1.10
***************
*** 7,10 ****
--- 7,11 ----
import javax.swing.JButton;
import javax.swing.JLabel;
+ import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
***************
*** 21,24 ****
--- 22,26 ----
import org.crosswire.common.swing.MapTable;
import org.crosswire.common.swing.MapTableModel;
+ import org.crosswire.common.util.NetUtil;
import org.crosswire.common.util.Reporter;
import org.crosswire.jsword.book.BookList;
***************
*** 236,240 ****
try
{
! installer.install(name);
}
catch (InstallException ex)
--- 238,256 ----
try
{
! // Is the book already installed? Then nothing to do.
! if (Books.installed().getBookMetaData(name.getName()) != null)
! {
! Reporter.informUser(this, Msg.INSTALLED, name.getName());
! return;
! }
!
! float size = NetUtil.getSize(installer.toURL(name)) / 1024;
! if (JOptionPane.showConfirmDialog(this, Msg.SIZE.toString(new Object[] {name.getName(), new Float(size)}),
! Msg.CONFIRMATION_TITLE.toString(),
! JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
! {
! installer.install(name);
! }
!
}
catch (InstallException ex)
Index: Msg.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/Msg.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Msg.java 8 Sep 2004 19:57:58 -0000 1.6
--- Msg.java 28 Sep 2004 22:25:06 -0000 1.7
***************
*** 52,55 ****
--- 52,59 ----
static final Msg LOCAL_BOOKS = new Msg("SitesPane.Local"); //$NON-NLS-1$
+ static final Msg SIZE = new Msg("SitePane.Size"); //$NON-NLS-1$
+ static final Msg CONFIRMATION_TITLE = new Msg("SitePane.ConfirmationTitle"); //$NON-NLS-1$
+ static final Msg INSTALLED = new Msg("SitePane.Installed"); //$NON-NLS-1$
+
static final Msg EDIT_SITE_TITLE = new Msg("EditSitePane.EditSitesTitle"); //$NON-NLS-1$
static final Msg MISSING_SITE = new Msg("EditSitePane.MissingSite"); //$NON-NLS-1$
More information about the jsword-svn
mailing list