diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-01-21 13:27:04 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-01-21 13:27:04 (GMT) |
commit | 17778eeb680e7f140bdbe26a2355f0475d1d3bb9 (patch) | |
tree | 7c85c201607029d7205753a4fcc46d8fe0dcdb41 /src | |
parent | 82bba8d8082a838985d5cee831cd18fbd4f61a2a (diff) |
gtk already handles CTRL-C
Diffstat (limited to 'src')
-rw-r--r-- | src/rhlibrary/main.go | 28 |
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() } |