Fixing small itches with quoting and signatures

This commit is contained in:
edwin%woudt.nl 1999-02-20 22:19:32 +00:00
Родитель 269d3b81ef
Коммит 8f6d11ad90
1 изменённых файлов: 10 добавлений и 7 удалений

Просмотреть файл

@ -524,7 +524,7 @@ public class CompositionPanel extends GeneralPanel {
} catch (MessagingException e) {
author = "???"; // I18N? ###
}
String tmp = "\n" + author + " wrote:"; // I18N ###
String tmp = author + " wrote:\n"; // I18N ###
try {
doc.insertString(position, tmp, null);
position += tmp.length();
@ -557,10 +557,12 @@ public class CompositionPanel extends GeneralPanel {
}
while (linebuffer.pullLine(line)) {
try {
doc.insertString(position, "\n> ", null);
position += 3;
doc.insertString(position, "> ", null);
position += 2;
doc.insertString(position, line.toString(), null);
position += line.length();
doc.insertString(position, "\n", null);
position += 1;
} catch (BadLocationException e) {
}
}
@ -588,15 +590,14 @@ public class CompositionPanel extends GeneralPanel {
String sigFileName = prefs.getString("mail.identity-" + ident + ".signature", "");
Document doc = mEditor.getDocument();
//int position = mEditor.getCaretPosition();
int oldPosition = mEditor.getCaretPosition();
int position = doc.getEndPosition().getOffset() - 1;
try {
BufferedReader sigReader = new BufferedReader(new FileReader(sigFileName));
String s = "-- ";
String s = "\n-- ";
while (s != null) {
System.out.println(s);
s = s + "\n";
doc.insertString(position, s, null);
position += s.length();
@ -609,7 +610,9 @@ public class CompositionPanel extends GeneralPanel {
} catch (BadLocationException ble) {
ble.printStackTrace();
}
mEditor.setCaretPosition(oldPosition);
}
}