mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Migrating from 2.0 branch.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@6311 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -91,7 +91,7 @@ public final class Notifications implements ActionListener, MainWindowListener {
|
||||
unavaliableIcon = SparkRes.getImageIcon(SparkRes.MESSAGE_AWAY);
|
||||
busyIcon = SparkRes.getImageIcon(SparkRes.MESSAGE_DND);
|
||||
trayIcon = new TrayIcon(availableIcon);
|
||||
trayIcon.setToolTip("Spark"); // NORES
|
||||
trayIcon.setToolTip("Spark Client"); // NORES
|
||||
|
||||
JPopupMenu popupMenu = new JPopupMenu(Res.getString("title.tray.information"));
|
||||
|
||||
@ -161,6 +161,12 @@ public final class Notifications implements ActionListener, MainWindowListener {
|
||||
else {
|
||||
trayIcon.setIcon(busyIcon);
|
||||
}
|
||||
|
||||
// Get Status Text
|
||||
if (presence != null) {
|
||||
String status = presence.getStatus();
|
||||
trayIcon.setToolTip("Spark Client\n" + status);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -233,7 +239,13 @@ public final class Notifications implements ActionListener, MainWindowListener {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Object o = e.getSource();
|
||||
if (!(o instanceof JMenuItem)) {
|
||||
showMainWindow();
|
||||
if (SparkManager.getMainWindow().isVisible()) {
|
||||
SparkManager.getMainWindow().setVisible(false);
|
||||
hideMenu.setEnabled(false);
|
||||
}
|
||||
else {
|
||||
showMainWindow();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -284,6 +296,8 @@ public final class Notifications implements ActionListener, MainWindowListener {
|
||||
notificationDialog.setVisible(false);
|
||||
|
||||
hideMenu.setEnabled(true);
|
||||
|
||||
SparkManager.getMainWindow().toFront();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user