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

RESOLVED FIXED in mozilla1.8beta2

Status

()

Core
History: Global
--
trivial
RESOLVED FIXED
14 years ago
13 years ago

People

(Reporter: JasnaPaka, Assigned: Stefan Borggraefe)

Tracking

Trunk
mozilla1.8beta2
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.40 KB, patch
neil@parkwaycc.co.uk
: review+
Details | Diff | Splinter Review
(Reporter)

Description

14 years ago
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.
(Assignee)

Comment 1

14 years ago
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

Comment 2

14 years ago
Confirming based on Stefan's repro.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 3

13 years ago
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?
(Assignee)

Comment 4

13 years ago
Created attachment 179111 [details] [diff] [review]
Patch

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 5

13 years ago
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-
(Assignee)

Comment 6

13 years ago
Created attachment 179126 [details] [diff] [review]
Patch V1.1

Like this?
Attachment #179111 - Attachment is obsolete: true
Attachment #179126 - Flags: review?(neil.parkwaycc.co.uk)

Comment 7

13 years ago
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+
(Assignee)

Comment 8

13 years ago
Fix checked in.
Status: NEW → RESOLVED
Last Resolved: 13 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
You need to log in before you can comment on or make changes to this bug.