Closed matthijskooijman closed 3 years ago
Looks good to me. Though I wonder why you keep show_menu()
since it's not used.
Hm, good point. I guess I assumed it served a purpose, but if it's not used I could also remove it. Any thoughts from others?
Even if show()
/ show_menu()
is removed, I guess renaming toggle()
to toggle_menu()
might be good, to emphasize that it toggles the menu, not the panel widget itself.
I also agree with removing show() (assuming it is not really necessary) and renaming toggle_menu().
Thanks for the feedback, I've updated the PR to remove show()
instead, and moved the toggle_menu()
change into its own commit.
Note that since v2.6, the status-area-horizontal-spacing extension no longer calls hide()
and show()
, so that conflict is no longer present, but it is still good to fix this at the hamster end.
This widget defined a
show()
method, which would show the menu. However,show()
is already a method defined by some class higher up in the hierarchy, which makes the widget in the status area visible. By defining ashow()
method here, the behavior of theshow()
method changes, causing issues.One such issue showed when combining this extension with the status-area-horizontal-spacing extension, which calls
hide()
andshow()
on each widget in the status area. With the overriddenshow()
method in the hamster extension, this would hide the widget and then show the menu, breaking the extension because the widget would stay hidden.This commit renames
show()
toshow_menu()
to prevent to conflict. It seems that the method was not actually used, so no references were updated. For consistency,toggle()
is also renamed totoggle_menu()
, with one reference updated.