Browse Source

Upgrade GUI from GTK3 to GTK4

master
Trevor Slocum 3 months ago
parent
commit
ab24782298
  1. 37
      cmd/gtkmenu/gui.go
  2. 68
      cmd/gtkmenu/gui_icon.go
  3. 159
      cmd/gtkmenu/gui_list.go
  4. 26
      cmd/gtkmenu/main.go
  5. 14
      go.mod
  6. 42
      go.sum
  7. 8
      pkg/gmenu/run_windows.go

37
cmd/gtkmenu/gui.go

@ -4,33 +4,23 @@ import ( @@ -4,33 +4,23 @@ import (
"log"
"os"
"github.com/gotk3/gotk3/gdk"
"github.com/gotk3/gotk3/gtk"
"github.com/diamondburned/gotk4/pkg/gdk/v4"
"github.com/diamondburned/gotk4/pkg/gtk/v4"
)
func initWindow(application *gtk.Application) *gtk.ApplicationWindow {
w, err := gtk.ApplicationWindowNew(application)
if err != nil {
log.Fatal("failed to create window:", err)
}
w.Connect("key-press-event", handleKeybinding)
func initWindow(app *gtk.Application) *gtk.ApplicationWindow {
w := gtk.NewApplicationWindow(app)
w.Connect("destroy", func() {
w.ConnectDestroy(func() {
os.Exit(0)
})
w.SetTitle("gmenu")
w.SetDecorated(false)
w.SetBorderWidth(0)
w.Stick()
w.SetKeepAbove(true)
w.SetTypeHint(gdk.WINDOW_TYPE_HINT_UTILITY)
if !config.Fullscreen {
w.SetResizable(config.Resizable)
w.SetSizeRequest(config.Width, config.Height)
w.SetPosition(gtk.WIN_POS_CENTER)
w.SetDefaultSize(config.Width, config.Height)
} else {
w.Fullscreen()
}
@ -38,22 +28,21 @@ func initWindow(application *gtk.Application) *gtk.ApplicationWindow { @@ -38,22 +28,21 @@ func initWindow(application *gtk.Application) *gtk.ApplicationWindow {
return w
}
func handleKeybinding(_ *gtk.ApplicationWindow, ev *gdk.Event) bool {
keyEvent := &gdk.EventKey{ev}
switch keyEvent.KeyVal() {
func handleKeybinding(keyval, keycode uint, state gdk.ModifierType) bool {
switch keyval {
case gdk.KEY_Up, gdk.KEY_Down:
offset := -1
if keyEvent.KeyVal() == gdk.KEY_Down {
if keyval == gdk.KEY_Down {
offset = 1
}
index := 0
row := listBox.GetSelectedRow()
row := listBox.SelectedRow()
if row != nil {
index = row.GetIndex()
index = row.Index()
}
row = listBox.GetRowAtIndex(index + offset)
row = listBox.RowAtIndex(index + offset)
if row != nil {
listBox.SelectRow(row)
row.GrabFocus()
@ -62,7 +51,7 @@ func handleKeybinding(_ *gtk.ApplicationWindow, ev *gdk.Event) bool { @@ -62,7 +51,7 @@ func handleKeybinding(_ *gtk.ApplicationWindow, ev *gdk.Event) bool {
return true
case gdk.KEY_Return, gdk.KEY_KP_Enter, gdk.KEY_ISO_Enter, gdk.KEY_3270_Enter:
runInTerminal := keyEvent.State()&uint(gdk.MOD1_MASK) > 0
runInTerminal := state&gdk.MODIFIER_MASK > 0
err := listSelect(inputView, runInTerminal)
if err != nil {

68
cmd/gtkmenu/gui_icon.go

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
package main
import (
"context"
"crypto/md5"
"fmt"
"log"
@ -9,8 +10,9 @@ import ( @@ -9,8 +10,9 @@ import (
"code.rocketnine.space/tslocum/desktop"
"code.rocketnine.space/tslocum/gmenu/pkg/gmenu"
"github.com/gotk3/gotk3/gdk"
"github.com/gotk3/gotk3/gtk"
"github.com/diamondburned/gotk4/pkg/gdkpixbuf/v2"
"github.com/diamondburned/gotk4/pkg/gio/v2"
"github.com/diamondburned/gotk4/pkg/gtk/v4"
)
const cachedIconCompressionLevel = 3
@ -20,29 +22,64 @@ var ( @@ -20,29 +22,64 @@ var (
iconCacheDir string
)
func loadIcon(icon string) (*gdk.Pixbuf, error) {
func loadPNG(data []byte) (*gdkpixbuf.Pixbuf, error) {
l, err := gdkpixbuf.NewPixbufLoaderWithType("png")
if err != nil {
return nil, fmt.Errorf("failed to initialize png loader: %s", err)
}
defer l.Close()
if err = l.Write(data); err != nil {
return nil, fmt.Errorf("failed to load png data: %s", err)
}
return l.Pixbuf(), nil
}
func loadIcon(icon string) (*gdkpixbuf.Pixbuf, error) {
cachedIcon := path.Join(iconCacheDir, fmt.Sprintf("%x.png", md5.Sum([]byte(icon))))
var (
pbuf *gdk.Pixbuf
pbuf *gdkpixbuf.Pixbuf
img *gtk.Image
err error
)
if _, statErr := os.Stat(cachedIcon); !os.IsNotExist(statErr) {
pbuf, err = gdk.PixbufNewFromFileAtSize(cachedIcon, iconSize, iconSize)
var bytes []byte
bytes, err = os.ReadFile(cachedIcon)
if err != nil {
return nil, err
}
pbuf, err = loadPNG(bytes)
}
if pbuf == nil || err != nil {
if path.IsAbs(icon) {
pbuf, err = gdk.PixbufNewFromFileAtSize(icon, iconSize, iconSize)
var bytes []byte
bytes, err = os.ReadFile(icon)
if err != nil {
return nil, err
}
pbuf, err = loadPNG(bytes)
} else {
pbuf, err = iconTheme.LoadIcon(icon, iconSize, gtk.ICON_LOOKUP_USE_BUILTIN)
iconPaintable := iconTheme.LookupIcon(icon, nil, iconSize, 1, gtk.TextDirLTR, gtk.IconLookupPreload)
var bytes []byte
bytes, err = os.ReadFile(iconPaintable.File().Path())
if err != nil {
return nil, err
}
pbuf, err = loadPNG(bytes)
}
}
if err != nil {
return nil, err
}
if pbuf.GetWidth() != iconSize || pbuf.GetHeight() != iconSize {
pbuf, _ = pbuf.ScaleSimple(iconSize, iconSize, gdk.INTERP_BILINEAR)
if pbuf != nil && img == nil {
img = gtk.NewImageFromPixbuf(pbuf)
}
if pbuf.Width() != iconSize || pbuf.Height() != iconSize {
pbuf = pbuf.ScaleSimple(iconSize, iconSize, gdkpixbuf.InterpBilinear)
}
go cacheIcon(cachedIcon, pbuf)
@ -50,14 +87,15 @@ func loadIcon(icon string) (*gdk.Pixbuf, error) { @@ -50,14 +87,15 @@ func loadIcon(icon string) (*gdk.Pixbuf, error) {
return pbuf, nil
}
func cacheIcon(cachedIcon string, pbuf *gdk.Pixbuf) {
f, err := os.OpenFile(cachedIcon, os.O_CREATE|os.O_RDWR, 0644)
func cacheIcon(cachedIcon string, pbuf *gdkpixbuf.Pixbuf) {
saveFile := gio.NewFileForPath(cachedIcon)
saveFileStream, err := saveFile.Replace(context.Background(), "", false, gio.FileCreatePrivate)
if err != nil {
log.Println(err)
log.Printf("Failed to cache entry icon %s: %s", cachedIcon, err)
return
}
pbuf.SavePNG(f.Name(), cachedIconCompressionLevel)
pbuf.SaveToStreamv(context.Background(), saveFileStream, "png", nil, nil)
saveFileStream.Close(context.Background())
}
func fallbackIcon(entry *gmenu.ListEntry) string {
@ -72,7 +110,7 @@ func fallbackIcon(entry *gmenu.ListEntry) string { @@ -72,7 +110,7 @@ func fallbackIcon(entry *gmenu.ListEntry) string {
func loadIconImage(img *gtk.Image, entry *gmenu.ListEntry) {
var (
pbuf *gdk.Pixbuf
pbuf *gdkpixbuf.Pixbuf
err error
)
if entry.Entry != nil && entry.Icon != "" {

159
cmd/gtkmenu/gui_list.go

@ -12,9 +12,9 @@ import ( @@ -12,9 +12,9 @@ import (
"code.rocketnine.space/tslocum/desktop"
"code.rocketnine.space/tslocum/gmenu/pkg/gmenu"
"github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/gtk"
"github.com/gotk3/gotk3/pango"
"github.com/diamondburned/gotk4/pkg/core/glib"
"github.com/diamondburned/gotk4/pkg/gtk/v4"
"github.com/diamondburned/gotk4/pkg/pango"
"github.com/kballard/go-shellquote"
)
@ -29,54 +29,42 @@ const ( @@ -29,54 +29,42 @@ const (
var execLabel *gtk.Label
func initList(container *gtk.Box) {
inputView = newTextView()
inputView = gtk.NewTextView()
setNoExpand(&inputView.Widget)
inputView.SetProperty("accepts-tab", false)
inputView.SetProperty("wrap-mode", gtk.WRAP_CHAR)
inputView.SetProperty("cursor-visible", false)
inputView.SetProperty("left-margin", 2)
inputView.SetProperty("right-margin", 2)
buffer, err := inputView.GetBuffer()
if err != nil {
log.Fatal("failed to create input buffer:", err)
}
buffer.Connect("changed", func(tb *gtk.TextBuffer) bool {
inputView.SetObjectProperty("accepts-tab", false)
inputView.SetObjectProperty("wrap-mode", gtk.WrapChar)
inputView.SetObjectProperty("cursor-visible", false)
inputView.SetObjectProperty("left-margin", 2)
inputView.SetObjectProperty("right-margin", 2)
keyController := gtk.NewEventControllerKey()
keyController.ConnectKeyPressed(handleKeybinding)
inputView.AddController(keyController)
buffer := inputView.Buffer()
buffer.ConnectChanged(func() {
gmenu.SetInput(strings.TrimSpace(textViewText(inputView)))
return false
})
if err != nil {
log.Fatal("failed to connect to changed event of input buffer:", err)
}
container.Add(inputView)
container.Append(inputView)
listScroll, err := gtk.ScrolledWindowNew(nil, nil)
if err != nil {
log.Fatal("failed to create ScrolledWindow:", err)
}
listScroll := gtk.NewScrolledWindow()
listScroll.SetHExpand(true)
listScroll.SetVExpand(false)
listBox, err = gtk.ListBoxNew()
if err != nil {
log.Fatal("failed to create ListBox:", err)
}
listBox.SetSelectionMode(gtk.SELECTION_BROWSE)
listBox = gtk.NewListBox()
listBox.SetSelectionMode(gtk.SelectionBrowse)
listBox.SetHExpand(false)
listBox.SetFocusOnClick(false)
listScroll.Add(listBox)
container.PackEnd(listScroll, true, true, 0)
listScroll.SetPolicy(gtk.PolicyNever, gtk.PolicyAutomatic)
listScroll.SetChild(listBox)
listScroll.SetVExpand(true)
container.Append(listScroll)
if !config.HideAppIcons {
s, _ := container.GetScreen()
iconTheme, err = gtk.IconThemeGetForScreen(*s)
if err != nil {
log.Fatal("failed to get icon theme:", err)
}
d := container.Display()
iconTheme = gtk.IconThemeGetForDisplay(d)
}
lastEntry := len(gmenu.FilteredEntries) - 1
@ -98,30 +86,27 @@ func initList(container *gtk.Box) { @@ -98,30 +86,27 @@ func initList(container *gtk.Box) {
wg.Wait()
glib.IdleAdd(func() {
listBox.Connect("row-activated", func(_ *gtk.ListBox, _ *gtk.ListBoxRow) {
listBox.ConnectRowActivated(func(_ *gtk.ListBoxRow) {
err := listSelect(inputView, false)
if err != nil {
log.Fatal(err)
}
})
if err != nil {
log.Fatal("failed to connect to row-activated event of ListBox:", err)
}
})
}()
}
func initRow(container *gtk.Box, entry *gmenu.ListEntry, i int, lastEntry int) {
if !config.HideAppIcons {
img, _ := gtk.ImageNew()
img := gtk.NewImage()
img.SetSizeRequest(iconSize, iconSize)
container.PackStart(img, false, false, 0)
container.Append(img)
glib.IdleAdd(func() { loadIconImage(img, entry) })
}
labelContainer := newBox(gtk.ORIENTATION_VERTICAL)
labelContainer := gtk.NewBox(gtk.OrientationVertical, 0)
labelContainer.SetMarginStart(labelMarginStart)
labelText := "Shell command"
@ -129,10 +114,7 @@ func initRow(container *gtk.Box, entry *gmenu.ListEntry, i int, lastEntry int) { @@ -129,10 +114,7 @@ func initRow(container *gtk.Box, entry *gmenu.ListEntry, i int, lastEntry int) {
labelText = entry.Label
}
l, err := gtk.LabelNew(fmt.Sprintf("<b>%s</b>", html.EscapeString(labelText)))
if err != nil {
log.Fatal("failed to create Label:", err)
}
l := gtk.NewLabel(fmt.Sprintf("<b>%s</b>", html.EscapeString(labelText)))
l.SetUseMarkup(true)
setNoExpand(&l.Widget)
@ -142,11 +124,7 @@ func initRow(container *gtk.Box, entry *gmenu.ListEntry, i int, lastEntry int) { @@ -142,11 +124,7 @@ func initRow(container *gtk.Box, entry *gmenu.ListEntry, i int, lastEntry int) {
l.SetMarginTop(labelMarginTop)
}
if !config.HideAppDetails {
labelContainer.PackStart(l, false, false, 0)
} else {
labelContainer.PackStart(l, true, true, 0)
}
labelContainer.Append(l)
if config.HideAppDetails {
if i == lastEntry {
@ -157,11 +135,7 @@ func initRow(container *gtk.Box, entry *gmenu.ListEntry, i int, lastEntry int) { @@ -157,11 +135,7 @@ func initRow(container *gtk.Box, entry *gmenu.ListEntry, i int, lastEntry int) {
if entry.Entry != nil {
comment = entry.Comment
}
l, err := gtk.LabelNew(comment)
if err != nil {
log.Fatal("failed to create Label:", err)
}
l := gtk.NewLabel(comment)
setNoExpand(&l.Widget)
initLabel(l)
@ -169,7 +143,7 @@ func initRow(container *gtk.Box, entry *gmenu.ListEntry, i int, lastEntry int) { @@ -169,7 +143,7 @@ func initRow(container *gtk.Box, entry *gmenu.ListEntry, i int, lastEntry int) {
l.SetMarginTop(labelMarginTopComment)
}
labelContainer.Add(l)
labelContainer.Append(l)
if i == lastEntry {
execLabel = l
@ -177,16 +151,16 @@ func initRow(container *gtk.Box, entry *gmenu.ListEntry, i int, lastEntry int) { @@ -177,16 +151,16 @@ func initRow(container *gtk.Box, entry *gmenu.ListEntry, i int, lastEntry int) {
}
setNoExpand(&labelContainer.Widget)
container.Add(labelContainer)
container.Append(labelContainer)
setNoExpand(&container.Widget)
}
func initLabel(l *gtk.Label) {
l.SetHAlign(gtk.ALIGN_START)
l.SetLineWrap(false)
l.SetHAlign(gtk.AlignStart)
l.SetWrap(false)
l.SetSingleLineMode(true)
l.SetEllipsize(pango.ELLIPSIZE_END)
l.SetEllipsize(pango.EllipsizeEnd)
}
func updateList(input string) {
@ -195,42 +169,14 @@ func updateList(input string) { @@ -195,42 +169,14 @@ func updateList(input string) {
listBox.InvalidateFilter()
listBox.InvalidateSort()
listBox.SelectRow(listBox.GetRowAtIndex(0))
}
func newBox(orient gtk.Orientation) *gtk.Box {
box, err := gtk.BoxNew(orient, 0)
if err != nil {
log.Fatal("Unable to create box:", err)
}
return box
}
func newTextView() *gtk.TextView {
tv, err := gtk.TextViewNew()
if err != nil {
log.Fatal("Unable to create TextView:", err)
}
return tv
}
func textViewBuffer(tv *gtk.TextView) *gtk.TextBuffer {
buffer, err := tv.GetBuffer()
if err != nil {
log.Fatal("Unable to get TextView buffer:", err)
}
return buffer
listBox.SelectRow(listBox.RowAtIndex(0))
}
func textViewText(tv *gtk.TextView) string {
buffer := textViewBuffer(tv)
start, end := buffer.GetBounds()
buffer := tv.Buffer()
start, end := buffer.Bounds()
text, err := buffer.GetText(start, end, true)
if err != nil {
log.Fatal("Unable to get TextView text:", err)
}
return text
return buffer.Text(start, end, true)
}
func setNoExpand(v *gtk.Widget) {
@ -243,8 +189,8 @@ func rowID(row *gtk.ListBoxRow) int { @@ -243,8 +189,8 @@ func rowID(row *gtk.ListBoxRow) int {
return -1
}
name, err := row.GetName()
if err != nil || len(name) < 2 || name[0] != '#' {
name := row.Name()
if len(name) < 2 || name[0] != '#' {
return -1
}
@ -261,7 +207,7 @@ func selectedIndex() int { @@ -261,7 +207,7 @@ func selectedIndex() int {
return -1
}
return rowID(listBox.GetSelectedRow())
return rowID(listBox.SelectedRow())
}
func selectedEntry() *desktop.Entry {
@ -339,10 +285,7 @@ func listFilter(row *gtk.ListBoxRow) bool { @@ -339,10 +285,7 @@ func listFilter(row *gtk.ListBoxRow) bool {
func rowInitFunc(i int, label string, entry *gmenu.ListEntry, lastEntry int, wg *sync.WaitGroup) func() {
return func() {
row, err := gtk.ListBoxRowNew()
if err != nil {
log.Fatal("failed to create ListBoxRow:", err)
}
row := gtk.NewListBoxRow()
if i == lastEntry {
entry = &gmenu.ListEntry{Entry: nil, Label: ""}
@ -352,7 +295,7 @@ func rowInitFunc(i int, label string, entry *gmenu.ListEntry, lastEntry int, wg @@ -352,7 +295,7 @@ func rowInitFunc(i int, label string, entry *gmenu.ListEntry, lastEntry int, wg
entry = &gmenu.ListEntry{Entry: gmenu.Entries[i], Label: label}
}
container := newBox(gtk.ORIENTATION_HORIZONTAL)
container := gtk.NewBox(gtk.OrientationHorizontal, 0)
container.SetMarginStart(rowMargin)
container.SetMarginTop(rowMargin)
container.SetMarginBottom(rowMargin)
@ -360,11 +303,11 @@ func rowInitFunc(i int, label string, entry *gmenu.ListEntry, lastEntry int, wg @@ -360,11 +303,11 @@ func rowInitFunc(i int, label string, entry *gmenu.ListEntry, lastEntry int, wg
initRow(container, entry, i, lastEntry)
row.Add(container)
listBox.Add(row)
row.SetChild(container)
listBox.Append(row)
listBox.SelectRow(listBox.GetRowAtIndex(0))
row.ShowAll()
listBox.SelectRow(listBox.RowAtIndex(0))
row.Show()
wg.Done()
}

26
cmd/gtkmenu/main.go

@ -10,8 +10,8 @@ import ( @@ -10,8 +10,8 @@ import (
"sync"
"code.rocketnine.space/tslocum/gmenu/pkg/gmenu"
"github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/gtk"
"github.com/diamondburned/gotk4/pkg/core/glib"
"github.com/diamondburned/gotk4/pkg/gtk/v4"
)
// Config stores configuration variables.
@ -83,21 +83,22 @@ func load() { @@ -83,21 +83,22 @@ func load() {
f := func() {
updateList(input)
}
glib.IdleAddPriority(glib.PRIORITY_HIGH_IDLE, f)
glib.IdleAddPriority(glib.PriorityHighIdle, f)
})
loaded <- true
}
func onActivate(application *gtk.Application) {
func activate(app *gtk.Application) {
once.Do(func() {
w := initWindow(application)
container = newBox(gtk.ORIENTATION_VERTICAL)
w.Add(container)
w := initWindow(app)
container = gtk.NewBox(gtk.OrientationVertical, 0)
w.SetChild(container)
<-loaded
initList(container)
w.ShowAll()
w.Show()
if config.CPUProfile != "" {
pprof.StopCPUProfile()
@ -125,11 +126,8 @@ func main() { @@ -125,11 +126,8 @@ func main() {
go load()
application, err := gtk.ApplicationNew(appID, glib.APPLICATION_FLAGS_NONE)
if err != nil {
log.Fatal("failed to create application:", err)
}
application.Connect("activate", func() { onActivate(application) })
app := gtk.NewApplication(appID, 0)
app.ConnectActivate(func() { activate(app) })
os.Exit(application.Run(flag.Args()))
os.Exit(app.Run(flag.Args()))
}

14
go.mod

@ -3,11 +3,15 @@ module code.rocketnine.space/tslocum/gmenu @@ -3,11 +3,15 @@ module code.rocketnine.space/tslocum/gmenu
go 1.12
require (
code.rocketnine.space/tslocum/cview v1.5.6
code.rocketnine.space/tslocum/cview v1.5.7
code.rocketnine.space/tslocum/desktop v0.1.6-0.20210710150012-8bd74b40a298
github.com/gdamore/tcell/v2 v2.3.11
github.com/gotk3/gotk3 v0.6.1-0.20210626103219-b183dad2e774
github.com/diamondburned/gotk4/pkg v0.0.0-20220305042118-cfb7981704dc
github.com/gdamore/tcell/v2 v2.4.1-0.20220305021509-8b074c48d649
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/lithammer/fuzzysearch v1.1.2
github.com/mattn/go-isatty v0.0.13
github.com/lithammer/fuzzysearch v1.1.3
github.com/mattn/go-isatty v0.0.14
github.com/mattn/go-runewidth v0.0.14-0.20220218133654-a014e9691005 // indirect
go4.org/unsafe/assume-no-moving-gc v0.0.0-20211027215541-db492cf91b37 // indirect
golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
)

42
go.sum

@ -1,43 +1,55 @@ @@ -1,43 +1,55 @@
code.rocketnine.space/tslocum/cbind v0.1.5 h1:i6NkeLLNPNMS4NWNi3302Ay3zSU6MrqOT+yJskiodxE=
code.rocketnine.space/tslocum/cbind v0.1.5/go.mod h1:LtfqJTzM7qhg88nAvNhx+VnTjZ0SXBJtxBObbfBWo/M=
code.rocketnine.space/tslocum/cview v1.5.6 h1:W0HJFIIgly3LzYoTitZIIaYDDqW0u/qmA0B6jWzw6R0=
code.rocketnine.space/tslocum/cview v1.5.6/go.mod h1:RogJMObbKuGiP8+9WsFsHpPeQQqgkCXgvTLxh7IH5eE=
code.rocketnine.space/tslocum/cview v1.5.7 h1:dUL6jyNp/ubUfeds7G7zq8R3sZY+He+sPGxu3Qn21tY=
code.rocketnine.space/tslocum/cview v1.5.7/go.mod h1:4Wx6exftTIbeRai3s0VVjzVaSNyHlXTg9eHd3s89v9Q=
code.rocketnine.space/tslocum/desktop v0.1.6-0.20210710150012-8bd74b40a298 h1:tuG22JOMMVlMl+ofRGIJFCTwzs+CclO/XZh7qEPXnzk=
code.rocketnine.space/tslocum/desktop v0.1.6-0.20210710150012-8bd74b40a298/go.mod h1:6IwP59rJ44vga/frr123meFdpWU0xMZlTq8gcOhVKGI=
github.com/diamondburned/gotk4/pkg v0.0.0-20220305042118-cfb7981704dc h1:huKiZ5uLa7CSX7zrpT+pXwQ7dHzyv3qHNqgvnsg1yNQ=
github.com/diamondburned/gotk4/pkg v0.0.0-20220305042118-cfb7981704dc/go.mod h1:dJ2gfR0gvBsGg4IteP8aMBq/U5Q9boDw0DP7kAjXTwM=
github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko=
github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
github.com/gdamore/tcell/v2 v2.2.0/go.mod h1:cTTuF84Dlj/RqmaCIV5p4w8uG1zWdk0SF6oBpwHp4fU=
github.com/gdamore/tcell/v2 v2.3.11 h1:ECO6WqHGbKZ3HrSL7bG/zArMCmLaNr5vcjjMVnLHpzc=
github.com/gdamore/tcell/v2 v2.3.11/go.mod h1:cTTuF84Dlj/RqmaCIV5p4w8uG1zWdk0SF6oBpwHp4fU=
github.com/gotk3/gotk3 v0.6.1-0.20210626103219-b183dad2e774 h1:IJZW/ruK8Z0nDlpJ4Qj4Ekm2mR39OR0/eFY1pVRaDbM=
github.com/gotk3/gotk3 v0.6.1-0.20210626103219-b183dad2e774/go.mod h1:/hqFpkNa9T3JgNAE2fLvCdov7c5bw//FHNZrZ3Uv9/Q=
github.com/gdamore/tcell/v2 v2.4.1-0.20210828201608-73703f7ed490/go.mod h1:Az6Jt+M5idSED2YPGtwnfJV0kXohgdCBPmHGSYc1r04=
github.com/gdamore/tcell/v2 v2.4.1-0.20220305021509-8b074c48d649 h1:JKXRFto1J+XqBGFex8v2nwF5JoLc9gGiwlTL2qrsj/M=
github.com/gdamore/tcell/v2 v2.4.1-0.20220305021509-8b074c48d649/go.mod h1:I8YJFI9gzgl4dHi9UlRDZosCW+jYkDA37AXmXvL51w4=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/lithammer/fuzzysearch v1.1.2 h1:ePUtm14xKxbpCxozcFbIDRtvANxnVnE+RKpJUqkr2gA=
github.com/lithammer/fuzzysearch v1.1.2/go.mod h1:v6tYW/9kpfV6LNcweXdSjQsfCku/1M/oObmSox1fzP8=
github.com/lithammer/fuzzysearch v1.1.3 h1:+t5SevHLfi3IHcTx7LT3S+od4OcUmjzxD1xmnvtgG38=
github.com/lithammer/fuzzysearch v1.1.3/go.mod h1:1R1LRNk7yKid1BaQkmuLQaHruxcC4HmAH30Dh61Ih1Q=
github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA=
github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-runewidth v0.0.14-0.20210830053702-dc8fe66265af/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-runewidth v0.0.14-0.20220218133654-a014e9691005 h1:m+o2nloTlmyKnsfIhjIEoNUAO2ABn7k1wINTWdx2wL4=
github.com/mattn/go-runewidth v0.0.14-0.20220218133654-a014e9691005/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
go4.org/unsafe/assume-no-moving-gc v0.0.0-20201222180813-1025295fd063/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E=
go4.org/unsafe/assume-no-moving-gc v0.0.0-20211027215541-db492cf91b37 h1:Tx9kY6yUkLge/pFG7IEMwDZy6CS2ajFc9TvQdPCW0uA=
go4.org/unsafe/assume-no-moving-gc v0.0.0-20211027215541-db492cf91b37/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210309040221-94ec62e08169/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211113001501-0c823b97ae02/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7 h1:8IVLkfbr2cLhv0a/vKq4UFUcJym8RmDoDboxCFWEjYE=
golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

8
pkg/gmenu/run_windows.go

@ -1,8 +0,0 @@ @@ -1,8 +0,0 @@
// +build windows
package gmenu
func run(config *Config, runScript string, path string, waitUntilFinished, runInTerminal bool) error {
// TODO
return nil
}
Loading…
Cancel
Save