r713 - in trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing: actions content/reply
Author: kmorin Date: 2014-12-02 18:39:34 +0000 (Tue, 02 Dec 2014) New Revision: 713 Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/713 Log: fixes #6233 Pas d'?\195?\169metteur lors d'une r?\195?\169ponse ?\195?\160 un fax Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveAndOpenReplyFormAction.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveAndOpenReplyFormAction.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveAndOpenReplyFormAction.java 2014-12-02 11:01:52 UTC (rev 712) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveAndOpenReplyFormAction.java 2014-12-02 18:39:34 UTC (rev 713) @@ -68,8 +68,8 @@ String sender = JAXXUtil.getStringValue(currentDemand.getSender()); if (currentDemand.isFax()) { - MailFolder selectedFolder = getContext().getCurrentMailFolder(); - sender = FaxToMailServiceUtils.addFaxDomainToFaxNumber(sender, selectedFolder); +// MailFolder selectedFolder = getContext().getCurrentMailFolder(); + sender = FaxToMailServiceUtils.addFaxDomainToFaxNumber(sender, currentDemand.getMailFolder()); } model.setTo(sender); } Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java 2014-12-02 11:01:52 UTC (rev 712) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java 2014-12-02 18:39:34 UTC (rev 713) @@ -121,8 +121,6 @@ } } - model.setFrom(demand.getRecipient()); - model.setSubject(t("faxtomail.reply.subject", demand.getSubject())); String plainContent = JAXXUtil.getStringValue(demand.getPlainContent()); @@ -132,6 +130,7 @@ plainContent.replaceAll("\n", "\n> ")); model.setMessage(quotedReply); + String recipient = demand.getRecipient(); // this have to be disable for read only mode (useless) if (!model.isReadonly()) { @@ -152,8 +151,11 @@ model.setSenderAllowedDomains(folderReplyDomains); List<String> replyToAddresses = Lists.newArrayList(); - if (demand.getRecipient() != null) { - replyToAddresses.add(demand.getRecipient()); + String selectedItem = null; + if (!demand.isFax() && recipient != null) { + replyToAddresses.add(recipient); + model.setFrom(recipient); + selectedItem = recipient; } if (folderReplyAdresses != null) { replyToAddresses.addAll(folderReplyAdresses); @@ -161,9 +163,12 @@ Collections.sort(replyToAddresses); DefaultComboBoxModel comboBoxModel = SwingUtil.newComboModel(replyToAddresses.toArray()); - comboBoxModel.setSelectedItem(demand.getRecipient()); + comboBoxModel.setSelectedItem(selectedItem); ui.getFromComboBox().setModel(comboBoxModel); model.setSenderAllowedAddresses(replyToAddresses); + + } else { + model.setFrom(recipient); } } });
participants (1)
-
kmorin@users.forge.codelutin.com