Author: lemovice
Date: Sun Sep 15 00:16:46 2013
New Revision: 4550
Log:
Add a save log files button
Modified:
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle.properties
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_es.properties
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_fr.properties
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_it.properties
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_pl.properties
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/FeedbackPanel.form
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/FeedbackPanel.java
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/SendAction.java
Modified:
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle.properties
==============================================================================
---
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle.properties
(original)
+++
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle.properties
Sun Sep 15 00:16:46 2013
@@ -47,7 +47,6 @@
FeedbackPanel.jtEmail.text=
FeedbackPanel.jtSubject.text=
FeedbackPanel.jtName.text=
-FeedbackPanel.jcbIncGenjLog.text=
SEND_BUTTON=Send
FeedbackPanel.jLabel6.text=Send the configuration data ({0} bytes):
FeedbackPanel.title=Feedback - Contact Ancestris Team
@@ -68,3 +67,7 @@
FeedBackOptionPanel.SSLEncryptioncheckBox.text=SSL
SendMailWorker.Sending-In-Progress= Sending
FeedBackPasswordPanel.title=Your mail server Password
+FeedbackPanel.saveButton.text=Save configuration data ...
+FeedbackPanel.Overwrite.Title=Existing file
+FeedbackPanel.Overwrite.Text=This file exists, overwrite it?
+FeedbackPanel.fileType=zip Files
Modified:
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_es.properties
==============================================================================
---
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_es.properties
(original)
+++
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_es.properties
Sun Sep 15 00:16:46 2013
@@ -47,7 +47,6 @@
FeedbackPanel.jtEmail.text=
FeedbackPanel.jtSubject.text=
FeedbackPanel.jtName.text=
-FeedbackPanel.jcbIncGenjLog.text=
SEND_BUTTON=Enviar
FeedbackPanel.jLabel6.text=Enviar los datos de configuraci\u00f3n ({0} bytes):
FeedbackPanel.title=Feedback - P\u00f3ngase en contacto con el equipo Ancestris
Modified:
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_fr.properties
==============================================================================
---
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_fr.properties
(original)
+++
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_fr.properties
Sun Sep 15 00:16:46 2013
@@ -47,7 +47,6 @@
FeedbackPanel.jtEmail.text=
FeedbackPanel.jtSubject.text=
FeedbackPanel.jtName.text=
-FeedbackPanel.jcbIncGenjLog.text=
SEND_BUTTON=Envoyer
FeedbackPanel.jLabel6.text=Envoyer les donn\u00e9es de configuration ({0}
octets):
FeedbackPanel.title=Feedback - Contacter l'\u00e9quipe d'Ancestris
Modified:
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_it.properties
==============================================================================
---
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_it.properties
(original)
+++
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_it.properties
Sun Sep 15 00:16:46 2013
@@ -47,7 +47,6 @@
FeedbackPanel.jtEmail.text=
FeedbackPanel.jtSubject.text=
FeedbackPanel.jtName.text=
-FeedbackPanel.jcbIncGenjLog.text=
SEND_BUTTON=Invia
FeedbackPanel.jLabel6.text=inviare i dati di configurazione ({0} Bytes):
FeedbackPanel.title=Feedback - Contattare l'\u00e9quipe Ancestris
Modified:
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_pl.properties
==============================================================================
---
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_pl.properties
(original)
+++
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/Bundle_pl.properties
Sun Sep 15 00:16:46 2013
@@ -49,7 +49,6 @@
FeedbackPanel.jtEmail.text=
FeedbackPanel.jtSubject.text=
FeedbackPanel.jtName.text=
-FeedbackPanel.jcbIncGenjLog.text=
FeedBackOptionPanel.jLabel2.text=
FeedBackOptionPanel.noEncryptioncheckBox.text=
FeedBackOptionPanel.SSLEncryptioncheckBox.text=
Modified:
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/FeedbackPanel.form
==============================================================================
---
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/FeedbackPanel.form
(original)
+++
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/FeedbackPanel.form
Sun Sep 15 00:16:46 2013
@@ -1,4 +1,4 @@
-<?xml version="1.1" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.4" maxVersion="1.7"
type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<Properties>
@@ -25,9 +25,9 @@
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
- <Component id="jLabel6" min="-2" max="-2"
attributes="0"/>
- <EmptySpace max="-2" attributes="0"/>
- <Component id="jcbIncGenjLog" min="-2" max="-2"
attributes="0"/>
+ <Component id="sendLogCheckBox" min="-2" max="-2"
attributes="0"/>
+ <EmptySpace max="32767" attributes="0"/>
+ <Component id="saveButton" min="-2" max="-2"
attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
@@ -40,12 +40,12 @@
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
- <Component id="jScrollPane2" pref="500" max="32767"
attributes="2"/>
- <Component id="jtSubject" alignment="0" pref="500"
max="32767" attributes="2"/>
- <Component id="jtEmailTo" alignment="0" pref="500"
max="32767" attributes="2"/>
- <Component id="jtEmail" alignment="0" pref="500"
max="32767" attributes="2"/>
- <Component id="jtName" alignment="1" pref="500"
max="32767" attributes="2"/>
- <Component id="jLabel7" alignment="0" max="32767"
attributes="0"/>
+ <Component id="jScrollPane2" max="32767"
attributes="2"/>
+ <Component id="jtSubject" alignment="0" max="32767"
attributes="2"/>
+ <Component id="jtEmailTo" alignment="0" max="32767"
attributes="2"/>
+ <Component id="jtEmail" alignment="0" max="32767"
attributes="2"/>
+ <Component id="jtName" alignment="1" max="32767"
attributes="2"/>
+ <Component id="jLabel7" alignment="0" pref="488"
max="32767" attributes="0"/>
</Group>
<EmptySpace min="8" pref="8" max="-2" attributes="0"/>
</Group>
@@ -85,14 +85,14 @@
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
- <Component id="jScrollPane2" pref="139" max="32767"
attributes="0"/>
+ <Component id="jScrollPane2" pref="133" max="32767"
attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
- <Component id="jLabel6" alignment="0" min="-2" max="-2"
attributes="0"/>
- <Component id="jcbIncGenjLog" alignment="0" min="-2"
max="-2" attributes="0"/>
+ <Component id="sendLogCheckBox" alignment="0" min="-2"
max="-2" attributes="0"/>
+ <Component id="saveButton" min="-2" max="-2" attributes="0"/>
</Group>
- <EmptySpace min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -133,24 +133,16 @@
</Property>
</Properties>
</Component>
- <Component class="javax.swing.JLabel" name="jLabel6">
- <Properties>
- <Property name="text" type="java.lang.String"
editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString
bundle="ancestris/modules/feedback/Bundle.properties"
key="FeedbackPanel.jLabel6.text"
replaceFormat="java.text.MessageFormat.format(java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}"),
{arguments})">
- <Argument index="0" javacode="fileLength"/>
- </ResourceString>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JCheckBox" name="jcbIncGenjLog">
+ <Component class="javax.swing.JCheckBox" name="sendLogCheckBox">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String"
editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString
bundle="ancestris/modules/feedback/Bundle.properties"
key="FeedbackPanel.jcbIncGenjLog.text"
replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class,
"{key}")"/>
+ <ResourceString
bundle="ancestris/modules/feedback/Bundle.properties"
key="FeedbackPanel.jLabel6.text"
replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class,
"{key}")"/>
</Property>
<Property name="cursor" type="java.awt.Cursor"
editor="org.netbeans.modules.form.editors2.CursorEditor">
- <Color id="Pointeur par défaut"/>
+ <Color id="Curseur par défaut"/>
</Property>
+ <Property name="horizontalTextPosition" type="int" value="2"/>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableModifier"
type="java.lang.Integer" value="0"/>
@@ -256,5 +248,15 @@
</Property>
</Properties>
</Component>
+ <Component class="javax.swing.JButton" name="saveButton">
+ <Properties>
+ <Property name="text" type="java.lang.String"
editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString
bundle="ancestris/modules/feedback/Bundle.properties"
key="FeedbackPanel.saveButton.text"
replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class,
"{key}")"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed"
listener="java.awt.event.ActionListener"
parameters="java.awt.event.ActionEvent" handler="saveButtonActionPerformed"/>
+ </Events>
+ </Component>
</SubComponents>
</Form>
Modified:
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/FeedbackPanel.java
==============================================================================
---
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/FeedbackPanel.java
(original)
+++
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/FeedbackPanel.java
Sun Sep 15 00:16:46 2013
@@ -8,31 +8,47 @@
*
* Created on 15 mars 2010, 23:31:41
*/
-
package ancestris.modules.feedback;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.StandardCopyOption;
+import java.util.prefs.Preferences;
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+import javax.swing.filechooser.FileNameExtensionFilter;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
+import org.openide.util.Exceptions;
+import org.openide.util.NbBundle;
+import org.openide.util.NbPreferences;
/**
*
* @author daniel
*/
public class FeedbackPanel extends javax.swing.JPanel {
- private long fileLength;
+
+ private File zipFile;
private javax.swing.ImageIcon ancestris_logo = new
javax.swing.ImageIcon(getClass().getResource("/ancestris/modules/feedback/ancestris_logo.gif"));
// NOI18N
+ private Preferences modulePreferences =
NbPreferences.forModule(FeedBackPlugin.class);
- /** Creates new form FeedbackPanel */
- public FeedbackPanel(long length) {
- this.fileLength = length;
+ /**
+ * Creates new form FeedbackPanel
+ */
+ public FeedbackPanel(File zipFile) {
+ this.zipFile = zipFile;
initComponents();
}
- /** This method is called from within the constructor to
- * initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is
- * always regenerated by the Form Editor.
+ /**
+ * This method is called from within the constructor to initialize the
form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated
Code">//GEN-BEGIN:initComponents
@@ -43,8 +59,7 @@
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
- jLabel6 = new javax.swing.JLabel();
- jcbIncGenjLog = new javax.swing.JCheckBox();
+ sendLogCheckBox = new javax.swing.JCheckBox();
jtEmailTo = new javax.swing.JFormattedTextField();
jtEmail = new javax.swing.JFormattedTextField();
jtName = new javax.swing.JFormattedTextField();
@@ -62,6 +77,7 @@
}
};
jLabel7 = new javax.swing.JLabel();
+ saveButton = new javax.swing.JButton();
setBackground(getBackground());
@@ -75,11 +91,10 @@
jLabel5.setText(org.openide.util.NbBundle.getMessage(FeedbackPanel.class,
"FeedbackPanel.jLabel5.text")); // NOI18N
-
jLabel6.setText(java.text.MessageFormat.format(java.util.ResourceBundle.getBundle("ancestris/modules/feedback/Bundle").getString("FeedbackPanel.jLabel6.text"),
new Object[] {fileLength})); // NOI18N
-
- jcbIncGenjLog.setSelected(true);
-
jcbIncGenjLog.setText(org.openide.util.NbBundle.getMessage(FeedbackPanel.class,
"FeedbackPanel.jcbIncGenjLog.text")); // NOI18N
- jcbIncGenjLog.setCursor(new
java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
+ sendLogCheckBox.setSelected(true);
+
sendLogCheckBox.setText(org.openide.util.NbBundle.getMessage(FeedbackPanel.class,
"FeedbackPanel.jLabel6.text")); // NOI18N
+ sendLogCheckBox.setCursor(new
java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
+
sendLogCheckBox.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
jtEmail.setText(org.openide.util.NbBundle.getMessage(FeedbackPanel.class,
"FeedbackPanel.jtEmail.text")); // NOI18N
@@ -113,6 +128,13 @@
jLabel7.setText(org.openide.util.NbBundle.getMessage(FeedbackPanel.class,
"FeedbackPanel.jLabel7.text")); // NOI18N
jLabel7.setPreferredSize(new java.awt.Dimension(500, 67));
+
saveButton.setText(org.openide.util.NbBundle.getMessage(FeedbackPanel.class,
"FeedbackPanel.saveButton.text")); // NOI18N
+ saveButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ saveButtonActionPerformed(evt);
+ }
+ });
+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
@@ -121,9 +143,9 @@
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
- .addComponent(jLabel6)
-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jcbIncGenjLog))
+ .addComponent(sendLogCheckBox)
+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(saveButton))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
@@ -134,12 +156,12 @@
.addComponent(jLabel3))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jScrollPane2,
javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
- .addComponent(jtSubject,
javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
- .addComponent(jtEmailTo,
javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
- .addComponent(jtEmail,
javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
- .addComponent(jtName,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
- .addComponent(jLabel7,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
+ .addComponent(jScrollPane2)
+ .addComponent(jtSubject)
+ .addComponent(jtEmailTo)
+ .addComponent(jtEmail)
+ .addComponent(jtName,
javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel7,
javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE))
.addGap(8, 8, 8)))
.addContainerGap())
);
@@ -169,32 +191,78 @@
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
- .addComponent(jScrollPane2,
javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE))
+ .addComponent(jScrollPane2,
javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jLabel6)
- .addComponent(jcbIncGenjLog))
+ .addComponent(sendLogCheckBox)
+ .addComponent(saveButton))
.addContainerGap())
);
}// </editor-fold>//GEN-END:initComponents
+ private void saveButtonActionPerformed(java.awt.event.ActionEvent evt)
{//GEN-FIRST:event_saveButtonActionPerformed
+ final FileNameExtensionFilter filter = new
FileNameExtensionFilter(NbBundle.getMessage(FeedBackPlugin.class,
"FeedbackPanel.fileType"), "zip");
+ JFileChooser fileChooser = new JFileChooser() {
+
+ @Override
+ public void approveSelection() {
+ File f = getSelectedFile();
+ if (f.exists() && getDialogType() == SAVE_DIALOG) {
+ int result = JOptionPane.showConfirmDialog(this,
NbBundle.getMessage(FeedBackPlugin.class, "FeedbackPanel.Overwrite.Text"),
NbBundle.getMessage(FeedBackPlugin.class, "FeedbackPanel.Overwrite.Title"),
JOptionPane.YES_NO_CANCEL_OPTION);
+ switch (result) {
+ case JOptionPane.YES_OPTION:
+ super.approveSelection();
+ return;
+ case JOptionPane.NO_OPTION:
+ return;
+ case JOptionPane.CANCEL_OPTION:
+ super.cancelSelection();
+ return;
+ }
+ } else {
+ if (filter.accept(f) == false) {
+ setSelectedFile(new File(f.getName() + ".gw"));
+ }
+ }
+ super.approveSelection();
+ }
+ };
+ String dirName = modulePreferences.get("current directory", "");
+ if (dirName.length() > 0) {
+ // Set the current directory
+ fileChooser.setCurrentDirectory(new File(dirName));
+ }
+
+ fileChooser.setFileFilter(filter);
+ fileChooser.setAcceptAllFileFilterUsed(false);
+ fileChooser.setSelectedFile(new File(zipFile.getName()));
+
+ if (fileChooser.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) {
+ File copyFile = fileChooser.getSelectedFile();
+ modulePreferences.put("current directory", copyFile.getPath());
+ try {
+ Files.copy(zipFile.toPath(), copyFile.toPath(),
StandardCopyOption.REPLACE_EXISTING);
+ } catch (IOException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ }
+ }//GEN-LAST:event_saveButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
- private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane2;
- javax.swing.JCheckBox jcbIncGenjLog;
javax.swing.JFormattedTextField jtEmail;
javax.swing.JFormattedTextField jtEmailTo;
javax.swing.JFormattedTextField jtName;
javax.swing.JFormattedTextField jtSubject;
javax.swing.JTextArea jtaText;
+ private javax.swing.JButton saveButton;
+ javax.swing.JCheckBox sendLogCheckBox;
// End of variables declaration//GEN-END:variables
-
}
Modified:
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/SendAction.java
==============================================================================
---
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/SendAction.java
(original)
+++
trunk/AncestrisExtensions/feedback/src/ancestris/modules/feedback/SendAction.java
Sun Sep 15 00:16:46 2013
@@ -30,7 +30,7 @@
private final static String TEXTSEPARATOR =
"\n=======================================\n";
private final static String SEND = NbBundle.getMessage(SendAction.class,
"SEND_BUTTON");
private Preferences modulePreferences =
NbPreferences.forModule(FeedBackPlugin.class);
- private File userDir;
+ private File zipFile;
private FeedbackPanel fbPanel;
private void setDefaultValues(FeedbackPanel panel) {
@@ -49,7 +49,7 @@
public void actionPerformed(ActionEvent e) {
try {
- userDir = sendUserDir();
+ zipFile = sendUserDir();
} catch (Exception ex) {
NotifyDescriptor nd = new
NotifyDescriptor.Message(RESOURCES.getString("fb.msg.senderror")
+ "\n(" + ex.getMessage() + ").",
NotifyDescriptor.ERROR_MESSAGE);
@@ -61,7 +61,7 @@
OptionsDisplayer.getDefault().open("Extensions/FeedBack");
} else {
- fbPanel = new FeedbackPanel(userDir.length());
+ fbPanel = new FeedbackPanel(zipFile);
setDefaultValues(fbPanel);
@@ -80,8 +80,8 @@
String subject = "[" + RESOURCES.getString("fb.tag.subject") +
" " + TS + "] ";
subject += fbPanel.jtSubject.getText().trim();
File attachedFile = null;
- if (fbPanel.jcbIncGenjLog.isSelected()) {
- attachedFile = userDir;
+ if (fbPanel.sendLogCheckBox.isSelected()) {
+ attachedFile = zipFile;
}
Thread t = new Thread(new SendMailWorker(name, from, to,
subject, messageBody, attachedFile), "SendFeedback");
t.start();
---------------------------------------------------------------------
Site Web Ancestris : http://www.ancestris.org
<*> Pour vous desinscrire de cette liste, envoyez un mail a :
[email protected]
<*> Pour obtenir de l'aide sur les commandes de la liste :
[email protected]
Pour obtenir tous les messages lies a ce fil de discussion, cliquez sur le
lien ci-dessous, cela ouvrira votre logiciel de messagerie. Il vous suffira
d'envoyer le message :
[email protected]