Author: jflesch
Date: 2007-04-22 20:29:55 +0000 (Sun, 22 Apr 2007)
New Revision: 12874
Modified:
trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties
trunk/apps/Thaw/src/thaw/i18n/thaw.properties
trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties
trunk/apps/Thaw/src/thaw/plugins/index/Comment.java
trunk/apps/Thaw/src/thaw/plugins/index/IndexTree.java
trunk/apps/Thaw/src/thaw/plugins/signatures/Identity.java
Log:
Improving a little bit the comment display
Modified: trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties
===================================================================
--- trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties 2007-04-22
19:47:03 UTC (rev 12873)
+++ trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties 2007-04-22
20:29:55 UTC (rev 12874)
@@ -384,6 +384,19 @@
thaw.plugin.signature.yourIdentities=G?rer vos identit?s
thaw.plugin.signature.otherIdentities=G?rer les autres identit?s
+thaw.plugin.signature.dialogTitle.yourIdentities=Vos identit?s
+thaw.plugin.signature.dialogTitle.otherIdentities=Identit?s
+
+thaw.plugin.signature.nickname=Pseudo
+thaw.plugin.signature.trustLevel=Status
+
+thaw.plugin.signature.addIdentity=Generer une nouvelle identit?
+thaw.plugin.signature.removeIdentity=Supprimer l'identit? s?lectionn?e
+
+thaw.plugin.signature.enterNick=Entrez un pseudo :
+
+thaw.plugin.signature.trustLevel.trustLevel=Status
+
thaw.plugin.signature.trustLevel.dev=ARCHITECTE DE LA MATRICE
thaw.plugin.signature.trustLevel.good=BON
thaw.plugin.signature.trustLevel.observe=EN OBSERVATION
Modified: trunk/apps/Thaw/src/thaw/i18n/thaw.properties
===================================================================
--- trunk/apps/Thaw/src/thaw/i18n/thaw.properties 2007-04-22 19:47:03 UTC
(rev 12873)
+++ trunk/apps/Thaw/src/thaw/i18n/thaw.properties 2007-04-22 20:29:55 UTC
(rev 12874)
@@ -394,13 +394,14 @@
thaw.plugin.signature.dialogTitle.otherIdentities=Identities
thaw.plugin.signature.nickname=Nickname
-thaw.plugin.signature.trustLevel=Trust level
+thaw.plugin.signature.trustLevel=Status
thaw.plugin.signature.addIdentity=Generate a new identity
thaw.plugin.signature.removeIdentity=Delete the selected identity
thaw.plugin.signature.enterNick=Enter a nickname :
+thaw.plugin.signature.trustLevel.trustLevel=Status
thaw.plugin.signature.trustLevel.dev=MATRIX ARCHITECT
thaw.plugin.signature.trustLevel.good=GOOD
thaw.plugin.signature.trustLevel.observe=OBSERVE
Modified: trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties
===================================================================
--- trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties 2007-04-22 19:47:03 UTC
(rev 12873)
+++ trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties 2007-04-22 20:29:55 UTC
(rev 12874)
@@ -384,6 +384,19 @@
thaw.plugin.signature.yourIdentities=G\u00e9rer vos identit\u00e9s
thaw.plugin.signature.otherIdentities=G\u00e9rer les autres identit\u00e9s
+thaw.plugin.signature.dialogTitle.yourIdentities=Vos identit\u00e9s
+thaw.plugin.signature.dialogTitle.otherIdentities=Identit\u00e9s
+
+thaw.plugin.signature.nickname=Pseudo
+thaw.plugin.signature.trustLevel=Status
+
+thaw.plugin.signature.addIdentity=Generer une nouvelle identit\u00e9
+thaw.plugin.signature.removeIdentity=Supprimer l'identit\u00e9
s\u00e9lectionn\u00e9e
+
+thaw.plugin.signature.enterNick=Entrez un pseudo :
+
+thaw.plugin.signature.trustLevel.trustLevel=Status
+
thaw.plugin.signature.trustLevel.dev=ARCHITECTE DE LA MATRICE
thaw.plugin.signature.trustLevel.good=BON
thaw.plugin.signature.trustLevel.observe=EN OBSERVATION
Modified: trunk/apps/Thaw/src/thaw/plugins/index/Comment.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/index/Comment.java 2007-04-22 19:47:03 UTC
(rev 12873)
+++ trunk/apps/Thaw/src/thaw/plugins/index/Comment.java 2007-04-22 20:29:55 UTC
(rev 12874)
@@ -14,11 +14,13 @@
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JTextArea;
+import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.BorderFactory;
import javax.swing.JScrollPane;
import java.awt.GridLayout;
+import java.awt.BorderLayout;
/* DOM */
@@ -129,17 +131,38 @@
public JPanel getPanel() {
- JPanel panel = new JPanel(new GridLayout(1, 1));
+ JPanel panel = new JPanel(new BorderLayout(10, 10));
JTextArea text = new JTextArea(comment.trim());
-
panel.setBorder(BorderFactory.createTitledBorder(I18n.getMessage("thaw.plugin.index.comment.author")+"
: "+author.toString()));
+
panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
+ "---
"+author.toString()+" ---",
+
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+
javax.swing.border.TitledBorder.DEFAULT_POSITION,
+ new
java.awt.Font("Dialog", java.awt.Font.BOLD, 14) ));
+ JLabel sigLabel = new
JLabel(I18n.getMessage("thaw.plugin.signature.trustLevel.trustLevel")+ " : ");
+ JTextField sigLevel = new
JTextField(I18n.getMessage(author.getTrustLevelStr()));
+
+ sigLevel.setDisabledTextColor(author.getTrustLevelColor());
+ sigLevel.setEditable(false);
+ sigLevel.setBackground(panel.getBackground());
+
+
+ JPanel sigPanel = new JPanel(new BorderLayout());
+ sigPanel.add(sigLabel, BorderLayout.WEST);
+ sigPanel.add(sigLevel, BorderLayout.CENTER);
+
+ JPanel bottomPanel = new JPanel(new BorderLayout());
+ bottomPanel.add(sigPanel, BorderLayout.WEST);
+ bottomPanel.add(new JLabel(""), BorderLayout.CENTER);
+
+
text.setEditable(false);
text.setBackground(panel.getBackground());
- //panel.setPreferredSize(new java.awt.Dimension(600, 150));
- panel.add(text);
+ panel.add(text, BorderLayout.CENTER);
+ panel.add(bottomPanel, BorderLayout.SOUTH);
return panel;
}
@@ -154,6 +177,7 @@
try {
outputFile = java.io.File.createTempFile("thaw-",
"-comment.xml");
+ outputFile.deleteOnExit();
} catch(java.io.IOException e) {
Logger.error(new Comment(), "Unable to write comment in
a temporary file because: "+e.toString());
return null;
Modified: trunk/apps/Thaw/src/thaw/plugins/index/IndexTree.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/index/IndexTree.java 2007-04-22
19:47:03 UTC (rev 12873)
+++ trunk/apps/Thaw/src/thaw/plugins/index/IndexTree.java 2007-04-22
20:29:55 UTC (rev 12874)
@@ -738,7 +738,7 @@
boolean hasChanged =
((IndexTreeNode)o).hasChanged();
boolean newComment =
((IndexTreeNode)o).hasNewComment();
- int style = 0;
+ int style = Font.PLAIN;
if (modifiable)
style |= Font.ITALIC;
Modified: trunk/apps/Thaw/src/thaw/plugins/signatures/Identity.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/signatures/Identity.java 2007-04-22
19:47:03 UTC (rev 12873)
+++ trunk/apps/Thaw/src/thaw/plugins/signatures/Identity.java 2007-04-22
20:29:55 UTC (rev 12874)
@@ -107,7 +107,36 @@
return y;
}
+ public String getTrustLevelStr() {
+ int i;
+ for (i = 0 ; i < trustLevelInt.length ; i++) {
+ if (trustLevelInt[i] == trustLevel)
+ break;
+ }
+
+ if (i < trustLevelInt.length)
+ return trustLevelStr[i];
+
+ return "[?]";
+ }
+
+
+ public Color getTrustLevelColor() {
+ int i;
+
+ for (i = 0 ; i < trustLevelInt.length ; i++) {
+ if (trustLevelInt[i] == trustLevel)
+ break;
+ }
+
+ if (i < trustLevelInt.length)
+ return trustLevelColor[i];
+
+ return Color.BLACK;
+ }
+
+
/**
* if the identity doesn't exists, it will be created
*/