Fix appearing HTML tags in some warning messages.

cusax-fix
Yana Stamcheva 18 years ago
parent 1b02b189e7
commit 63392e37aa

@ -152,7 +152,8 @@ help=?
hideOffline=Hide
hideOfflineContacts=Hide inactive contacts
hideCallPanel=&Hide call panel
hideMainWindow=Clicking the X window button will not exit the application, but only hide it. If you wish to exit the application choose File/Quit.
hideMainWindow=<DIV>Clicking the X window button will not exit the application, \
but only <BR> hide it. If you wish to exit the application choose File/Quit.</DIV>
history=&History
historyContact=History - {0}
hour=Hour
@ -241,6 +242,7 @@ remove=&Remove
removeAccount=&Remove account
removeAccountMessage=Are you sure you want to remove this account?
removeContact=&Remove subcontact
removeContactText=<DIV>Are you sure you want to remove <B> {0} </B><BR>from your contact list?</DIV>
removeGroup=&Remove group
rename=&Rename
renameContact=Re&name contact

@ -40,7 +40,7 @@ public class MessageDialog
private JLabel iconLabel = new JLabel(new ImageIcon(ImageLoader
.getImage(ImageLoader.WARNING_ICON)));
private JTextArea messageArea = new JTextArea();
private StyledHTMLEditorPane messageArea = new StyledHTMLEditorPane();
private JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
@ -80,8 +80,9 @@ public MessageDialog(Frame owner)
this.getContentPane().setLayout(new BorderLayout(5, 5));
this.messageArea.setLineWrap(true);
this.messageArea.setWrapStyleWord(true);
this.messageArea.setOpaque(false);
this.messageArea.setEditable(false);
this.messageArea.setContentType("text/html");
this.messagePanel.setBorder(
BorderFactory.createEmptyBorder(10, 10, 0, 10));

@ -685,7 +685,7 @@ public void windowClosing(WindowEvent e)
{
public void run()
{
if(!ConfigurationManager.isApplicationVisibleSaved())
if(ConfigurationManager.isQuitWarningShown())
{
MessageDialog dialog
= new MessageDialog(
@ -700,7 +700,7 @@ public void run()
if (returnCode == MessageDialog.OK_DONT_ASK_CODE)
{
ConfigurationManager
.setApplicationVisibleSaved(true);
.setQuitWarningShown(false);
}
}
}

@ -589,10 +589,10 @@ public void run()
{
try
{
if(Constants.REMOVE_CONTACT_ASK) {
String message = "<HTML>Are you sure you want to remove <B>"
+ contact.getDisplayName()
+ "</B><BR>from your contact list?</html>";
if(Constants.REMOVE_CONTACT_ASK)
{
String message = Messages.getI18NString("removeContactText",
new String[]{contact.getDisplayName()}).getText();
MessageDialog dialog = new MessageDialog(
mainFrame,
@ -633,11 +633,11 @@ else if (returnCode == MessageDialog.OK_DONT_ASK_CODE) {
private class RemoveAllContactsThread extends Thread
{
public void run() {
if(Constants.REMOVE_CONTACT_ASK) {
if(Constants.REMOVE_CONTACT_ASK)
{
String message
= "<HTML>Are you sure you want to remove <B>"
+ allContactsString.getText()
+ "</B><BR>from your contact list?</html>";
= Messages.getI18NString("removeContactText",
new String[]{contactItem.getDisplayName()}).getText();
MessageDialog dialog
= new MessageDialog(mainFrame,

@ -155,7 +155,7 @@ public void actionPerformed(ActionEvent e) {
if(itemName.equals("removeGroup"))
{
if(group != null)
new RemoveGroupThread(group).start();
new RemoveGroupThread(group).start();
}
else if(itemName.equals("renameGroup"))
{
@ -208,9 +208,8 @@ public void run()
try
{
if(Constants.REMOVE_CONTACT_ASK) {
String message = "<HTML>Are you sure you want to remove <B>"
+ this.group.getGroupName()
+ "</B><BR>from your contact list?</html>";
String message = Messages.getI18NString("removeContactText",
new String[]{group.getGroupName()}).getText();
MessageDialog dialog = new MessageDialog(
mainFrame,

@ -31,7 +31,7 @@ public class ConfigurationManager
private static boolean isApplicationVisible = true;
private static boolean isApplicationVisibleSaved = false;
private static boolean isQuitWarningShown = true;
private static boolean isSendTypingNotifications = true;
@ -84,14 +84,14 @@ public static void loadGuiConfigurations()
isApplicationVisible = new Boolean(isVisible).booleanValue();
}
// Load the "showApplicationSaved" property.
String isVisibleSaved = configService.getString(
"net.java.sip.communicator.impl.systray.showApplicationSaved");
// Load the "showAppQuitWarning" property.
String quitWarningShown = configService.getString(
"net.java.sip.communicator.impl.gui.quitWarningShown");
if(isVisible != null && isVisible != "")
if(quitWarningShown != null && quitWarningShown != "")
{
isApplicationVisibleSaved
= new Boolean(isVisibleSaved).booleanValue();
isQuitWarningShown
= new Boolean(quitWarningShown).booleanValue();
}
// Load the "sendTypingNotifications" property.
@ -154,15 +154,16 @@ public static boolean isApplicationVisible()
}
/**
* Return TRUE if "showApplicationSaved" property is true, otherwise -
* return FALSE. Indicates to the user interface whether the main
* application window should shown or hidden on startup.
* @return TRUE if "showApplicationSaved" property is true, otherwise -
* return FALSE.
* Return TRUE if "quitWarningShown" property is true, otherwise -
* return FALSE. Indicates to the user interface whether the quit warning
* dialog should be shown when user clicks on the X button.
* @return TRUE if "quitWarningShown" property is true, otherwise -
* return FALSE. Indicates to the user interface whether the quit warning
* dialog should be shown when user clicks on the X button.
*/
public static boolean isApplicationVisibleSaved()
public static boolean isQuitWarningShown()
{
return isApplicationVisibleSaved;
return isQuitWarningShown;
}
/**
@ -257,19 +258,20 @@ public static void setApplicationVisible(boolean isVisible)
}
/**
* Updates the "showApplicationSaved" property through the
* Updates the "showAppQuitWarning" property through the
* <tt>ConfigurationService</tt>.
*
* @param isSaved <code>true</code> to indicate that the
* application visible property is saved, <code>false</code> otherwise.
* @param isWarningShown indicates if the message warning the user that the
* application would not be closed if she clicks the X button would be
* shown again.
*/
public static void setApplicationVisibleSaved(boolean isSaved)
public static void setQuitWarningShown(boolean isWarningShown)
{
isApplicationVisibleSaved = isSaved;
isQuitWarningShown = isWarningShown;
configService.setProperty(
"net.java.sip.communicator.impl.systray.showApplicationSaved",
new Boolean(isSaved));
"net.java.sip.communicator.impl.gui.quitWarningShown",
new Boolean(isQuitWarningShown));
}
/**

Loading…
Cancel
Save