Allow user to set a specific title for gui client
This commit is contained in:
@@ -62,6 +62,7 @@ public class GuiSwing extends JFrame implements Gui {
|
|||||||
private Settings activitySettings;
|
private Settings activitySettings;
|
||||||
private TrayIcon trayIcon;
|
private TrayIcon trayIcon;
|
||||||
private boolean useSysTray;
|
private boolean useSysTray;
|
||||||
|
private String title;
|
||||||
|
|
||||||
private int framesRendered;
|
private int framesRendered;
|
||||||
|
|
||||||
@@ -70,9 +71,10 @@ public class GuiSwing extends JFrame implements Gui {
|
|||||||
|
|
||||||
private ThreadClient threadClient;
|
private ThreadClient threadClient;
|
||||||
|
|
||||||
public GuiSwing(boolean useSysTray_) {
|
public GuiSwing(boolean useSysTray_, String title_) {
|
||||||
framesRendered = 0;
|
framesRendered = 0;
|
||||||
useSysTray = useSysTray_;
|
useSysTray = useSysTray_;
|
||||||
|
title = title_;
|
||||||
waitingForAuthentication = true;
|
waitingForAuthentication = true;
|
||||||
|
|
||||||
new Timer().scheduleAtFixedRate(new TimerTask() {
|
new Timer().scheduleAtFixedRate(new TimerTask() {
|
||||||
@@ -118,7 +120,7 @@ public class GuiSwing extends JFrame implements Gui {
|
|||||||
setIconImage(img.getImage());
|
setIconImage(img.getImage());
|
||||||
}
|
}
|
||||||
|
|
||||||
setTitle("SheepIt Render Farm");
|
setTitle(title);
|
||||||
setSize(520, 680);
|
setSize(520, 680);
|
||||||
|
|
||||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
|
|||||||
@@ -103,6 +103,9 @@ public class Worker {
|
|||||||
@Option(name = "-priority", usage = "Set render process priority (19 lowest to -19 highest)", required = false)
|
@Option(name = "-priority", usage = "Set render process priority (19 lowest to -19 highest)", required = false)
|
||||||
private int priority = 19;
|
private int priority = 19;
|
||||||
|
|
||||||
|
@Option(name = "-title", usage = "Custom title for the GUI Client", required = false)
|
||||||
|
private String title = "SheepIt Render Farm";
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
new Worker().doMain(args);
|
new Worker().doMain(args);
|
||||||
}
|
}
|
||||||
@@ -304,7 +307,7 @@ public class Worker {
|
|||||||
System.out.println("You should set a DISPLAY or use a text ui (with -ui " + GuiTextOneLine.type + " or -ui " + GuiText.type + ").");
|
System.out.println("You should set a DISPLAY or use a text ui (with -ui " + GuiTextOneLine.type + " or -ui " + GuiText.type + ").");
|
||||||
System.exit(3);
|
System.exit(3);
|
||||||
}
|
}
|
||||||
gui = new GuiSwing(no_systray == false);
|
gui = new GuiSwing(no_systray == false, title);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Client cli = new Client(gui, config, server);
|
Client cli = new Client(gui, config, server);
|
||||||
|
|||||||
Reference in New Issue
Block a user