diff --git a/resources/languages/resources.properties b/resources/languages/resources.properties index dbc5459c1..692035a64 100644 --- a/resources/languages/resources.properties +++ b/resources/languages/resources.properties @@ -274,6 +274,7 @@ service.gui.PROTOCOL=Protocol service.gui.QUIT=&Quit service.gui.READY=Ready service.gui.REASON=Reason +service.gui.RECEIVED=received service.gui.RECONNECTION_LIMIT_EXCEEDED=You have have been disconnecting and reconnecting to the server too fast. The following account: User name: {0}, Server name: {1} is temporarily banned and would have to wait a bit before trying to login again. service.gui.REJECT=&Reject service.gui.REMEMBER_PASSWORD=Remember password diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/FileHistoryConversationComponent.java b/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/FileHistoryConversationComponent.java index 64f85609a..02cb190cf 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/FileHistoryConversationComponent.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/FileHistoryConversationComponent.java @@ -120,4 +120,14 @@ public Date getDate() { return new Date(fileRecord.getDate()); } + + /** + * We don't have progress label in history. + * + * @return empty string + */ + protected String getProgressLabel(String bytesString) + { + return ""; + } } diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/FileTransferConversationComponent.java b/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/FileTransferConversationComponent.java index 130a6377d..895867679 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/FileTransferConversationComponent.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/FileTransferConversationComponent.java @@ -403,10 +403,9 @@ public void progressChanged(FileTransferProgressEvent event) progressBar.setValue((int) event.getProgress()); ByteFormat format = new ByteFormat(); - String bytesSent = format.format( + String bytesString = format.format( event.getFileTransfer().getTransferedBytes()); - progressBar.setString(bytesSent - + " " + resources.getI18NString("service.gui.SENT")); + progressBar.setString(getProgressLabel(bytesString)); } /** @@ -440,4 +439,12 @@ protected String getFileLabel(String fileName, long fileSize) return fileName + " (" + text + ")"; } + + /** + * Returns the label to show on the progress bar. + * + * @param bytesString the bytes that have been transfered + * @return the label to show on the progress bar + */ + protected abstract String getProgressLabel(String bytesString); } diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/ReceiveFileConversationComponent.java b/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/ReceiveFileConversationComponent.java index c5ea0520c..a00cee296 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/ReceiveFileConversationComponent.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/ReceiveFileConversationComponent.java @@ -298,4 +298,16 @@ public void finished() } } } + + /** + * Returns the label to show on the progress bar. + * + * @param bytesString the bytes that have been transfered + * @return the label to show on the progress bar + */ + protected String getProgressLabel(String bytesString) + { + return bytesString + + " " + resources.getI18NString("service.gui.RECEIVED"); + } } diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/SendFileConversationComponent.java b/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/SendFileConversationComponent.java index 282767423..222767fce 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/SendFileConversationComponent.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/filetransfer/SendFileConversationComponent.java @@ -188,4 +188,16 @@ public Date getDate() { return date; } + + /** + * Returns the label to show on the progress bar. + * + * @param bytesString the bytes that have been transfered + * @return the label to show on the progress bar + */ + protected String getProgressLabel(String bytesString) + { + return bytesString + + " " + resources.getI18NString("service.gui.SENT"); + } }