mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 03:02:22 -05:00
Improve message download progress logging, switch icon every 100KB
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1714 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
ff82af8c5e
commit
c85225384b
@ -2579,8 +2579,8 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
public int read(byte[] buffer, int offset, int length) throws IOException {
|
||||
int count = super.read(buffer, offset, length);
|
||||
totalCount += count;
|
||||
if (totalCount - lastLogCount > 1024 * 1024) {
|
||||
LOGGER.debug("Downloaded " + (totalCount / 1024) + " KBytes from " + method.getURI());
|
||||
if (totalCount - lastLogCount > 1024 * 128) {
|
||||
DavGatewayTray.debug(new BundleMessage("LOG_DOWNLOAD_PROGRESS", String.valueOf(totalCount / 1024), method.getURI()));
|
||||
DavGatewayTray.switchIcon();
|
||||
lastLogCount = totalCount;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
package davmail.exchange.ews;
|
||||
|
||||
import davmail.BundleMessage;
|
||||
import davmail.exchange.XMLStreamUtil;
|
||||
import davmail.http.DavGatewayHttpClientFacade;
|
||||
import davmail.ui.tray.DavGatewayTray;
|
||||
@ -1019,8 +1020,8 @@ public abstract class EWSMethod extends PostMethod {
|
||||
buffer[17] = '1';
|
||||
}
|
||||
totalCount += count;
|
||||
if (totalCount - lastLogCount > 1024 * 1024) {
|
||||
LOGGER.debug("Downloaded " + (totalCount / 1024) + " KBytes");
|
||||
if (totalCount - lastLogCount > 1024 * 128) {
|
||||
DavGatewayTray.debug(new BundleMessage("LOG_DOWNLOAD_PROGRESS", String.valueOf(totalCount / 1024), EWSMethod.this.getURI()));
|
||||
DavGatewayTray.switchIcon();
|
||||
lastLogCount = totalCount;
|
||||
}
|
||||
|
@ -132,6 +132,7 @@ LOG_UNABLE_TO_STORE_SETTINGS=Unable to store settings:
|
||||
LOG_UNSUPPORTED_REQUEST=Unsupported request: {0}
|
||||
LOG_INVALID_TIMEZONE=Invalid timezone: {0}
|
||||
LOG_ACCESS_FORBIDDEN=Access to {0} forbidden: {1}
|
||||
LOG_DOWNLOAD_PROGRESS=Downloaded {0} KBytes from {1}
|
||||
UI_ABOUT=About...
|
||||
UI_ABOUT_DAVMAIL=About DavMail Gateway
|
||||
UI_ABOUT_DAVMAIL_AUTHOR=<html><b>DavMail Gateway</b><br>By Mickaël Guessant<br><br>
|
||||
@ -276,4 +277,5 @@ UI_CALDAV_EDIT_NOTIFICATIONS_HELP=Enable interactive Caldav edit notification wi
|
||||
LOG_SEARCH_RESULT=Found {0} item(s)
|
||||
UI_LOG_FILE_SIZE=Log file size:
|
||||
UI_SAVE_IN_SENT=SMTP save in sent:
|
||||
UI_SAVE_IN_SENT_HELP=Save messages sent over SMTP in server Sent folder
|
||||
UI_SAVE_IN_SENT_HELP=Save messages sent over SMTP in server Sent folder
|
||||
UI_CERTIFICATE_ALIAS_PROMPT=Select a certificate
|
@ -122,6 +122,7 @@ LOG_UNABLE_TO_SET_LOOK_AND_FEEL=Impossible de d
|
||||
LOG_UNABLE_TO_SET_SYSTEM_LOOK_AND_FEEL=Impossible de définir le style natif sur l''interface
|
||||
LOG_UNABLE_TO_STORE_SETTINGS=Impossible d''enregistrer la configuration
|
||||
LOG_UNSUPPORTED_REQUEST=Requête non supportée : {0}
|
||||
LOG_DOWNLOAD_PROGRESS={0} KOctets téléchargés de {1}
|
||||
UI_ABOUT=A propos...
|
||||
UI_ABOUT_DAVMAIL=A propos de la Passerelle DavMail
|
||||
UI_ABOUT_DAVMAIL_AUTHOR=<html><b>Passerelle DavMail</b><br>Par Mickaël Guessant<br><br>
|
||||
@ -276,3 +277,4 @@ UI_CALDAV_EDIT_NOTIFICATIONS_HELP=Activer le fen
|
||||
LOG_SEARCH_RESULT={0} élément(s) trouvé(s)
|
||||
UI_SAVE_IN_SENT=SMTP copie dans Envoyés :
|
||||
UI_SAVE_IN_SENT_HELP=Créer une copie des messages envoyés via SMTP dans le dossier serveur "Envoyés"
|
||||
UI_CERTIFICATE_ALIAS_PROMPT=Choisir un certificat
|
Loading…
Reference in New Issue
Block a user