mirror of
https://github.com/nwg-piotr/nwg-drawer.git
synced 2024-09-11 14:07:17 +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"
|
"github.com/gotk3/gotk3/gtk"
|
||||||
)
|
)
|
||||||
|
|
||||||
const version = "0.0.1"
|
const version = "0.0.2"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
appDirs []string
|
appDirs []string
|
||||||
|
@ -314,14 +314,11 @@ func setUpSearchEntry() *gtk.SearchEntry {
|
|||||||
for key := range userDirsMap {
|
for key := range userDirsMap {
|
||||||
if key != "home" {
|
if key != "home" {
|
||||||
fileSearchResults = nil
|
fileSearchResults = nil
|
||||||
if len(fileSearchResults) == 0 {
|
|
||||||
fileSearchResultFlowBox.Show()
|
|
||||||
}
|
|
||||||
searchUserDir(key)
|
searchUserDir(key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if fileSearchResultFlowBox.GetChildren().Length() == 0 {
|
if fileSearchResultFlowBox.GetChildren().Length() == 0 {
|
||||||
fileSearchResultFlowBox.Hide()
|
fileSearchResultWrapper.Hide()
|
||||||
statusLabel.SetText("0 results")
|
statusLabel.SetText("0 results")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -335,6 +332,7 @@ func setUpSearchEntry() *gtk.SearchEntry {
|
|||||||
fileSearchResultFlowBox.Destroy()
|
fileSearchResultFlowBox.Destroy()
|
||||||
}
|
}
|
||||||
appFlowBox = setUpAppsFlowBox(nil, "")
|
appFlowBox = setUpAppsFlowBox(nil, "")
|
||||||
|
fileSearchResultWrapper.Hide()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
searchEntry.Connect("focus-in-event", func() {
|
searchEntry.Connect("focus-in-event", func() {
|
||||||
|
Loading…
Reference in New Issue
Block a user