diff --git a/data/org.yggtk.yggtk.gresource.xml b/data/org.yggtk.yggtk.gresource.xml index c9e8afa..5a8dccc 100644 --- a/data/org.yggtk.yggtk.gresource.xml +++ b/data/org.yggtk.yggtk.gresource.xml @@ -1,6 +1,6 @@ - ui/main.ui + ui/app-window.ui diff --git a/data/ui/app-window.ui b/data/ui/app-window.ui new file mode 100644 index 0000000..24bcc94 --- /dev/null +++ b/data/ui/app-window.ui @@ -0,0 +1,173 @@ + + + + + + diff --git a/data/ui/main.ui b/data/ui/main.ui deleted file mode 100644 index 2b784b4..0000000 --- a/data/ui/main.ui +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - diff --git a/src/app-window.vala b/src/app-window.vala index 519968e..cd5f399 100644 --- a/src/app-window.vala +++ b/src/app-window.vala @@ -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 {