adjusted tray for dooble:

you can now set dooble=true in yacy.init to disable the menu and browser popups by default

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5633 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
lotus 16 years ago
parent bd6a3083c5
commit 8429083972

@ -896,3 +896,6 @@ disk.free = 3000
# setting if execution of CGI files is allowed or not
cgi.allow = false
cgi.suffixes = cgi,pl
# whether this is a version for dooble browser
dooble = false

@ -45,6 +45,7 @@ public final class yacyTray {
private static plasmaSwitchboard sb;
private static nativeTrayIcon ti;
private static boolean isDooble; // dooble browser integration
private static boolean isShown = false;
final private static boolean deutsch = System.getProperty("user.language","").equals("de");
@ -53,6 +54,7 @@ public final class yacyTray {
public static void init(final plasmaSwitchboard par_sb) {
sb = par_sb;
isDooble = sb.getConfigBool("dooble", false);
try {
final boolean trayIcon = sb.getConfigBool("trayIcon", false);
if (trayIcon && serverSystem.isWindows) {
@ -84,6 +86,8 @@ public final class yacyTray {
PopupMenu menu = new PopupMenu();
MenuItem menuItem;
if(isDooble) return menu;
// YaCy Search
if(deutsch) label = "YaCy Suche";
else label = "YaCy Search";
@ -146,6 +150,7 @@ public final class yacyTray {
}
private static void openBrowser(final String browserPopUpPage){
if(isDooble) return;
// no need for https, because we are on localhost
serverSystem.openBrowser("http://localhost:" + sb.getConfig("port", "8080") + "/" + browserPopUpPage);
}

Loading…
Cancel
Save