mirror of https://github.com/qwc/backive.git
try to get the runner up to something
This commit is contained in:
parent
865511e591
commit
d38b12e2ce
|
@ -9,9 +9,12 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-desktop-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: setup runner
|
||||||
|
run: |
|
||||||
|
sudo apt install xorg-server
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
|
|
|
@ -43,7 +43,9 @@ func Init(a fyne.App, w fyne.Window, conf backive.Configuration) {
|
||||||
config = conf
|
config = conf
|
||||||
apphomedir, _ := os.UserHomeDir()
|
apphomedir, _ := os.UserHomeDir()
|
||||||
apphomedir += string(os.PathSeparator) + ".config" + string(os.PathSeparator) + "backive" + string(os.PathSeparator) + "ui.json"
|
apphomedir += string(os.PathSeparator) + ".config" + string(os.PathSeparator) + "backive" + string(os.PathSeparator) + "ui.json"
|
||||||
|
LoadSettings()
|
||||||
go PollConnection()
|
go PollConnection()
|
||||||
|
fmt.Println("UI started")
|
||||||
}
|
}
|
||||||
|
|
||||||
// PollConnection polls in an endless loop the connection
|
// PollConnection polls in an endless loop the connection
|
||||||
|
@ -97,6 +99,7 @@ func ShallShow(data map[string]string) bool {
|
||||||
// SetHideUntil sets the time until messages should be hidden
|
// SetHideUntil sets the time until messages should be hidden
|
||||||
func SetHideUntil(until time.Time) {
|
func SetHideUntil(until time.Time) {
|
||||||
uisettings.hideUntil = until
|
uisettings.hideUntil = until
|
||||||
|
SaveSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetMessageLevel does exactly that.
|
// SetMessageLevel does exactly that.
|
||||||
|
@ -124,6 +127,7 @@ func SaveSettings() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
fmt.Println("Saved Settings.")
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadSettings loads the settings from the place where SaveSettings stored them.
|
// LoadSettings loads the settings from the place where SaveSettings stored them.
|
||||||
|
@ -135,6 +139,7 @@ func LoadSettings() {
|
||||||
panic(rferr)
|
panic(rferr)
|
||||||
}
|
}
|
||||||
json.Unmarshal(data, &uisettings)
|
json.Unmarshal(data, &uisettings)
|
||||||
|
fmt.Println("Loaded Settings.")
|
||||||
} /*else if os.IsNotExist(err) {
|
} /*else if os.IsNotExist(err) {
|
||||||
// no data
|
// no data
|
||||||
}*/
|
}*/
|
||||||
|
|
Loading…
Reference in New Issue