Closed Bug 261544 Opened 20 years ago Closed 19 years ago

Menu items "Delete host" and "Delete domain" aren't visible when history tree is empty

Categories

(Core Graveyard :: History: Global, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8beta2

People

(Reporter: JasnaPaka, Assigned: Stefan.Borggraefe)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.8a3) Gecko/20040817
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.8a3) Gecko/20040817

1) I run Mozilla 1.8a3 with Profile manager.
2) I create new profile and run Mozilla with this profile.
3) I go to mainmenu "Go -> History" (Ctrl+H).
4) This item opens new dialog (History).
5) I choose Edit in mainmenu. There is a problem becouse items "Delete host" and
"Delete domain" aren't visible. This items are empty. 

When i click on "Delete host", this item is visible now.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Confirming with a Linux build from today. You can also clear the history and
open the History Window to see this bug.
Assignee: nobody → Stefan.Borggraefe
Severity: normal → trivial
OS: Windows XP → All
Hardware: PC → All
Confirming based on Stefan's repro.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I think that add these lines to file history.js fix this problem

file: comm.jar!\content\communicator\history
function: function HistoryCommonInit()

add lines:
gDeleteByHostname.label = gHistoryBundle.getString("deleteHostNoSelection");    
gDeleteByDomain.label = gHistoryBundle.getString("deleteDomainNoSelection");

What do you think?
Attached patch Patch (obsolete) — Splinter Review
updateHistoryCommands(); takes care for the menu items.

I also fixed the exception that is caused by
HistoryTree.view.selection.select(0); when the tree is empty.
Attachment #179111 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 179111 [details] [diff] [review]
Patch

In the history manager gHistoryTree.view.selection.select(0) (usually) already
calls updateHistoryCommands via the select event, so I'd appreciate it if you
didn't call it twice in this case. Of course you still need to select the first
row in the sidebar.
Attachment #179111 - Flags: review?(neil.parkwaycc.co.uk) → review-
Attached patch Patch V1.1Splinter Review
Like this?
Attachment #179111 - Attachment is obsolete: true
Attachment #179126 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 179126 [details] [diff] [review]
Patch V1.1

Yeah, that works. r+sr=me
Attachment #179126 - Flags: review?(neil.parkwaycc.co.uk) → review+
Fix checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Summary: Items "Delete host" and "Delete domain" aren't visible when new profile has been created → Menu items "Delete host" and "Delete domain" aren't visible when history tree is empty
Target Milestone: --- → mozilla1.8beta2
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: