branch feature/9096_print_only_one_content created (now 216e057)
This is an automated email from the git hooks/post-receive script. New change to branch feature/9096_print_only_one_content in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git at 216e057 refs #9096 ne pas imprimer les pj inline par defaut This branch includes the following new commits: new 216e057 refs #9096 ne pas imprimer les pj inline par defaut The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 216e057837ff7f2a239c36d3c25a4121f4aa6eb6 Author: Kevin Morin <morin@codelutin.com> Date: Thu Mar 30 15:59:27 2017 +0200 refs #9096 ne pas imprimer les pj inline par defaut -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/9096_print_only_one_content in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit 216e057837ff7f2a239c36d3c25a4121f4aa6eb6 Author: Kevin Morin <morin@codelutin.com> Date: Thu Mar 30 15:59:27 2017 +0200 refs #9096 ne pas imprimer les pj inline par defaut --- .../ui/swing/content/demande/DemandeListUIHandler.java | 18 ++++++++++-------- .../print/AttachmentToPrintChooserUIHandler.java | 9 ++++----- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java index 4c8d5fe..a5ea2b0 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java @@ -873,15 +873,17 @@ public class DemandeListUIHandler extends AbstractFaxToMailDemandListHandler<Dem } else { for (Attachment attachment : attachments) { - // force lazy loading - // TODO kmorin 20140813 action ? - FaxToMailUIUtil.forceAttachmentFileLoading(getContext(), attachment); - - AttachmentFile attachmentFile = attachment.getEditedFile(); - if (attachmentFile == null) { - attachmentFile = attachment.getOriginalFile(); + if (!attachment.isInlineAttachment()) { + // force lazy loading + // TODO kmorin 20140813 action ? + FaxToMailUIUtil.forceAttachmentFileLoading(getContext(), attachment); + + AttachmentFile attachmentFile = attachment.getEditedFile(); + if (attachmentFile == null) { + attachmentFile = attachment.getOriginalFile(); + } + attachmentToPrints.put(demandeUIModel, attachmentFile); } - attachmentToPrints.put(demandeUIModel, attachmentFile); } } } diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java index d31e34f..a4c29fb 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java @@ -89,23 +89,23 @@ public class AttachmentToPrintChooserUIHandler extends AbstractFaxToMailUIHandle if (attachment.getOriginalFile() == null) { FaxToMailUIUtil.forceAttachmentFileLoading(getContext(), attachment); } - createCheckBox(attachment.getOriginalFile()); + createCheckBox(attachment, attachment.getOriginalFile()); final AttachmentFile file = attachment.getEditedFile(); if (file != null) { - createCheckBox(file); + createCheckBox(attachment, file); } } } - protected void createCheckBox(final AttachmentFile attachmentFile) { + protected void createCheckBox(Attachment attachment, final AttachmentFile attachmentFile) { if (attachmentFile == null) { return; } String attachmentName = attachmentFile.getFilename(); boolean printable = FaxToMailUIUtil.isFileTypeEditable(attachmentName); - JCheckBox checkBox = new JCheckBox(attachmentName, printable); + JCheckBox checkBox = new JCheckBox(attachmentName, printable && !attachment.isInlineAttachment()); checkBox.setEnabled(printable); ui.getAttachmentPanel().add(checkBox); @@ -115,7 +115,6 @@ public class AttachmentToPrintChooserUIHandler extends AbstractFaxToMailUIHandle checkBox.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { - log.info("state changed " + e.getStateChange()); if (e.getStateChange() == ItemEvent.SELECTED) { getModel().addAttachmentToPrint(attachmentFile); } else { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm