Closed Bug 362543 Opened 18 years ago Closed 18 years ago

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

Categories

(Camino Graveyard :: Toolbars & Menus, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stonetownmike, Assigned: froodian)

Details

(Keywords: fixed1.8.1.1)

Attachments

(1 file)

25.98 KB, application/zip
alqahira
: review+
stuart.morgan+bugzilla
: superreview+
Details
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.
Attached file 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 ;)
Attachment #247239 - Flags: superreview?(stuart.morgan)
(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 on attachment 247239 [details]
Ne MainMenu.nib

Sounds reasonable. sr=smorgan.
Attachment #247239 - Flags: superreview?(stuart.morgan) → superreview+
Checked in on 1.8branch and trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 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.

Attachment

General

Created:
Updated:
Size: