mirror of
https://github.com/nwg-piotr/nwg-drawer.git
synced 2024-10-05 17:58:02 +03:00
name property for category buttons
This commit is contained in:
parent
cd6e544adc
commit
f54be1c13a
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.1.2"
|
||||
const version = "0.1.3"
|
||||
|
||||
var (
|
||||
appDirs []string
|
||||
|
@ -113,6 +113,7 @@ func setUpCategoriesButtonBox() *gtk.EventBox {
|
||||
hBox, _ := gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 0)
|
||||
eventBox.Add(hBox)
|
||||
button, _ := gtk.ButtonNewWithLabel("All")
|
||||
button.SetProperty("name", "category-button")
|
||||
button.Connect("clicked", func(item *gtk.Button) {
|
||||
searchEntry.SetText("")
|
||||
appFlowBox = setUpAppsFlowBox(nil, "")
|
||||
@ -126,6 +127,7 @@ func setUpCategoriesButtonBox() *gtk.EventBox {
|
||||
for _, cat := range categories {
|
||||
if isSupposedToShowUp(cat.Name) {
|
||||
button, _ = gtk.ButtonNewFromIconName(cat.Icon, gtk.ICON_SIZE_MENU)
|
||||
button.SetProperty("name", "category-button")
|
||||
catButtons = append(catButtons, button)
|
||||
button.SetLabel(cat.DisplayName)
|
||||
hBox.PackStart(button, false, false, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user