Closed Bug 325939 Opened 19 years ago Closed 18 years ago

Cmd-click in bookmarks toolbar does not respect standard shift toggle

Categories

(Camino Graveyard :: Toolbars & Menus, defect)

PowerPC
macOS
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Camino1.5

People

(Reporter: bugzilla-graveyard, Assigned: bugzilla-graveyard)

Details

(Keywords: fixed1.8.1)

Attachments

(1 file, 2 obsolete files)

The shift key is our standard foreground/background toggle, but we forgot to hook it up for cmd-clicking on bookmarks in the Bookmarks toolbar. Original fix was bug 228478.
I brought this up in bug 228840, and there's a fix for it in the patch there.  Since that patch needs to be reworked anyway, and the fix for this is an easily separable part (just snag the MainController.mm change) it might be worth separating that out to a new patch here and landing it sooner.
Attached patch lets shift key toggle pref (obsolete) — Splinter Review
Totally untested but looks likely to work ;)

(OK, Håkan tested it in the other bug...)

cl
Assignee: mikepinkerton → bugzilla
Status: NEW → ASSIGNED
Attachment #210737 - Flags: superreview?(mikepinkerton)
Attachment #210737 - Flags: review?(stuart.morgan)
Comment on attachment 210737 [details] [diff] [review]
lets shift key toggle pref

I also tested it in the other bug, and it works.
Attachment #210737 - Flags: review?(stuart.morgan) → review+
*** Bug 326055 has been marked as a duplicate of this bug. ***
Comment on attachment 210737 [details] [diff] [review]
lets shift key toggle pref

sr=pink
Attachment #210737 - Flags: superreview?(mikepinkerton) → superreview+
Is this 1.0 material?

Setting to 1.1 and adding [patch] so we know there's an r/sr'd patch in the event it's not 1.0 stuff.
Summary: Cmd-click in bookmarks toolbar does not respect standard shift toggle → [patch] Cmd-click in bookmarks toolbar does not respect standard shift toggle
Target Milestone: --- → Camino1.1
Comment on attachment 210737 [details] [diff] [review]
lets shift key toggle pref

GetCurrentKeyModifiers() sucks, because it's not event-synchronized.  GetCurrentEventKeyModifiers() is better.  See http://developer.apple.com/documentation/Carbon/Conceptual/Carbon_Event_Manager/Tasks/chapter_3_section_7.html .

This is Cocoa, not Carbon, so [[NSApp currentEvent] modifiers] is the closest analogue to GetCurrentEventKeyModifiers().
Attachment #210737 - Flags: review-
Summary: [patch] Cmd-click in bookmarks toolbar does not respect standard shift toggle → Cmd-click in bookmarks toolbar does not respect standard shift toggle
Yes, please do not use the carbon event stuff - that only introduces new bugs (see bug 317214 where I'm fixing a few of them).

In fact, if we still have uses left of that in the tree - we should convert them to [[NSApp currentEvent] modifiers]. 
(In reply to comment #8)
> Yes, please do not use the carbon event stuff - that only introduces new bugs
> (see bug 317214 where I'm fixing a few of them).
> 
> In fact, if we still have uses left of that in the tree - we should convert
> them to [[NSApp currentEvent] modifiers]. 

Bug 320746.

cl
Attached patch fixed to be more Cocoa-friendly (obsolete) — Splinter Review
Here's a more Cocoa-friendly patch.

Someone should probably test this before it gets checked in ;)

cl
Attachment #210737 - Attachment is obsolete: true
Attachment #216486 - Flags: review?(mark)
Oops. The last one was broken. This one actually works.

cl
Attachment #216486 - Attachment is obsolete: true
Attachment #216487 - Flags: review?(mark)
Attachment #216486 - Flags: review?(mark)
Comment on attachment 210737 [details] [diff] [review]
lets shift key toggle pref

Clearing + flags on obsolete attachment.
Attachment #210737 - Flags: superreview+
Attachment #210737 - Flags: review+
Comment on attachment 216487 [details] [diff] [review]
patch that actually works

>+  if (([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask) != 0)

|!= 0| is redundant and it harms readability.  I'll remove it on checkin.
Attachment #216487 - Flags: superreview+
Attachment #216487 - Flags: review?(mark)
Attachment #216487 - Flags: review+
MainController.mm 1.175 HEAD, 1.142.2.31 MOZILLA_1_8_BRANCH.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: