Closed Bug 357560 Opened 18 years ago Closed 17 years ago

Switch to use native NSSearchField widget in Privacy sheets

Categories

(Camino Graveyard :: Preferences, defect)

PowerPC
macOS
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Camino1.6

People

(Reporter: stuart.morgan+bugzilla, Assigned: stuart.morgan+bugzilla)

References

Details

(Keywords: fixed1.8.1.8)

Attachments

(2 files, 3 obsolete files)

This is the baby cousin of bug 330666; it's really easy to do here, and not related to the other uses.
Attached patch use NSSearchField (obsolete) — Splinter Review
Attachment #243069 - Flags: review?
Attached file new nib (obsolete) —
Just swaps out the fields.  Tab order should still all be fine.
Attached patch with sdk workaround (obsolete) — Splinter Review
I forget to make it build against the 10.2 SDK.
Attachment #243069 - Attachment is obsolete: true
Attachment #243122 - Flags: review?
Attachment #243069 - Flags: review?
Attachment #243122 - Flags: review? → review?(stridey)
With this patch/nib combo, hitting return just loses the focus around the search field - it doesn't actually "push" the default button.
Comment on attachment 243122 [details] [diff] [review]
with sdk workaround

I talked to smokey about this in channel, and apparently what we said is that this is worth living with, since it's uncommon that users open the sheet, search, and try to close without acting on the actions.  On that premise, r=me.  A followup bug seems like it'd be a good idea though.
Attachment #243122 - Flags: review?(stridey) → review+
Comment on attachment 243122 [details] [diff] [review]
with sdk workaround

I talked to smokey about this in channel, and apparently what we said is that this is worth living with, since it's uncommon that users open the sheet, search, and try to close without acting on the actions.  On that premise, r=me.  A followup bug seems like it'd be a good idea though.
Attachment #243122 - Flags: superreview?(mikepinkerton)
i think we should fix the return issue before we land this. i think it'll be more annoying that you think, especially since that field is focused by default.
(In reply to comment #7)
> i think we should fix the return issue before we land this.

Unfortunately, there doesn't seem to be a way to do that without subclassing NSSearchField, which I believe means this is blocked on moving to the 10.3 SDK.
Comment on attachment 243122 [details] [diff] [review]
with sdk workaround

Removing sr flag.  We're on the 10.3 SDK now, so we can do this properly.
Attachment #243122 - Flags: superreview?(mikepinkerton)
Attached patch v3Splinter Review
New version. After all that, it turned out that I didn't need to subclass after all.
Attachment #243122 - Attachment is obsolete: true
Attachment #269801 - Flags: review?(froodian)
Attached file new nib
The change is easy for me to re-make to other nibs, so it's not a big deal that this will rot the other Privacy nib.

Someone should check that IB 3 was behaving when it saved this, and that it's still editable with older tools.
Attachment #243070 - Attachment is obsolete: true
FWIW, it takes me two tries to open the nib, and I get this sort of console spew:

2007-06-26 01:23:08.137 Interface Builder[18326] **** verification error ****: <NSCustomObject: 0x58419a0> has an invalid object id -3 (must be < 759)

2007-06-26 01:23:08.469 Interface Builder[18326] *** Assertion failure in -[NSMenu itemAtIndex:], Menus.subproj/NSMenu.m:638

2007-06-26 01:23:08.470 Interface Builder[18326] Invalid parameter not satisfying: (index >= 0) && (index < (_itemArray ? CFArrayGetCount(_itemArray) : 0))

I can open and edit it, but the problem persists on subsequent tries.  Dunno if it's the IB 3 or IB on 10.3.9 showing its age :p
Attachment #269801 - Attachment is patch: true
Attachment #269801 - Attachment mime type: application/octet-stream → text/plain
Attachment #269801 - Flags: review?(froodian) → review?(murph)
Comment on attachment 269801 [details] [diff] [review]
v3

Looks A-OK here.  Nice technique allowing the default button to trigger without hard-coding specifically which button.

I just want to point out that there is now a short delay before the search field's filtering action is invoked.  This is the way NSSearchFields work by default (-[NSSearchFieldCell setSendsSearchStringImmediately:] alters the invocation, but is 10.4+ only).  Definitely not a problem and I only chose to mention it for the sake of detail, and the fact that it does differ from previous behavior in this pane.

Also, I experience the same trouble Smokey did in comment 22 when opening up the nib, using IB 2.5.4 on 10.4.  IB3 must have done something bad.

Finally, just keep an eye on pointer placement (Object* vs. Object *).  There are some minor inconstancies within the patch (and the entire file seems divided, as usual!).
Attachment #269801 - Flags: superreview?(mikepinkerton)
Attachment #269801 - Flags: review?(murph)
Attachment #269801 - Flags: review+
(I'll fix the nib and the style inconsistencies on checkin if there's nothing else needing a change from sr)
Comment on attachment 269801 [details] [diff] [review]
v3

sr=pink
Attachment #269801 - Flags: superreview?(mikepinkerton) → superreview+
Landed on trunk and MOZILLA_1_8_BRANCH.
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: fixed1.8.1.7
Resolution: --- → FIXED
Target Milestone: --- → Camino1.6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: