!7 concept Profile { S name, options; } /*compact*/ module VNCViewerTrayIcon > DynCRUD { transient TrayIcon trayIcon; bool inProcess; S switchableFields() { ret 'inProcess; } *() { super(Profile); } start { db(); onConceptsChangeAndNow(r makeTrayIcon); } void makeTrayIcon enter { disposeTrayIcon(trayIcon); L menuItems = ll(r launchVNCViewer); for (final Profile p) addAll(menuItems, p.name, r { if (inProcess) launchVNCViewer_inProcess(p.options); else launchVNCViewer(p.options) }); add(menuItems, "---"); addAll(menuItems, "VNC Viewer Connection Dialog", r { if (inProcess) launchVNCViewer_inProcess(); else launchVNCViewer() }); addAll(menuItems, "Edit Profiles...", r dm_activateOSAndModule); trayIcon = installTrayIcon(#1101468, "Start VNC Viewer", toObjectArray(menuItems)); } void cleanMeUp { disposeTrayIcon(trayIcon); } }