From 1a15c6cd4d4da78a68381a1a31da43bdb9688ffa Mon Sep 17 00:00:00 2001 From: pztrn Date: Mon, 10 Oct 2016 20:11:41 +0500 Subject: [PATCH] Added Windows-related initialization things. --- ui/mainwindow_init.go | 5 +++++ ui/mainwindow_init_win.go | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 ui/mainwindow_init_win.go diff --git a/ui/mainwindow_init.go b/ui/mainwindow_init.go index 1b50ee5..cbcbbce 100644 --- a/ui/mainwindow_init.go +++ b/ui/mainwindow_init.go @@ -145,6 +145,11 @@ func (m *MainWindow) Initialize() { m.window.Add(m.vbox) + // Additional Windows-related initialization. + if runtime.GOOS == "windows" { + m.initializeWin() + } + m.window.ShowAll() // Launch events. diff --git a/ui/mainwindow_init_win.go b/ui/mainwindow_init_win.go new file mode 100644 index 0000000..9bdc783 --- /dev/null +++ b/ui/mainwindow_init_win.go @@ -0,0 +1,10 @@ +package ui + +import ( + // other + "github.com/couchbase/goutils/platform" +) + +func (m *MainWindow) initializeWin() { + platform.HideConsole(true) +}