Message:
Instead of having one ToolbarButtonUi controlled by two ToolbarButton-s
(SubmenuToolbarWidget and ToolbarToggleButton) whose state is not
synchronized, SubmenuToolbarWidget now inherits ToolbarToggleButton.
This obviously changes the public API (including exposing the
setListener(ToolbarToggleButton.Listener) method) but
SubmenuToolbarWidget is an "implementation detail": everyone actually
sees it as a SubmenuToolbarView, so it shouldn't cause any breakage or
issue in practice.
That was simpler than ensuring all methods correctly delegated to the
"wrapped" ToolbarToggleButton (which would have become wrapped; it
current is not, which is part of the problem).
Tested on the project I had the issue (DevMode, no unit test).
Please review this at http://codereview.waveprotocol.org/616001
Affected files:
M
src/org/waveprotocol/wave/client/widget/toolbar/SubmenuToolbarWidget.java
M
src/org/waveprotocol/wave/client/widget/toolbar/ToplevelToolbarWidget.java
M
src/org/waveprotocol/wave/client/widget/toolbar/buttons/AbstractToolbarButton.java
M
src/org/waveprotocol/wave/client/widget/toolbar/buttons/ToolbarClickButton.java
M
src/org/waveprotocol/wave/client/widget/toolbar/buttons/ToolbarToggleButton.java