add yggdrasil service watcher (update every 1s, think about freq)
This commit is contained in:
parent
bb67130d5e
commit
f22f3f9504
1 changed files with 4 additions and 1 deletions
|
@ -77,7 +77,7 @@ namespace Yggtk {
|
|||
}
|
||||
}
|
||||
|
||||
private void display_current_service_state () {
|
||||
private bool display_current_service_state () {
|
||||
try {
|
||||
if (window != null) {
|
||||
window.set_service_state (yggdrasil_service.get_status ());
|
||||
|
@ -85,6 +85,8 @@ namespace Yggtk {
|
|||
} catch (SpawnError e) {
|
||||
stderr.printf ("Unable to get service state: %s\n", e.message);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void update_yggtk () {
|
||||
|
@ -130,6 +132,7 @@ namespace Yggtk {
|
|||
window = new AppWindow (this);
|
||||
}
|
||||
display_current_service_state ();
|
||||
Timeout.add_seconds (1, display_current_service_state);
|
||||
window.show ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue