summaryrefslogtreecommitdiff
path: root/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui
diff options
context:
space:
mode:
Diffstat (limited to 'BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui')
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/BKUControllerInterface.java1
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java21
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/StatusNotifier.java1
3 files changed, 21 insertions, 2 deletions
diff --git a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/BKUControllerInterface.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/BKUControllerInterface.java
index a340c980..2d91f2f2 100644
--- a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/BKUControllerInterface.java
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/BKUControllerInterface.java
@@ -36,6 +36,7 @@ public interface BKUControllerInterface {
public void pinManagement(Locale locale);
+ public void personIdentityLink(Locale locale);
/**
* Check if MOCCA Autostart is possible
diff --git a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java
index 64b94424..3c6fe6f0 100644
--- a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java
@@ -57,11 +57,14 @@ public class MOCCAIcon implements StatusNotifier, ActionListener, ItemListener {
public static final String LABEL_ABOUT = "tray.label.about";
public static final String LABEL_SETTINGS = "tray.label.settings";
public static final String LABEL_AUTOSTART = "tray.label.autostart";
+ public static final String LABEL_IDENTITYLINK = "tray.label.identitylink";
+ public static final String LABEL_INFOMENU = "tray.label.infomenu";
public static final String TOOLTIP_DEFAULT = "tray.tooltip.default";
/** action commands for tray menu */
private static enum COMMANDS {
- SHUTDOWN_COMMAND, PIN_COMMAND, ABOUT_COMMAND, HELP_COMMAND, AUTOSTART_COMMAND
+ SHUTDOWN_COMMAND, PIN_COMMAND, ABOUT_COMMAND,
+ HELP_COMMAND, AUTOSTART_COMMAND, IDENTITYLINK_COMMAND
};
private static final Logger log = LoggerFactory.getLogger(MOCCAIcon.class);
@@ -104,6 +107,13 @@ public class MOCCAIcon implements StatusNotifier, ActionListener, ItemListener {
helpItem.addActionListener(this);
helpItem.setActionCommand(COMMANDS.HELP_COMMAND.name());
menu.add(helpItem);
+
+ Menu infoMenu = new Menu(messages.getString(LABEL_INFOMENU));
+
+ MenuItem identityLinkItem = new MenuItem(messages.getString(LABEL_IDENTITYLINK));
+ identityLinkItem.addActionListener(this);
+ identityLinkItem.setActionCommand(COMMANDS.IDENTITYLINK_COMMAND.name());
+ infoMenu.add(identityLinkItem);
MenuItem pinItem = new MenuItem(messages.getString(LABEL_PIN));
pinItem.addActionListener(this);
@@ -114,8 +124,10 @@ public class MOCCAIcon implements StatusNotifier, ActionListener, ItemListener {
messages.getString(LABEL_ABOUT));
aboutItem.setActionCommand(COMMANDS.ABOUT_COMMAND.name());
aboutItem.addActionListener(this);
- menu.add(aboutItem);
+ infoMenu.add(aboutItem);
+ menu.add(infoMenu);
+
menu.addSeparator();
Menu settingsMenu = new Menu(messages.getString(LABEL_SETTINGS));
@@ -232,6 +244,11 @@ public class MOCCAIcon implements StatusNotifier, ActionListener, ItemListener {
controller.showHelp(messages.getLocale());
break;
+ case IDENTITYLINK_COMMAND:
+ log.debug("person identity link dialog requested via tray menu");
+ controller.personIdentityLink(messages.getLocale());
+ break;
+
default:
log.error("unknown tray menu command: " + e.getActionCommand());
}
diff --git a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/StatusNotifier.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/StatusNotifier.java
index a089d0b3..b2ee60cb 100644
--- a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/StatusNotifier.java
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/StatusNotifier.java
@@ -49,6 +49,7 @@ public interface StatusNotifier {
public static final String ERROR_BIND = "tray.error.bind";
public static final String ERROR_CONFIG = "tray.error.config";
public static final String ERROR_PIN = "tray.error.pin.connect";
+ public static final String ERROR_IDENTITY_LINK = "tray.error.identity_link.connect";
public static final String ERROR_OPEN_URL = "tray.error.open.url";