Skip to content

Commit

Permalink
Fixed a couple bugs relating to settings and wine apps
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebQ42 committed Jun 4, 2018
1 parent be64aa0 commit 828b9f4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type app struct {
icon *gdk.Pixbuf
dir string
ini *os.File
wine bool
}

func (a *app) getTreeIter(store *gtk.TreeStore) *gtk.TreeIter {
Expand Down Expand Up @@ -242,7 +243,11 @@ func (a *app) edit(parent *gtk.Window, reload func()) {
nameTxt.SetHExpand(true)
nameTxt.SetVExpand(false)
nameTxt.SetBorderWindowSize(gtk.TEXT_WINDOW_BOTTOM, 5)
txtBuf.SetText(tmp.name)
nameShow := tmp.name
if tmp.wine {
nameShow = strings.TrimSuffix(nameShow, " (Wine)")
}
txtBuf.SetText(nameShow)
vScrollName, _ := gtk.AdjustmentNew(0, 0, 0, 0, 0, 0)
hScrollName, _ := gtk.AdjustmentNew(0, 0, 0, 0, 0, 0)
nameScr, _ := gtk.ScrolledWindowNew(hScrollName, vScrollName)
Expand Down
1 change: 1 addition & 0 deletions settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func settingsUI(parent *gtk.Window, onExit func()) {
win.SetDefaultSize(600, 300)
win.SetPosition(gtk.WIN_POS_CENTER_ON_PARENT)
win.Connect("destroy", func() {
savePrefs()
parent.SetSensitive(true)
onExit()
})
Expand Down
1 change: 1 addition & 0 deletions setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func processApp(fold string) (out app) {
}
if len(out.lin) == 0 {
out.name += " (Wine)"
out.wine = true
}
return
}
Expand Down

0 comments on commit 828b9f4

Please sign in to comment.