Closed Bug 330666 Opened 18 years ago Closed 17 years ago

Switch to use native NSSearchField widget in toolbar and search sheet

Categories

(Camino Graveyard :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Camino1.6

People

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

References

Details

(Keywords: fixed1.8.1.8)

Attachments

(2 files, 1 obsolete file)

Since we now go to 10.3, we can start using the native NSSearchField widget. For one it would mean less code to maintain (bugs like bug 329673).

Another reason is for example some software that would have an easier time integrating with Camino if we did this natively (although he seems to have succeeded now):

http://www.flickr.com/photos/xlife/113206139
Another good reason to do away with our custom class is that it's not accessible, like the standard one is.
Assignee: mikepinkerton → nobody
Keywords: access
QA Contact: general
Target Milestone: --- → Camino1.2
Version: Trunk → unspecified
Privacy prefPane search fields are in bug 357560, so this is just for the toolbar and the Bookmarks Manager.
Summary: Switch to use native NSSearchField widget → Switch to use native NSSearchField widget in toolbar and Bookmarks Manager
And now the Bookmark Manager is bug 358620.
Summary: Switch to use native NSSearchField widget in toolbar and Bookmarks Manager → Switch to use native NSSearchField widget in toolbar
Taking.  It looks like we'll need a subclass of NSSearchFieldCell to do the hint text, so this will have to wait for the SDK.
Assignee: nobody → stuart.morgan
Summary: Switch to use native NSSearchField widget in toolbar → Switch to use native NSSearchField widget in toolbar and search sheet
Isn't the hint text just the placeholderString?
Whoops, yeah.  I'll take another look.
No longer blocks: 311840
The bigger issue turned out to be the custom drag-and-drop support (possible among other things); we'll probably want to hold off until after 1.1 to avoid accidently regressing some aspect of its behavior this late in the game.
Blocks: 358526
Mass un-setting milestone per 1.6 roadmap.

Filter on RemoveRedonkulousBuglist to remove bugspam.

Developers: if you have a patch in hand for one of these bugs, you may pull the bug back to 1.6 *at that point*.
Target Milestone: Camino1.6 → ---
Attached patch fix (obsolete) — Splinter Review
Replaces the toolbar/sheet search field with a small NSSearchField subclass. All our custom behavior (control character stripping, drag-and-drop support, etc.) should continue to work. This is a trunk version; the project is likely to rot anyway so I'll wait to do a branch project patch until it's ready to land.

Once this and the privacy pane switch land, I'll rip out SearchTextField and all the associated classes and images in another bug.
Attachment #275293 - Flags: review?(joshmoz)
Attached file New nib
Target Milestone: --- → Camino1.6
Attachment #275293 - Flags: review?(joshmoz) → review?(hwaara)
Comment on attachment 275293 [details] [diff] [review]
fix

Nice cleanup!

Seems like you missed to post the diff of WebSearchField.* ... If you want, you can post it as a separate diff.

I only have one nit in this diff: please don't use |aFoo| variable names unless they are arguments - it can be very confusing. I know that the previous code already did this, but since you're refactoring it...
Attachment #275293 - Flags: review?(hwaara) → review+
Attached patch v2Splinter Review
> Seems like you missed to post the diff of WebSearchField.*

Doh! Fixed.

> please don't use |aFoo| variable names unless they are arguments

Agreed and fixed.
Attachment #275293 - Attachment is obsolete: true
Attachment #277054 - Flags: review?(hwaara)
Comment on attachment 277054 [details] [diff] [review]
v2

>+// Changes the current search engine setting to the one names |engineName|.
>+- (void)setCurrentSearchEngine:(NSString*)engineName

Typo: "names"?

>+  NSMenu* engineMenu = [[[NSMenu alloc] initWithTitle:@"Search Engines"] autorelease];

This will have to be localized, so shouldn't you use NSLocalizedString?
Attachment #277054 - Flags: review?(hwaara) → review+
(In reply to comment #15)
> >+  NSMenu* engineMenu = [[[NSMenu alloc] initWithTitle:@"Search Engines"] autorelease];
> 
> This will have to be localized, so shouldn't you use NSLocalizedString?

The name of the menu doesn't matter, and isn't user-visible.
Attachment #277054 - Flags: superreview?(mikepinkerton)
Comment on attachment 277054 [details] [diff] [review]
v2

sr=pink
Attachment #277054 - Flags: superreview?(mikepinkerton) → superreview+
Landed on trunk and MOZILLA_1_8_BRANCH. Yay!
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: accessfixed1.8.1.7
Resolution: --- → FIXED
The nib was missing a delegate connection, so a bunch of the resize behavior was broken. I've checked in a fixed nib.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: