OSX work.

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@7637 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Derek DeMoro
2007-03-21 19:57:34 +00:00
committed by derek
parent 85272006ca
commit 0771ec62b7
2 changed files with 15 additions and 35 deletions

View File

@ -76,7 +76,14 @@ public class SearchService extends JPanel {
final JLabel lockLabel = new JLabel();
lockLabel.setHorizontalTextPosition(JLabel.LEFT);
lockLabel.setIcon(SparkRes.getImageIcon(SparkRes.LOCK_16x16));
if (Spark.isMac()) {
add(lockLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 15), 0, 0));
}
else {
add(lockLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));
}
lockLabel.setToolTipText(Res.getString("message.spark.secure"));
}

View File

@ -46,35 +46,8 @@ public class GrowlMessageListener implements GlobalMessageListener {
public void messageReceived(final ChatRoom chatRoom, final Message message) {
final ChatFrame chatFrame = SparkManager.getChatManager().getChatContainer().getChatFrame();
if (chatFrame.isVisible() && (chatFrame.getState() == Frame.ICONIFIED || !chatFrame.isInFocus())) {
if (!chatFrame.isVisible() || !chatFrame.isInFocus()) {
startFlashing(message);
return;
}
if (!chatFrame.isVisible() && SparkManager.getMainWindow().isFocused()) {
}
else if (chatFrame.isVisible() && !chatFrame.isInFocus()) {
startFlashing(message);
}
else if (chatFrame.isVisible() && chatFrame.getState() == Frame.ICONIFIED) {
startFlashing(message);
}
// Handle when chat frame is visible but the Contact List is not.
else if (chatFrame.isVisible() && !SparkManager.getMainWindow().isVisible() && !chatFrame.isInFocus()) {
startFlashing(message);
}
else if (!chatFrame.isVisible()) {
// If the ContactList is in the tray, we need better notification by flashing
// the chatframe.
if (!SparkManager.getMainWindow().isVisible()) {
startFlashing(message);
}
else if (chatFrame.getState() == Frame.ICONIFIED) {
startFlashing(message);
}
}
}