mirror of
https://github.com/nwg-piotr/nwg-drawer.git
synced 2024-08-16 17:20:22 +03:00
hide empty file search result wrapper box
This commit is contained in:
parent
81350bf746
commit
ba2ff5345b
BIN
bin/nwg-drawer
BIN
bin/nwg-drawer
Binary file not shown.
2
main.go
2
main.go
@ -19,7 +19,7 @@ import (
|
||||
"github.com/gotk3/gotk3/gtk"
|
||||
)
|
||||
|
||||
const version = "0.0.1"
|
||||
const version = "0.0.2"
|
||||
|
||||
var (
|
||||
appDirs []string
|
||||
|
@ -314,14 +314,11 @@ func setUpSearchEntry() *gtk.SearchEntry {
|
||||
for key := range userDirsMap {
|
||||
if key != "home" {
|
||||
fileSearchResults = nil
|
||||
if len(fileSearchResults) == 0 {
|
||||
fileSearchResultFlowBox.Show()
|
||||
}
|
||||
searchUserDir(key)
|
||||
}
|
||||
}
|
||||
if fileSearchResultFlowBox.GetChildren().Length() == 0 {
|
||||
fileSearchResultFlowBox.Hide()
|
||||
fileSearchResultWrapper.Hide()
|
||||
statusLabel.SetText("0 results")
|
||||
}
|
||||
} else {
|
||||
@ -335,6 +332,7 @@ func setUpSearchEntry() *gtk.SearchEntry {
|
||||
fileSearchResultFlowBox.Destroy()
|
||||
}
|
||||
appFlowBox = setUpAppsFlowBox(nil, "")
|
||||
fileSearchResultWrapper.Hide()
|
||||
}
|
||||
})
|
||||
searchEntry.Connect("focus-in-event", func() {
|
||||
|
Loading…
Reference in New Issue
Block a user