A Toggle Viewer

I’m 90% deaf, so my volume is set to maximum…

if my head phones are unplugged, it’s other people that complain to me…

good job on the code so far…

john

You can add options in the plugin menu (under a submenu by the same name as the plugin). Toolbars are for fast access while menus are a more general way to access all commands.

Thank you for this suggestion and I shall have a go at that. Don’t hold your breath though - I’m busy on other things at the moment!

just noticed your extension always turns the toolbar on…

you need this fix or equivalent…

@toolbar.get_last_state  == TB_NEVER_SHOWN ? @toolbar.show : @toolbar.restore

john

It is a bit unclear what show and restore does but I think @tt_su said in one thread that one of them (not sure which) could be used without any conditionals, and should automatically honor the user setting. It could also be differing between platforms.

:restore does not ‘show’ on first run on a mac so you need to find it in the toolbars menu and turn it on…

:show as we know, ignores the users choice to hide the toolbar on re-starts…

after first run the conditional isn’t needed…

john

Sounds like a bug in the Mac version.

maybe you should add a preference to ‘Mute’ the sounds…

Fixed, so you can throw away the ear-plugs. Alerts are controlled with a ‘Play Sounds’ toggle under Toggler in the Extensions menu. This setting is stored across sessions. I read the recent posts about how best to store settings but as it’s simply a yes/no parameter I’m afraid I resorted to write_default/read_default.

just noticed your extension always turns the toolbar on…

And thanks for pointing this out. This is now fixed using your suggestion.

I also found an error in the Unexplode function which is now fixed and I removed a load of cruft that was left over from my experiments with SceneObserver/PageObserver.

Version 0.2 now in original post

2 Likes