aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLyubomir Marinov <lyubomir.marinov@jitsi.org>2010-08-20 23:02:23 +0000
committerLyubomir Marinov <lyubomir.marinov@jitsi.org>2010-08-20 23:02:23 +0000
commit52b6b8351382a7adc32349a57d79be2a6a4c2291 (patch)
treebd06aeb41ccf3f6e86c63e4b6366d91e397be25c /src
parenta951b90be66593f7ed63d4f0ab4dc757a1b424ff (diff)
downloadjitsi-52b6b8351382a7adc32349a57d79be2a6a4c2291.zip
jitsi-52b6b8351382a7adc32349a57d79be2a6a4c2291.tar.gz
jitsi-52b6b8351382a7adc32349a57d79be2a6a4c2291.tar.bz2
Commits a patch provided by Dmitri Melnikov on the dev mailing list in the thread "Call Recording" which fixes the display of file paths in the Swing PopupMessageHandler implementation.
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/impl/swingnotification/PopupMessageHandlerSwingImpl.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/net/java/sip/communicator/impl/swingnotification/PopupMessageHandlerSwingImpl.java b/src/net/java/sip/communicator/impl/swingnotification/PopupMessageHandlerSwingImpl.java
index b58be29..a887108 100644
--- a/src/net/java/sip/communicator/impl/swingnotification/PopupMessageHandlerSwingImpl.java
+++ b/src/net/java/sip/communicator/impl/swingnotification/PopupMessageHandlerSwingImpl.java
@@ -107,8 +107,10 @@ public class PopupMessageHandlerSwingImpl
}
/**
- * Builds the popup component with given informations.
- *
+ * Builds the popup component with given informations. Wraps the specified
+ * <tt>message</tt> in HTML &lt;pre&gt; tags to ensure that text such as
+ * full pathnames is displayed correctly after HTML is stripped from it.
+ *
* @param titleString message title
* @param message message content
* @param imageBytes message icon
@@ -131,13 +133,16 @@ public class PopupMessageHandlerSwingImpl
}
JLabel msgTitle = new JLabel(titleString);
+
int msgTitleHeight
= msgTitle.getFontMetrics(msgTitle.getFont()).getHeight();
msgTitle.setPreferredSize(new Dimension(200, msgTitleHeight));
msgTitle.setFont(msgTitle.getFont().deriveFont(Font.BOLD));
- String plainMessage = Html2Text.extractText(message);
+ String plainMessage
+ = Html2Text.extractText("<pre>" + message + "</pre>");
JTextArea msgContent = new JTextArea(plainMessage);
+
msgContent.setLineWrap(true);
msgContent.setWrapStyleWord(true);
msgContent.setOpaque(false);