3 Commits

Author SHA1 Message Date
Piotr Miller
955429d809 Merge pull request #7 from nwg-piotr/fix_pinned
Fix GTK critical warnings on pinned cache file not found
2021-07-12 23:32:41 +02:00
piotr
4bf82d9a98 bump to 0.1.4 2021-07-12 23:26:26 +02:00
piotr
eb358b24cd fix GTK warnings on pinned cache not found #6 2021-07-12 23:23:52 +02:00
3 changed files with 9 additions and 7 deletions

Binary file not shown.

View File

@@ -19,7 +19,7 @@ import (
"github.com/gotk3/gotk3/gtk"
)
const version = "0.1.3"
const version = "0.1.4"
var (
appDirs []string
@@ -172,6 +172,7 @@ func main() {
if err != nil {
pinned = nil
}
println(fmt.Sprintf("Found %v pinned items", len(pinned)))
cssFile := filepath.Join(configDirectory, *cssFileName)

View File

@@ -17,7 +17,7 @@ func setUpPinnedFlowBox() *gtk.FlowBox {
flowBox, _ := gtk.FlowBoxNew()
if uint(len(pinned)) >= *columnsNumber {
flowBox.SetMaxChildrenPerLine(*columnsNumber)
} else {
} else if len(pinned) > 0 {
flowBox.SetMaxChildrenPerLine(uint(len(pinned)))
}
@@ -78,16 +78,17 @@ func setUpPinnedFlowBox() *gtk.FlowBox {
})
flowBox.Add(btn)
}
pinnedFlowBoxWrapper.PackStart(flowBox, true, false, 0)
//While moving focus with arrow keys we want buttons to get focus directly
flowBox.GetChildren().Foreach(func(item interface{}) {
item.(*gtk.Widget).SetCanFocus(false)
})
}
flowBox.Connect("enter-notify-event", func() {
cancelClose()
})
pinnedFlowBoxWrapper.PackStart(flowBox, true, false, 0)
//While moving focus with arrow keys we want buttons to get focus directly
flowBox.GetChildren().Foreach(func(item interface{}) {
item.(*gtk.Widget).SetCanFocus(false)
})
flowBox.ShowAll()
return flowBox