(action *Action, visibleChanged bool)
| 476 | } |
| 477 | |
| 478 | func (tb *ToolBar) removeAction(action *Action, visibleChanged bool) error { |
| 479 | index := tb.actions.indexInObserver(action) |
| 480 | |
| 481 | if !visibleChanged { |
| 482 | action.removeChangedHandler(tb) |
| 483 | } |
| 484 | |
| 485 | if 0 == tb.SendMessage(win.TB_DELETEBUTTON, uintptr(index), 0) { |
| 486 | return newError("SendMessage(TB_DELETEBUTTON) failed") |
| 487 | } |
| 488 | |
| 489 | tb.RequestLayout() |
| 490 | |
| 491 | return nil |
| 492 | } |
| 493 | |
| 494 | func (tb *ToolBar) onInsertedAction(action *Action) error { |
| 495 | return tb.insertAction(action, false) |
no test coverage detected