support possible error
This commit is contained in:
BIN
bin/nwg-drawer
BIN
bin/nwg-drawer
Binary file not shown.
8
main.go
8
main.go
@@ -314,11 +314,13 @@ func main() {
|
||||
// Focus 1st pinned item if any, otherwise focus 1st found app icon
|
||||
var button gtk.IWidget
|
||||
if pinnedFlowBox.GetChildren().Length() > 0 {
|
||||
button, _ = pinnedFlowBox.GetChildAtIndex(0).GetChild()
|
||||
button, err = pinnedFlowBox.GetChildAtIndex(0).GetChild()
|
||||
} else {
|
||||
button, _ = appFlowBox.GetChildAtIndex(0).GetChild()
|
||||
button, err = appFlowBox.GetChildAtIndex(0).GetChild()
|
||||
}
|
||||
if err == nil {
|
||||
button.ToWidget().GrabFocus()
|
||||
}
|
||||
button.ToWidget().GrabFocus()
|
||||
|
||||
userDirsMap = mapXdgUserDirs()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user