Closed Bug 373211 Opened 17 years ago Closed 17 years ago

history results showing up when I search in organize bookmarks dialog

Categories

(Firefox :: Bookmarks & History, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: moco, Assigned: jminta)

References

Details

Attachments

(1 file, 2 obsolete files)

history results showing up when I search in organize bookmarks dialog

see also bug #373207
Attached patch patch (obsolete) — Splinter Review
This covers this bug, bug 373207, and bug 373206 since they were all small and pretty closely related.  I'll admit I don't completely understand what is supposed to happen when collection="collection" (since I think some UI was removed there), so I just added an additional option for collection="bookmarks".
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #258169 - Flags: review?(mano)
collection="collection" means search in the current collection afaict.
Comment on attachment 258169 [details] [diff] [review]
patch

>Index: browser/components/places/content/places.js
>===================================================================
>@@ -336,28 +336,35 @@ var PlacesSearchBox = {
>    * localized to the active collection. 
>    * @param   filterString
>    *          The text to search for. 
>    */
>   search: function PSB_search(filterString) {
>     // Do not search for "" since it will match all history. Assume if the user
>     // deleted everything that they want to type something else and don't 
>     // update the view.
>-    if (filterString == "" || this.searchFilter.hasAttribute("empty")) 
>+    if (PlacesSearchBox.filterCollection != "bookmarks" &&
>+        (filterString == "" || this.searchFilter.hasAttribute("empty")))
>       return;
> 
>     var content = PlacesOrganizer._content;
>     var PO = PlacesOrganizer;
> 
>     switch (PlacesSearchBox.filterCollection) {
>     case "collection":
>       var folderId = asFolder(content.getResult().root).folderId;
>       content.applyFilter(filterString, true, folderId, OptionsFilter);
>       PO.setHeaderText(PO.HEADER_TYPE_SEARCH, filterString);
>       break;
>+    case "bookmarks":
>+      if (filterString != "")
>+        content.applyFilter(filterString, true);
>+      else
>+        PlacesOrganizer.onPlaceSelected();
>+      break;

Given recent API, schema and default-roots changes I would rather pass the "Bookmarks" root as the folderRestrict parameter. Feel free to land this as it is written now though, we should revise this code path when we figure out whether the onlyBookmarked option still makes sense.

r=mano.
Attachment #258169 - Flags: review?(mano) → review+
this patch looks like it contains a fix for bug #373206:  "when searching in bookmarks, if clear the quick search, we don't reset the search"

note, I don't think we'll ever reach this code when PlacesSearchBox.filterCollection != "bookmarks".

I was going to suggest we remove these 6 lines (code + comment), but maybe that's shortsighted as someone else could want to write an add on that would want it.

>     // Do not search for "" since it will match all history. Assume if the user
>     // deleted everything that they want to type something else and don't 
>     // update the view.
>+    if (PlacesSearchBox.filterCollection != "bookmarks" &&
>+        (filterString == "" || this.searchFilter.hasAttribute("empty")))
>       return;

so perhaps we should just clarify this comment:

>     // Do not search for "" since it will match all history. Assume if the user
>     // deleted everything that they want to type something else and don't 
>     // update the view.

carrying over mano's review. will log a spin off bug about mano's comment #3.
Attachment #258169 - Attachment is obsolete: true
Attachment #258361 - Flags: review+
landed, carrying over r=mano.

thanks joey!

Checking in browser/components/places/content/places.js;
/cvsroot/mozilla/browser/components/places/content/places.js,v  <--  places.js
new revision: 1.79; previous revision: 1.78
done
Checking in browser/components/places/content/places.xul;
/cvsroot/mozilla/browser/components/places/content/places.xul,v  <--  places.xul

new revision: 1.65; previous revision: 1.64
done
Checking in browser/locales/en-US/chrome/browser/places/places.dtd;
/cvsroot/mozilla/browser/locales/en-US/chrome/browser/places/places.dtd,v  <--
places.dtd
new revision: 1.20; previous revision: 1.19
done
Checking in browser/locales/en-US/chrome/browser/places/places.properties;
/cvsroot/mozilla/browser/locales/en-US/chrome/browser/places/places.properties,v
  <--  places.properties
new revision: 1.18; previous revision: 1.17
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
> I was going to suggest we remove these 6 lines (code + comment), but maybe
> that's shortsighted as someone else could want to write an add on that would
> want it.

actually, a person doing that would probably need their own places.js anyways.

so if this is true after we figure out bug #373721, I'll clean up that code.

additionally, I've logged a spin off on mano's comment #3, see bug #373792
Stuff like this:

 <!ENTITY places.title
-  "Places">
+  "Bookmarks Manager">

and like this:

 <!ENTITY cmd.find.label 
-  "Find in Bookmarks &amp; History...">
+  "Find in Bookmarks...">

and like this:

 <!ENTITY search.all.label
-  "All Bookmarks and History">
+  "All Bookmarks">

are semantic changes that require changing the entity name as well.

ccing Pike.
marek, you are right.  patch coming in bug #373207 to address this.
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: