diff options
author | lawl <github@dumbinter.net> | 2020-08-02 11:40:44 +0200 |
---|---|---|
committer | lawl <github@dumbinter.net> | 2020-08-02 11:40:44 +0200 |
commit | 4243d5036d1e7d339ca8ee3ff8a0be88a9f0d92c (patch) | |
tree | 7d5264c8d992d3ff12bf337352b0e640aa95e5e7 /ui.go | |
parent | c07c021e49beb828c140e6b6e8961653b957e052 (diff) | |
download | noisetorch-4243d5036d1e7d339ca8ee3ff8a0be88a9f0d92c.tar.gz noisetorch-4243d5036d1e7d339ca8ee3ff8a0be88a9f0d92c.zip |
Don't fail to display UI when pa connection fails
Additionaly we now re-establish the connection if
it fails while we are already running.
Diffstat (limited to 'ui.go')
-rw-r--r-- | ui.go | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -50,6 +50,11 @@ func updatefn(w *nucular.Window, ui *uistate) { return } + if !ui.paClient.Connected() { + connectScreen(w, ui) + return + } + w.MenubarBegin() w.Row(10).Dynamic(2) @@ -260,3 +265,8 @@ func versionScreen(w *nucular.Window, ui *uistate) { ui.versionScreen = false } } + +func connectScreen(w *nucular.Window, ui *uistate) { + w.Row(50).Dynamic(1) + w.Label("Connecting to pulseaudio...", "CB") +} |