summaryrefslogtreecommitdiff
path: root/src/rhlibrary
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-01-21 13:27:04 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-01-21 13:27:04 (GMT)
commit17778eeb680e7f140bdbe26a2355f0475d1d3bb9 (patch)
tree7c85c201607029d7205753a4fcc46d8fe0dcdb41 /src/rhlibrary
parent82bba8d8082a838985d5cee831cd18fbd4f61a2a (diff)
gtk already handles CTRL-C
Diffstat (limited to 'src/rhlibrary')
-rw-r--r--src/rhlibrary/main.go28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/rhlibrary/main.go b/src/rhlibrary/main.go
index 3b87e19..a6e37c4 100644
--- a/src/rhlibrary/main.go
+++ b/src/rhlibrary/main.go
@@ -32,8 +32,6 @@ import (
"io/ioutil"
"log"
"os"
- "os/signal"
- "sync"
)
var (
@@ -95,29 +93,5 @@ func main() {
rhl.Println("Error initializing Main Window:", err)
return
}
-
- var wg sync.WaitGroup
-
- wg.Add(1)
- go func() {
- defer wg.Done()
- mw.ShowAndRun()
- }()
-
- alldone := make(chan bool)
- go func() {
- defer func() { alldone <- true }()
- wg.Wait()
- }()
-
- c := make(chan os.Signal, 1)
- signal.Notify(c, os.Interrupt)
-
- select {
- case <-c:
- rhl.Println("received interrupt, shutdown")
- return
- case <-alldone:
- return
- }
+ mw.ShowAndRun()
}