From 77575c6ff11eb72708ef63335be04352c0aa1c39 Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Fri, 23 Oct 2020 16:10:01 +0200 Subject: [PATCH] Connect to default server on click of gennesis link --- source/gui.d | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/source/gui.d b/source/gui.d index 67af589..e1a2761 100644 --- a/source/gui.d +++ b/source/gui.d @@ -105,13 +105,31 @@ public class GUI : Thread tagline.setMarkup("GTK+ graphical DNET client"); welcomeBox.add(tagline); - Label server = new Label("fok"); - server.setMarkup("Find some servers"); - welcomeBox.add(server); + Label findServersLabel = new Label("fok"); + findServersLabel.setMarkup("Find some servers"); + welcomeBox.add(findServersLabel); + + Label configureConnectionsLabel = new Label("Configure connections"); + configureConnectionsLabel.setMarkup("Configure connections"); + welcomeBox.add(configureConnectionsLabel); + + Label connectGenesisLabel = new Label("Connect to the genesis server"); + connectGenesisLabel.setMarkup(" Connect to the genesis server"); + connectGenesisLabel.addOnActivateLink(&welcomeGenesisLabelClick); + welcomeBox.add(connectGenesisLabel); + + return welcomeBox; } + private bool welcomeGenesisLabelClick(string, Label) + { + connectServer("0.0.0.0", 7777); + + return 1; + } + /** * Initializes the main home screen window */