Keyboard shortcut for "Clear History…" doesn't work until after menu is shown

RESOLVED FIXED

Status

Camino Graveyard
Toolbars & Menus
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: mike smith, Assigned: froodian (Ian Leue))

Tracking

({fixed1.8.1.1})

Details

Attachments

(1 attachment)

25.98 KB, application/zip
Smokey Ardisson (offline for a while; not following bugs - do not email)
: review+
Stuart Morgan
: superreview+
Details
(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en; rv:1.8.1.1pre) Gecko/20061201 Camino/1.1a1+
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en; rv:1.8.1.1pre) Gecko/20061201 Camino/1.1a1+

Keyboard shortcut for "Clear History…" doesn't work until History menu has been shown once. Then it works fine for remainder of session. 

Reproducible: Always

Steps to Reproduce:
1. Use system prefs to assign keyboard shortcut to "Clear History…"
2. Startup Camino.
3. Hit keyboard shortcut for "Clear History…"
4. Nothing happens.
5. Hit Command-Y to show history.
6. Hit keyboard shortcut for "Clear History…"
7. Nothing happens.
8. Open History menu.
9. Keyboard shortcut for "Clear History…" now works for remainder of session.




Comment in Mozilla forum from froodiantherapy: That menu item doesn't exist until the menu is shown. It's added after the history items (which are created programmatically, obviously). I don't see a reason why it couldn't exist in the nib though, and just have the history items added before it. File a bug.
(Assignee)

Comment 1

11 years ago
Created attachment 247239 [details]
Ne MainMenu.nib

Having actually looked at the code, what I suggested on the forum would be a huge PITA.  However, since we delete all items after the separator tagged 4000 every time we make the history menu items, we can safely add the menu item to the nib.  It'll get deleted before generating history items, and recreated afterwards.  So this just adds "Clear History…" to the nib and wires it to the appropriate method.
Assignee: nobody → stridey
Status: UNCONFIRMED → ASSIGNED
Attachment #247239 - Flags: review?(alqahira)
Comment on attachment 247239 [details]
Ne MainMenu.nib

Seems to work ok, and it didn't cause my Camino to explode, so r=ardissone
Attachment #247239 - Flags: review?(alqahira) → review+
For anyone who's lost, it's a *user-added* keyboard shortcut, of course ;)
(Assignee)

Updated

11 years ago
Attachment #247239 - Flags: superreview?(stuart.morgan)
(Reporter)

Comment 4

11 years ago
(In reply to comment #3)
> For anyone who's lost, it's a *user-added* keyboard shortcut, of course ;)
> 
I prefer to call it a *value-added* feature. So here's my rookie question: Would it be harder or easier just to hardwire a keyboard shortcut into your code? I don't know why anyone would object. 

Comment 5

11 years ago
Comment on attachment 247239 [details]
Ne MainMenu.nib

Sounds reasonable. sr=smorgan.
Attachment #247239 - Flags: superreview?(stuart.morgan) → superreview+
(Assignee)

Comment 6

11 years ago
Checked in on 1.8branch and trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Keywords: fixed1.8.1.1
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.