Skip to content

BugFix: repair "prevent all controls from being hidden" feature#5445

Merged
SlySven merged 1 commit intoMudlet:developmentfrom
SlySven:BugFix_repair_preventAllControlsFromBeingHidden_feature
Sep 25, 2021
Merged

BugFix: repair "prevent all controls from being hidden" feature#5445
SlySven merged 1 commit intoMudlet:developmentfrom
SlySven:BugFix_repair_preventAllControlsFromBeingHidden_feature

Conversation

@SlySven
Copy link
Copy Markdown
Member

@SlySven SlySven commented Sep 23, 2021

It seems, I think that the removal of the "default host" profile (in #2950) broke the logic that detected that any "real" profiles were loaded and prevented both the main menu bar and the main toolbar from being hidden when no such profiles were active. As it is now it is not possible to hide both the main menu and the main toolbar AFTER a profile is loaded - even though we provide the settings that are suppose to allow that.

The original enum used to encode the wanted settings for the visibility of those two items used a cunning combination of bit patterns (and some application of DeMorgan's laws) to work out what the visibility settings are and what state the application is in (number of profiles active) so as to show or hide the main menu and main toolbars. Unfortunately I've lost track of how I put it together when the single "default host" profile was included in the count so had to rewrite the logic tests without changing the enum values.

Signed-off-by: Stephen Lyons slysven@virginmedia.com

Release post highlight

You can now hide both the Main Menu and Toolbar (after a profile is loaded) again.

It seems, *I think* that the removal of the "default host" profile (in
Mudlet#2950) broke the logic that detected that any "real" profiles were loaded
and prevented both the main menu bar and the main toolbar from being hidden
when no such profiles were active. As it is now it is not possible to hide
both the main menu and the main toolbar AFTER a profile is loaded - even
though we provide the settings that are suppose to allow that.

The original `enum` used to encode the wanted settings for the visibility
of those two items used a cunning combination of bit patterns (and some
application of DeMorgan's laws) to work out what the visibility settings
are and what state the application is in (number of profiles active) so as
to show or hide the main menu and main toolbars. Unfortunately I've lost
track of how I put it together when the single "default host" profile
was included in the count so had to rewrite the logic tests without
changing the `enum` values.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@SlySven SlySven requested a review from a team as a code owner September 23, 2021 20:28
@SlySven SlySven requested a review from a team September 23, 2021 20:28
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Sep 23, 2021

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@SlySven
Copy link
Copy Markdown
Member Author

SlySven commented Sep 23, 2021

Marking this as a medium bugfix as it is not fatal to the application - but a pain if you want to hide both the menu and the toolbar.

Current development code - showing the main toolbar when it should be hidden:
image

Same code and settings when "cancel" is clicked on the "Connection Preferences" dialogue at startup and the main toolbar is hidden by right-clicking on it and unchecking it on the built-in context menu:
image

Note that this was brought to my attention by the Discord user jbear#9576 in the #help channel:

jbear — 19/09/2021
Hey there. I want to hide the menu bar and the main toolbar, but I'm worried that if I set both to "Show ... never," I won't know how to get them back, or call up the script editor. Any suggestions?

...

SlySven — 20/09/2021
If one is set to "Never" and the other is "Show until a profile is loaded" you can get one or the other back by right click on the main console - but when I tried to set that up to show the extra menu items - I found that the "unless" one didn't disappear when I loaded a profile. So there seems to be a 🐞 right now that prevents you losing both sets of controls...
🔎
Taking a quick look at the code!

jbear — 20/09/2021
Cool. I appreciate your looking into it.

Copy link
Copy Markdown
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

@SlySven SlySven merged commit a068e96 into Mudlet:development Sep 25, 2021
@SlySven SlySven deleted the BugFix_repair_preventAllControlsFromBeingHidden_feature branch September 25, 2021 10:04
@vadi2 vadi2 added this to the 4.14.0 milestone Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants