This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit 02592e8a5570a2c8e9f8bc1d96f82498aeb7a373 Author: jcouteau <couteau@codelutin.com> Date: Wed Sep 2 17:50:31 2020 +0200 fixes #10747 : Really opens readonly when we say it opens as readonly --- .../franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java index f180a298..9917ae63 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java @@ -63,6 +63,8 @@ public class ShowDemandeAction extends AbstractMainUIFaxToMailAction { // if true, take the email when opening protected boolean takeEmail; + protected boolean readonly = false; + protected JFrame frame; public ShowDemandeAction(MainUIHandler handler) { @@ -150,6 +152,7 @@ public class ShowDemandeAction extends AbstractMainUIFaxToMailAction { result = mailFolder != null && BooleanUtils.isTrue(mailFolder.getLockedDemandsOpenableInReadOnly()); if (result) { log.info("Opening demand as readonly"); + readonly = true; } else { String htmlMessage = t("faxtomail.alert.alreadyLockedBy.message", decorate(ex.getLockedBy())); JOptionPane.showMessageDialog(getHandler().getTopestUI(), @@ -188,11 +191,11 @@ public class ShowDemandeAction extends AbstractMainUIFaxToMailAction { MailFolder currentFolder = currentEmail.getMailFolder(); MailFolder actualFolder = email.getMailFolder(); if (currentFolder != null && !currentFolder.equals(actualFolder)) { - displayWarningMessage(t("faxtomail.alert.emailMoved.title"), + EventQueue.invokeLater(() -> displayWarningMessage(t("faxtomail.alert.emailMoved.title"), t("faxtomail.alert.emailMoved.message", currentFolder.getName(), actualFolder.getName(), - currentEmail.getTitle())); + currentEmail.getTitle()))); } currentEmail.fromEntity(email, true); @@ -207,6 +210,7 @@ public class ShowDemandeAction extends AbstractMainUIFaxToMailAction { List<Client> allowedClients = getContext().getClientCache(); currentEmail.setAllowedClients(allowedClients); + currentEmail.setEditable(!readonly); } } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.