piroor / informationaltab

Informational Tab, Provides thumbnail, progress meter, or others to each tab.
http://piro.sakura.ne.jp/xul/informationaltab/
4 stars 5 forks source link

Close button issues #22

Open Vampire opened 8 years ago

Vampire commented 8 years ago

There are some confusing things about the "Close button" options.

piroor commented 8 years ago

Thanks, I've updated the configuration UI by the commit b282e7b08df5982ec5066810b468c89f08250184

piroor commented 8 years ago

What is the difference between "Show only when the last tab can be closed" with "Allow to close the last tab" and "Show always"?

When "Show always" is selected, you can accidentally close the window itself by repeatedly clicking on closebox of the first tab. The first choice avoids such a trouble.

When is the condition "Show only when the last tab can be closed" true except when activating "Allow to close the last tab"? I can middle-click the last tab to close the window, so I would say it is closeable, but no close button is displayed.

The condition becomes true only when the "Allow to..." checkbox is true (it means browser.tabs.closeWindowWithLastTab=false in about:config). Middle-click on a tab is not controlled, because the configuration affects only for the visibility of closebox in each tab.

Closing last tab behaves differently to FF standard Without the plugin or with options set so that the close button is not shown, middle-clicking the last tab of a window closes the window. With the close button shown, clicking the close button or even middle-clicking the tab opens a new blank tab instead of closing the window.

It is an old behavior of Firefox itself. When Firefox's default behavior was changed to the present one, the secret preference browser.tabs.closeWindowWithLastTab was also introduced for users who like the old behavior. This addon just provides GUI to change the preference without about:config.

Vampire commented 8 years ago

Ah, I see, but then the configuration dialog is still confusing I'd say. I as user see both closing variants (new blank tab is opened or window is closed) as closing of the tab. Maybe the option can be renamed to something like "Close of sole tab closes window" or "Close of sole tab opens new blank tab" or something like that.

And also the wording of the first radio button should maybe changed to somthing that does not refer to "closing" the tab, but to something like "show only if closing the sole tab does not close the window" or something like that.

Also it looks like this checkbox is a sub-option of the first radio button as it is indented, but actually it is independent and also influences the behaviour of middle-click or the close button if it is always shown. So this option is also not related to the close-button per-se.

It changes behaviour of firefox in general. (middle-mouse click, Ctrl+W, ...) and it also persists even if you uninstall your extension. So I guess a warning that this option influences FF behaviour, even after the Extension is removed would maybe nice. And an own tab for it in the Preferences maybe, or at least not as sub-option of the first radio button.

piroor commented 8 years ago

"Close of sole tab closes window" "show only if closing the sole tab does not close the window"

Thanks! Both labels seem better than mine, so I've merged them. 01832c25d7c9c57e57dc4641c31cb601aabc62e5

piroor commented 8 years ago

Also it looks like this checkbox is a sub-option of the first radio button as it is indented, but actually it is independent and also influences the behaviour of middle-click or the close button if it is always shown. So this option is also not related to the close-button per-se.

Yes, I agree. By b282e7b08df5982ec5066810b468c89f08250184 the checkbox is now placed above radio buttons.

Vampire commented 8 years ago

Just to be sure, by changing the text to "Close of sole tab closes window" you invert the meaning of the checkbox, so you need to invert the checked state also. :-)

piroor commented 8 years ago

It is already done. In old versions the checkbox was inverted for the preference, and now it is just synchronized - "checked" means browser.tabs.closeWindowWithLastTab=true.

Vampire commented 8 years ago

ok, great :-)