Added Button to launch PortableApps.com launcher. Added back common.sh support (oops)

This commit is contained in:
Belac Darkstorm
2016-09-22 08:39:56 -05:00
parent 77ce9e8ad4
commit fc3411e568
2 changed files with 19 additions and 0 deletions
+6
View File
@@ -1,6 +1,8 @@
package main package main
import ( import (
"os"
"github.com/nelsam/gxui" "github.com/nelsam/gxui"
"github.com/nelsam/gxui/drivers/gl" "github.com/nelsam/gxui/drivers/gl"
"github.com/nelsam/gxui/themes/dark" "github.com/nelsam/gxui/themes/dark"
@@ -18,6 +20,10 @@ var (
) )
func main() { func main() {
_, err := os.Open("PortableApps/LinuxPACom/common.sh")
if err == nil {
comEnbld = true
}
master = make(map[string][]app) master = make(map[string][]app)
linmaster = make(map[string][]app) linmaster = make(map[string][]app)
gl.StartDriver(appMain) gl.StartDriver(appMain)
+13
View File
@@ -1,6 +1,7 @@
package main package main
import ( import (
"os"
"os/exec" "os/exec"
"github.com/nelsam/gxui" "github.com/nelsam/gxui"
@@ -44,6 +45,18 @@ func ui() {
wineBut.SetText("Show Windows Apps") wineBut.SetText("Show Windows Apps")
} }
}) })
_, err := os.Open("Start.exe")
if err == nil {
pa := th.CreateButton()
pa.SetText("Open PortableApps Launcher")
pa.OnClick(func(gxui.MouseEvent) {
cmd := exec.Command("wine", "Start.exe")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Start()
})
butBox.AddChild(pa)
}
butBox.AddChild(wineBut) butBox.AddChild(wineBut)
} }
top.AddChild(butBox) top.AddChild(butBox)