Closed
Bug 342169
Opened 18 years ago
Closed 18 years ago
Disable "Undo Close Tab" if no tabs to restore
Categories
(Firefox :: Tabbed Browser, defect)
Tracking
()
RESOLVED
FIXED
Firefox 2 beta2
People
(Reporter: dietrich, Assigned: dietrich)
References
Details
(Keywords: fixed1.8.1, Whiteboard: [swag: .5d])
Attachments
(1 file)
6.66 KB,
patch
|
mconnor
:
review+
mconnor
:
approval1.8.1+
|
Details | Diff | Splinter Review |
If there are no tabs to restore, disable this option in the tab context menu. See discussion at 254021 for more discussion.
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Updated•18 years ago
|
OS: Mac OS X 10.3 → All
Assignee | ||
Updated•18 years ago
|
Whiteboard: [swag: .5d]
Assignee | ||
Comment 1•18 years ago
|
||
This hides the menu, per mconnor's request. However, Simon's argument for discoverability makes sense IMO. I don't think having a disabled context menu item on tabs would be terribly discordant with our context-menu practices elsewhere, as the content window context menu has disabled items.
Attachment #226563 -
Flags: review?(mconnor)
Assignee | ||
Updated•18 years ago
|
Flags: blocking-firefox2?
Target Milestone: --- → Firefox 2 beta1
Comment 2•18 years ago
|
||
Comment on attachment 226563 [details] [diff] [review]
hides menu
>Index: base/content/browser.js
>+ AugmentTabs.undoCloseTabMenu.hidden = (ss.getClosedTabCount(window) > 0) ? false : true;
Why convert a boolean to a boolean? Why not:
....disabled = ss.getClosedTabCount(window) <= 0;
And as I already mentioned (and you acknowledged), items should really only be hidden depending on the direct context, otherwise they should just be disabled.
>Index: components/sessionstore/src/nsSessionStore.js
>+ if (tabState && tabState.Entry[0].url != "about:blank") {
Are you sure that there's no possibility that about:blank is just the first entry in the tab's history? If not, please also check for tabState.Entry.length == 1.
Updated•18 years ago
|
Flags: blocking-firefox2? → blocking-firefox2+
Updated•18 years ago
|
Target Milestone: Firefox 2 beta1 → Firefox 2 beta2
Comment 3•18 years ago
|
||
Comment on attachment 226563 [details] [diff] [review]
hides menu
>+ onTabContextMenuLoad: function at_onTabContextMenuLoad() {
>+ if (AugmentTabs.undoCloseTabMenu) {
>+ // only add the menu of there are tabs to restore
>+ var ss = Cc["@mozilla.org/browser/sessionstore;1"].
>+ getService(Ci.nsISessionStore);
>+ AugmentTabs.undoCloseTabMenu.hidden = (ss.getClosedTabCount(window) > 0) ? false : true;
>+ }
just do:
AugmentTabs.undoCloseTabMenu.hidden = !(ss.getClosedTabCount(window) > 0);
otherwise, r=me
Attachment #226563 -
Flags: review?(mconnor) → review+
Assignee | ||
Comment 4•18 years ago
|
||
Checked in on trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•18 years ago
|
Attachment #226563 -
Flags: approval1.8.1?
Updated•18 years ago
|
Attachment #226563 -
Flags: approval1.8.1? → approval1.8.1+
Assignee | ||
Updated•18 years ago
|
Keywords: fixed1.8.1
> And as I already mentioned (and you acknowledged), items should really only be
> hidden depending on the direct context, otherwise they should just be disabled.
Isn't this inconsistent with the current behavior of FF where actions are "disabled" instead of removed/hidden if the action cannot be performed? Why introduce another inconsistency? With FF 2.0 there have been a number of "new" inconsistencies introduced throughout the UI that just don't make sense...
~B
You need to log in
before you can comment on or make changes to this bug.
Description
•