mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
Fixes from audit
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@556 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
54f07e822b
commit
587c6b44a7
@ -43,7 +43,7 @@ public class AwtGatewayTray implements DavGatewayTrayInterface {
|
|||||||
isActive = true;
|
isActive = true;
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (trayIcon.getImage() == image) {
|
if (trayIcon.getImage().equals(image)) {
|
||||||
trayIcon.setImage(image2);
|
trayIcon.setImage(image2);
|
||||||
} else {
|
} else {
|
||||||
trayIcon.setImage(image);
|
trayIcon.setImage(image);
|
||||||
@ -78,11 +78,11 @@ public class AwtGatewayTray implements DavGatewayTrayInterface {
|
|||||||
public void run() {
|
public void run() {
|
||||||
if (trayIcon != null) {
|
if (trayIcon != null) {
|
||||||
TrayIcon.MessageType messageType = null;
|
TrayIcon.MessageType messageType = null;
|
||||||
if (priority == Priority.INFO) {
|
if (priority.equals(Priority.INFO)) {
|
||||||
messageType = TrayIcon.MessageType.INFO;
|
messageType = TrayIcon.MessageType.INFO;
|
||||||
} else if (priority == Priority.WARN) {
|
} else if (priority.equals(Priority.WARN)) {
|
||||||
messageType = TrayIcon.MessageType.WARNING;
|
messageType = TrayIcon.MessageType.WARNING;
|
||||||
} else if (priority == Priority.ERROR) {
|
} else if (priority.equals(Priority.ERROR)) {
|
||||||
messageType = TrayIcon.MessageType.ERROR;
|
messageType = TrayIcon.MessageType.ERROR;
|
||||||
}
|
}
|
||||||
if (messageType != null) {
|
if (messageType != null) {
|
||||||
|
@ -41,7 +41,7 @@ public class FrameGatewayTray implements DavGatewayTrayInterface {
|
|||||||
isActive = true;
|
isActive = true;
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (mainFrame.getIconImage() == image) {
|
if (mainFrame.getIconImage().equals(image)) {
|
||||||
mainFrame.setIconImage(image2);
|
mainFrame.setIconImage(image2);
|
||||||
} else {
|
} else {
|
||||||
mainFrame.setIconImage(image);
|
mainFrame.setIconImage(image);
|
||||||
@ -75,13 +75,13 @@ public class FrameGatewayTray implements DavGatewayTrayInterface {
|
|||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (mainFrame != null) {
|
if (mainFrame != null) {
|
||||||
if (priority == Priority.INFO) {
|
if (priority.equals(Priority.INFO)) {
|
||||||
errorLabel.setIcon(UIManager.getIcon("OptionPane.informationIcon"));
|
errorLabel.setIcon(UIManager.getIcon("OptionPane.informationIcon"));
|
||||||
errorArea.setText(message);
|
errorArea.setText(message);
|
||||||
} else if (priority == Priority.WARN) {
|
} else if (priority.equals(Priority.WARN)) {
|
||||||
errorLabel.setIcon(UIManager.getIcon("OptionPane.warningIcon"));
|
errorLabel.setIcon(UIManager.getIcon("OptionPane.warningIcon"));
|
||||||
errorArea.setText(message);
|
errorArea.setText(message);
|
||||||
} else if (priority == Priority.ERROR) {
|
} else if (priority.equals(Priority.ERROR)) {
|
||||||
errorLabel.setIcon(UIManager.getIcon("OptionPane.errorIcon"));
|
errorLabel.setIcon(UIManager.getIcon("OptionPane.errorIcon"));
|
||||||
errorArea.setText(message);
|
errorArea.setText(message);
|
||||||
} else {
|
} else {
|
||||||
|
@ -44,7 +44,7 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
|||||||
isActive = true;
|
isActive = true;
|
||||||
display.syncExec(new Runnable() {
|
display.syncExec(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (trayItem.getImage() == image) {
|
if (trayItem.getImage().equals(image)) {
|
||||||
trayItem.setImage(image2);
|
trayItem.setImage(image2);
|
||||||
} else {
|
} else {
|
||||||
trayItem.setImage(image);
|
trayItem.setImage(image);
|
||||||
@ -80,11 +80,11 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
|||||||
display.asyncExec(new Runnable() {
|
display.asyncExec(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
int messageType = 0;
|
int messageType = 0;
|
||||||
if (priority == Priority.INFO) {
|
if (priority.equals(Priority.INFO)) {
|
||||||
messageType = SWT.ICON_INFORMATION;
|
messageType = SWT.ICON_INFORMATION;
|
||||||
} else if (priority == Priority.WARN) {
|
} else if (priority.equals(Priority.WARN)) {
|
||||||
messageType = SWT.ICON_WARNING;
|
messageType = SWT.ICON_WARNING;
|
||||||
} else if (priority == Priority.ERROR) {
|
} else if (priority.equals(Priority.ERROR)) {
|
||||||
messageType = SWT.ICON_ERROR;
|
messageType = SWT.ICON_ERROR;
|
||||||
}
|
}
|
||||||
if (messageType != 0) {
|
if (messageType != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user