update ui file
This commit is contained in:
parent
8faac1c8f3
commit
9512c02bff
4 changed files with 184 additions and 125 deletions
|
@ -17,17 +17,17 @@ using Gtk;
|
|||
|
||||
namespace Yggtk {
|
||||
|
||||
[GtkTemplate (ui = "/org/yggtk/yggtk/ui/main.ui")]
|
||||
[GtkTemplate (ui = "/org/yggtk/yggtk/ui/app-window.ui")]
|
||||
public class AppWindow : ApplicationWindow {
|
||||
|
||||
[GtkChild]
|
||||
private Gtk.Switch service_state_switch;
|
||||
|
||||
[GtkChild]
|
||||
private Gtk.Button browse_button;
|
||||
private Gtk.Button browse_peers_button;
|
||||
|
||||
[GtkChild]
|
||||
private Gtk.Entry ip_entry;
|
||||
private Gtk.Entry peer_ip_entry;
|
||||
|
||||
[GtkCallback]
|
||||
private bool on_service_state_switch_state_set (bool state) {
|
||||
|
@ -43,27 +43,27 @@ namespace Yggtk {
|
|||
|
||||
Object(application: application);
|
||||
|
||||
ip_entry.notify["text"].connect (() => {
|
||||
peer_ip_entry.notify["text"].connect (() => {
|
||||
|
||||
if (ip_entry.text != "") {
|
||||
if (peer_ip_entry.text != "") {
|
||||
|
||||
browse_button.label = "OK";
|
||||
browse_peers_button.label = "OK";
|
||||
|
||||
} else {
|
||||
|
||||
browse_button.label = "Browse";
|
||||
browse_peers_button.label = "Browse";
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
browse_button.clicked.connect (() => {
|
||||
browse_peers_button.clicked.connect (() => {
|
||||
|
||||
if (browse_button.label == "OK") {
|
||||
if (browse_peers_button.label == "OK") {
|
||||
|
||||
string yggconf;
|
||||
Process.spawn_command_line_sync ("yggdrasil -genconf -json", out yggconf);
|
||||
parse (yggconf, ip_entry);
|
||||
parse (yggconf, peer_ip_entry);
|
||||
|
||||
} else {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue