Bug 750544 - Remove the scope bar from the Library window. r=mano.
authorJohan Charlez <johan.charlez@gmail.com>
Tue, 30 Oct 2012 19:36:16 +0200
changeset 111885 a2a201dd7a85b0a123ad929d146f76a0a3491b9e
parent 111884 71290adea0c1e6b0ab35b260a561648b72072b23
child 111886 c6cccc9e83fabb2bd6a9a2d85b6f2d4af199bbf4
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersmano
bugs750544
milestone19.0a1
Bug 750544 - Remove the scope bar from the Library window. r=mano.
browser/components/places/content/places.js
browser/components/places/content/places.xul
browser/components/places/tests/browser/browser_library_search.js
browser/locales/en-US/chrome/browser/places/places.dtd
browser/locales/en-US/chrome/browser/places/places.properties
browser/themes/gnomestripe/places/organizer.css
browser/themes/pinstripe/places/organizer.css
browser/themes/winstripe/places/organizer-aero.css
browser/themes/winstripe/places/organizer.css
--- a/browser/components/places/content/places.js
+++ b/browser/components/places/content/places.js
@@ -198,31 +198,19 @@ var PlacesOrganizer = {
                                                             queries.length,
                                                             options);
 
     // If either the place of the content tree in the right pane has changed or
     // the user cleared the search box, update the place, hide the search UI,
     // and update the back/forward buttons by setting location.
     if (this._content.place != placeURI || !resetSearchBox) {
       this._content.place = placeURI;
-      PlacesSearchBox.hideSearchUI();
       this.location = node.uri;
     }
 
-    // Update the selected folder title where it appears in the UI: the folder
-    // scope button, and the search box emptytext.
-    // They must be updated even if the selection hasn't changed --
-    // specifically when node's title changes.  In that case a selection event
-    // is generated, this method is called, but the selection does not change.
-    var folderButton = document.getElementById("scopeBarFolder");
-    var folderTitle = node.title || folderButton.getAttribute("emptytitle");
-    folderButton.setAttribute("label", folderTitle);
-    if (PlacesSearchBox.filterCollection == "collection")
-      PlacesSearchBox.updateCollectionTitle(folderTitle);
-
     // When we invalidate a container we use suppressSelectionEvent, when it is
     // unset a select event is fired, in many cases the selection did not really
     // change, so we should check for it, and return early in such a case. Note
     // that we cannot return any earlier than this point, because when
     // !resetSearchBox, we need to update location and hide the UI as above,
     // even though the selection has not changed.
     if (node.uri == this._cachedLeftPaneSelectedURI)
       return;
@@ -240,40 +228,27 @@ var PlacesOrganizer = {
   /**
    * Sets the search scope based on aNode's properties.
    * @param   aNode
    *          the node to set up scope from
    */
   _setSearchScopeForNode: function PO__setScopeForNode(aNode) {
     let itemId = aNode.itemId;
 
-    // Set default buttons status.
-    let bookmarksButton = document.getElementById("scopeBarAll");
-    bookmarksButton.hidden = false;
-    let downloadsButton = document.getElementById("scopeBarDownloads");
-    downloadsButton.hidden = true;
-
     if (PlacesUtils.nodeIsHistoryContainer(aNode) ||
         itemId == PlacesUIUtils.leftPaneQueries["History"]) {
       PlacesQueryBuilder.setScope("history");
     }
     else if (itemId == PlacesUIUtils.leftPaneQueries["Downloads"]) {
-      downloadsButton.hidden = false;
-      bookmarksButton.hidden = true;
       PlacesQueryBuilder.setScope("downloads");
     }
     else {
       // Default to All Bookmarks for all other nodes, per bug 469437.
       PlacesQueryBuilder.setScope("bookmarks");
     }
-
-    // Enable or disable the folder scope button.
-    let folderButton = document.getElementById("scopeBarFolder");
-    folderButton.hidden = !PlacesUtils.nodeIsFolder(aNode) ||
-                          itemId == PlacesUIUtils.allBookmarksFolderId;
   },
 
   /**
    * Handle clicks on the tree.
    * Single Left click, right click or modified click do not result in any
    * special action, since they're related to selection.
    * @param   aEvent
    *          The mouse event.
@@ -750,83 +725,40 @@ var PlacesOrganizer = {
     else {
       infoBox.setAttribute("minimal", "true");
       infoBoxExpanderLabel.value = infoBoxExpanderLabel.getAttribute("morelabel");
       infoBoxExpanderLabel.accessKey = infoBoxExpanderLabel.getAttribute("moreaccesskey");
       infoBoxExpander.className = "expander-down";
       additionalInfoBroadcaster.setAttribute("hidden", "true");
     }
   },
-
-  /**
-   * Save the current search (or advanced query) to the bookmarks root.
-   */
-  saveSearch: function PO_saveSearch() {
-    // Get the place: uri for the query.
-    // If the advanced query builder is showing, use that.
-    var options = this.getCurrentOptions();
-    var queries = this.getCurrentQueries();
-
-    var placeSpec = PlacesUtils.history.queriesToQueryString(queries,
-                                                             queries.length,
-                                                             options);
-    var placeURI = Cc["@mozilla.org/network/io-service;1"].
-                   getService(Ci.nsIIOService).
-                   newURI(placeSpec, null, null);
-
-    // Prompt the user for a name for the query.
-    // XXX - using prompt service for now; will need to make
-    // a real dialog and localize when we're sure this is the UI we want.
-    var title = PlacesUIUtils.getString("saveSearch.title");
-    var inputLabel = PlacesUIUtils.getString("saveSearch.inputLabel");
-    var defaultText = PlacesUIUtils.getString("saveSearch.inputDefaultText");
-
-    var prompts = Cc["@mozilla.org/embedcomp/prompt-service;1"].
-                  getService(Ci.nsIPromptService);
-    var check = {value: false};
-    var input = {value: defaultText};
-    var save = prompts.prompt(null, title, inputLabel, input, null, check);
-
-    // Don't add the query if the user cancels or clears the seach name.
-    if (!save || input.value == "")
-     return;
-
-    // Add the place: uri as a bookmark under the bookmarks root.
-    var txn = new PlacesCreateBookmarkTransaction(placeURI,
-                                                  PlacesUtils.bookmarksMenuFolderId,
-                                                  PlacesUtils.bookmarks.DEFAULT_INDEX,
-                                                  input.value);
-    PlacesUtils.transactionManager.doTransaction(txn);
-
-    // select and load the new query
-    this._places.selectPlaceURI(placeSpec);
-  }
 };
 
 /**
  * A set of utilities relating to search within Bookmarks and History.
  */
 var PlacesSearchBox = {
 
   /**
    * The Search text field
    */
   get searchFilter() {
     return document.getElementById("searchFilter");
   },
-
+   
   /**
    * Folders to include when searching.
    */
   _folders: [],
   get folders() {
-    if (this._folders.length == 0)
+    if (this._folders.length == 0) {
       this._folders.push(PlacesUtils.bookmarksMenuFolderId,
                          PlacesUtils.unfiledBookmarksFolderId,
                          PlacesUtils.toolbarFolderId);
+    }
     return this._folders;
   },
   set folders(aFolders) {
     this._folders = aFolders;
     return aFolders;
   },
 
   /**
@@ -845,60 +777,52 @@ var PlacesSearchBox = {
     if (filterString == "") {
       PO.onPlaceSelected(false);
       return;
     }
 
     var currentOptions = PO.getCurrentOptions();
     var content = PO._content;
 
-    // Search according to the current scope and folders, which were set by
+    // Search according to the current scope, which was set by
     // PQB_setScope()
     switch (PlacesSearchBox.filterCollection) {
-    case "collection":
-      content.applyFilter(filterString, this.folders);
-      // XXX changing the button text is badness
-      //var scopeBtn = document.getElementById("scopeBarFolder");
-      //scopeBtn.label = PlacesOrganizer._places.selectedNode.title;
-      break;
-    case "bookmarks":
-      content.applyFilter(filterString, this.folders);
-      break;
-    case "history":
-      if (currentOptions.queryType != Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY) {
-        var query = PlacesUtils.history.getNewQuery();
-        query.searchTerms = filterString;
-        var options = currentOptions.clone();
-        // Make sure we're getting uri results.
-        options.resultType = currentOptions.RESULT_TYPE_URI;
-        options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY;
-        content.load([query], options);
-      }
-      else {
-        content.applyFilter(filterString);
-      }
-      break;
-    case "downloads": {
-        let query = PlacesUtils.history.getNewQuery();
-        query.searchTerms = filterString;
-        query.setTransitions([Ci.nsINavHistoryService.TRANSITION_DOWNLOAD], 1);
-        let options = currentOptions.clone();
-        // Make sure we're getting uri results.
-        options.resultType = currentOptions.RESULT_TYPE_URI;
-        options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY;
-        content.load([query], options);
-      break;
+      case "bookmarks":
+        content.applyFilter(filterString, this.folders);
+        break;
+      case "history":
+        if (currentOptions.queryType != Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY) {
+          var query = PlacesUtils.history.getNewQuery();
+          query.searchTerms = filterString;
+          var options = currentOptions.clone();
+          // Make sure we're getting uri results.
+          options.resultType = currentOptions.RESULT_TYPE_URI;
+          options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY;
+          content.load([query], options);
+        }
+        else {
+          content.applyFilter(filterString);
+        }
+        break;
+      case "downloads": {
+          let query = PlacesUtils.history.getNewQuery();
+          query.searchTerms = filterString;
+          query.setTransitions([Ci.nsINavHistoryService.TRANSITION_DOWNLOAD], 1);
+          let options = currentOptions.clone();
+          // Make sure we're getting uri results.
+          options.resultType = currentOptions.RESULT_TYPE_URI;
+          options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY;
+          content.load([query], options);
+        break;
     }
     default:
       throw "Invalid filterCollection on search";
       break;
     }
 
-    PlacesSearchBox.showSearchUI();
-
     // Update the details panel
     PlacesOrganizer.onContentTreeSelect();
   },
 
   /**
    * Finds across all history, downloads or all bookmarks.
    */
   findAll: function PSB_findAll() {
@@ -918,57 +842,42 @@ var PlacesSearchBox = {
 
   /**
    * Updates the display with the title of the current collection.
    * @param   aTitle
    *          The title of the current collection.
    */
   updateCollectionTitle: function PSB_updateCollectionTitle(aTitle) {
     let title = "";
-    // This is needed when a user performs a folder-specific search
-    // using the scope bar, removes the search-string, and unfocuses
-    // the search box, at least until the removal of the scope bar.
-    if (aTitle) {
-      title = PlacesUIUtils.getFormattedString("searchCurrentDefault",
-                                               [aTitle]);
-    }
-    else {
-      switch (this.filterCollection) {
-        case "history":
-          title = PlacesUIUtils.getString("searchHistory");
-          break;
-        case "downloads":
-          title = PlacesUIUtils.getString("searchDownloads");
-          break;
-        default:
-          title = PlacesUIUtils.getString("searchBookmarks");                                    
-      }
+    switch (this.filterCollection) {
+      case "history":
+        title = PlacesUIUtils.getString("searchHistory");
+        break;
+      case "downloads":
+        title = PlacesUIUtils.getString("searchDownloads");
+        break;
+      default:
+        title = PlacesUIUtils.getString("searchBookmarks");                                    
     }
     this.searchFilter.placeholder = title;
   },
 
   /**
    * Gets/sets the active collection from the dropdown menu.
    */
   get filterCollection() {
     return this.searchFilter.getAttribute("collection");
   },
   set filterCollection(collectionName) {
     if (collectionName == this.filterCollection)
       return collectionName;
 
     this.searchFilter.setAttribute("collection", collectionName);
+    this.updateCollectionTitle();
 
-    var newGrayText = null;
-    if (collectionName == "collection") {
-      newGrayText = PlacesOrganizer._places.selectedNode.title ||
-                    document.getElementById("scopeBarFolder").
-                      getAttribute("emptytitle");
-    }
-    this.updateCollectionTitle(newGrayText);
     return collectionName;
   },
 
   /**
    * Focus the search box
    */
   focus: function PSB_focus() {
     this.searchFilter.focus();
@@ -985,113 +894,57 @@ var PlacesSearchBox = {
    * Gets or sets the text shown in the Places Search Box
    */
   get value() {
     return this.searchFilter.value;
   },
   set value(value) {
     return this.searchFilter.value = value;
   },
-
-  showSearchUI: function PSB_showSearchUI() {
-    // Hide the advanced search controls when the user hasn't searched
-    var searchModifiers = document.getElementById("searchModifiers");
-    searchModifiers.hidden = false;
-  },
-
-  hideSearchUI: function PSB_hideSearchUI() {
-    var searchModifiers = document.getElementById("searchModifiers");
-    searchModifiers.hidden = true;
-  }
 };
 
 /**
  * Functions and data for advanced query builder
  */
 var PlacesQueryBuilder = {
 
   queries: [],
   queryOptions: null,
 
   /**
-   * Called when a scope button in the scope bar is clicked.
-   * @param   aButton
-   *          the scope button that was selected
-   */
-  onScopeSelected: function PQB_onScopeSelected(aButton) {
-    switch (aButton.id) {
-    case "scopeBarHistory":
-      this.setScope("history");
-      break;
-    case "scopeBarFolder":
-      this.setScope("collection");
-      break;
-    case "scopeBarDownloads":
-      this.setScope("downloads");
-      break;
-    case "scopeBarAll":
-      this.setScope("bookmarks");
-      break;
-    default:
-      throw "Invalid search scope button ID";
-      break;
-    }
-  },
-
-  /**
    * Sets the search scope.  This can be called when no search is active, and
    * in that case, when the user does begin a search aScope will be used (see
    * PSB_search()).  If there is an active search, it's performed again to
    * update the content tree.
    * @param   aScope
    *          The search scope: "bookmarks", "collection", "downloads" or
    *          "history".
    */
   setScope: function PQB_setScope(aScope) {
     // Determine filterCollection, folders, and scopeButtonId based on aScope.
     var filterCollection;
     var folders = [];
-    var scopeButtonId;
     switch (aScope) {
-    case "history":
-      filterCollection = "history";
-      scopeButtonId = "scopeBarHistory";
-      break;
-    case "collection":
-      // The folder scope button can only become hidden upon selecting a new
-      // folder in the left pane, and the disabled state will remain unchanged
-      // until a new folder is selected.  See PO__setScopeForNode().
-      if (!document.getElementById("scopeBarFolder").hidden) {
-        filterCollection = "collection";
-        scopeButtonId = "scopeBarFolder";
-        folders.push(PlacesUtils.getConcreteItemId(
-                       PlacesOrganizer._places.selectedNode));
+      case "history":
+        filterCollection = "history";
         break;
-      }
-      // Fall through.  If collection scope doesn't make sense for the
-      // selected node, choose bookmarks scope.
-    case "bookmarks":
-      filterCollection = "bookmarks";
-      scopeButtonId = "scopeBarAll";
-      folders.push(PlacesUtils.bookmarksMenuFolderId,
-                   PlacesUtils.toolbarFolderId,
-                   PlacesUtils.unfiledBookmarksFolderId);
-      break;
-    case "downloads":
-      filterCollection = "downloads";
-      scopeButtonId = "scopeBarDownloads";
-      break;
-    default:
-      throw "Invalid search scope";
-      break;
+      case "bookmarks":
+        filterCollection = "bookmarks";
+        folders.push(PlacesUtils.bookmarksMenuFolderId,
+                     PlacesUtils.toolbarFolderId,
+                     PlacesUtils.unfiledBookmarksFolderId);
+        break;
+      case "downloads":
+        filterCollection = "downloads";
+        break;
+      default:
+        throw "Invalid search scope";
+        break;
     }
 
-    // Check the appropriate scope button in the scope bar.
-    document.getElementById(scopeButtonId).checked = true;
-
     // Update the search box.  Re-search if there's an active search.
     PlacesSearchBox.filterCollection = filterCollection;
     PlacesSearchBox.folders = folders;
     var searchStr = PlacesSearchBox.searchFilter.value;
     if (searchStr)
       PlacesSearchBox.search(searchStr);
   }
 };
--- a/browser/components/places/content/places.xul
+++ b/browser/components/places/content/places.xul
@@ -26,18 +26,18 @@
 %placesDTD;
 <!ENTITY % editMenuOverlayDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
 %editMenuOverlayDTD;
 <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
 %browserDTD;
 ]>
 
 <window id="places"
-        title="&places.library.title;" 
-        windowtype="Places:Organizer" 
+        title="&places.library.title;"
+        windowtype="Places:Organizer"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         onload="PlacesOrganizer.init();"
         onunload="PlacesOrganizer.destroy();"
         width="&places.library.width;" height="&places.library.height;"
         screenX="10" screenY="10"
         toggletoolbar="true"
         persist="width height screenX screenY sizemode">
@@ -82,22 +82,22 @@
              oncommand="PlacesOrganizer.back();"/>
     <command id="OrganizerCommand:Forward"
              oncommand="PlacesOrganizer.forward();"/>
   </commandset>
 
 
   <keyset id="placesOrganizerKeyset">
     <!-- Instantiation Keys -->
-    <key id="placesKey_close" key="&cmd.close.key;" modifiers="accel" 
+    <key id="placesKey_close" key="&cmd.close.key;" modifiers="accel"
          oncommand="close();"/>
          
     <!-- Command Keys -->
     <key id="placesKey_find:all"
-         command="OrganizerCommand_find:all" 
+         command="OrganizerCommand_find:all"
          key="&cmd.find.key;"
          modifiers="accel"/>
 
     <!-- Back/Forward Keys Support -->
 #ifndef XP_MACOSX
     <key id="placesKey_goBackKb"
          keycode="VK_LEFT"
          command="OrganizerCommand:Back"
@@ -236,51 +236,51 @@
                       command="cmd_delete"
                       label="&deleteCmd.label;"
                       key="key_delete"
                       accesskey="&deleteCmd.accesskey;"/>
 #else
             <menuseparator id="orgCloseSeparator"/>
 
             <menuitem id="orgClose"
-                      key="placesKey_close" 
+                      key="placesKey_close"
                       label="&file.close.label;"
-                      accesskey="&file.close.accesskey;" 
+                      accesskey="&file.close.accesskey;"
                       oncommand="close();"/>
 #endif
           </menupopup>
 #ifdef XP_MACOSX
         </toolbarbutton>
         <toolbarbutton type="menu" class="tabbable"
 #else
         </menu>
         <menu accesskey="&views.accesskey;" class="menu-iconic"
 #endif
               id="viewMenu" label="&views.label;"
               tooltiptext="&views.tooltip;">
           <menupopup id="viewMenuPopup">
 
-            <menu id="viewColumns" 
+            <menu id="viewColumns"
                   label="&view.columns.label;" accesskey="&view.columns.accesskey;">
               <menupopup onpopupshowing="ViewMenu.fillWithColumns(event, null, null, 'checkbox', null);"
                          oncommand="ViewMenu.showHideColumn(event.target); event.stopPropagation();"/>
             </menu>
 
             <menu id="viewSort" label="&view.sort.label;"
                   accesskey="&view.sort.accesskey;">
               <menupopup onpopupshowing="ViewMenu.populateSortMenu(event);"
                          oncommand="ViewMenu.setSortColumn(event.target.column, null);">
-                <menuitem id="viewUnsorted" type="radio" name="columns" 
+                <menuitem id="viewUnsorted" type="radio" name="columns"
                           label="&view.unsorted.label;" accesskey="&view.unsorted.accesskey;"
                           oncommand="ViewMenu.setSortColumn(null, null);"/>
                 <menuseparator id="directionSeparator"/>
-                <menuitem id="viewSortAscending" type="radio" name="direction" 
+                <menuitem id="viewSortAscending" type="radio" name="direction"
                           label="&view.sortAscending.label;" accesskey="&view.sortAscending.accesskey;"
                           oncommand="ViewMenu.setSortColumn(null, 'ascending'); event.stopPropagation();"/>
-                <menuitem id="viewSortDescending" type="radio" name="direction" 
+                <menuitem id="viewSortDescending" type="radio" name="direction"
                           label="&view.sortDescending.label;" accesskey="&view.sortDescending.accesskey;"
                           oncommand="ViewMenu.setSortColumn(null, 'descending'); event.stopPropagation();"/>
               </menupopup>
             </menu>
           </menupopup>
 #ifdef XP_MACOSX
         </toolbarbutton>
         <toolbarbutton type="menu" class="tabbable"
@@ -353,48 +353,16 @@
           maxwidth="400">
       <treecols>
         <treecol anonid="title" flex="1" primary="true" hideheader="true"/>
       </treecols>
       <treechildren flex="1"/>
     </tree>
     <splitter collapse="none" persist="state"></splitter>
     <vbox id="contentView" flex="4">
-      <toolbox id="searchModifiers" hidden="true">
-        <toolbar id="organizerScopeBar" class="chromeclass-toolbar" align="center">
-          <label id="scopeBarTitle" value="&search.in.label;"/>
-          <toolbarbutton id="scopeBarAll" class="small-margin"
-                         type="radio" group="scopeBar"
-                         oncommand="PlacesQueryBuilder.onScopeSelected(this);"
-                         label="&search.scopeBookmarks.label;"
-                         accesskey="&search.scopeBookmarks.accesskey;"/>
-          <toolbarbutton id="scopeBarHistory" class="small-margin"
-                         type="radio" group="scopeBar"
-                         oncommand="PlacesQueryBuilder.onScopeSelected(this);"
-                         label="&search.scopeHistory.label;"
-                         accesskey="&search.scopeHistory.accesskey;"/>
-          <toolbarbutton id="scopeBarDownloads" class="small-margin"
-                         type="radio" group="scopeBar"
-                         oncommand="PlacesQueryBuilder.onScopeSelected(this);"
-                         label="&search.scopeDownloads.label;"
-                         accesskey="&search.scopeDownloads.accesskey;"/>
-          <toolbarbutton id="scopeBarFolder" class="small-margin"
-                         type="radio" group="scopeBar"
-                         oncommand="PlacesQueryBuilder.onScopeSelected(this);"
-                         accesskey="&search.scopeFolder.accesskey;"
-                         emptytitle="&search.scopeFolder.label;" flex="1"/>
-          <!-- The folder scope button should flex but not take up more room
-                than its label needs.  The only simple way to do that is to
-                set a really big flex on the spacer, e.g., 2^31 - 1. -->
-          <spacer flex="2147483647"/>
-          <button id="saveSearch" class="small-margin"
-                  label="&saveSearch.label;" accesskey="&saveSearch.accesskey;"
-                  command="OrganizerCommand_search:save"/>
-        </toolbar>
-      </toolbox>
       <tree id="placeContent"
             class="plain placesTree"
             context="placesContext"
             hidecolumnpicker="true"
             flex="1"
             type="places"
             flatList="true"
             enableColumnDrag="true"
--- a/browser/components/places/tests/browser/browser_library_search.js
+++ b/browser/components/places/tests/browser/browser_library_search.js
@@ -14,89 +14,41 @@
  *
  * Details:
  * Each test below
  *   1. selects a folder in the left pane and ensures that the content tree is
  *      appropriately updated,
  *   2. performs a search and ensures that the content tree is correct for the
  *      folder and search and that the search UI is visible and appropriate to
  *      folder,
- *   3. ensures that the folder scope button is disabled appropriate to the
- *      folder,
- *   4. if the folder scope button is enabled clicks it,
  *   5. resets the search and ensures that the content tree is correct and that
  *      the search UI is hidden, and
  *   6. if folder scope was clicked, searches again and ensures folder scope
  *      remains selected.
  */
 
 const TEST_URL = "http://dummy.mozilla.org/";
 const TEST_DOWNLOAD_URL = "http://dummy.mozilla.org/dummy.pdf";
 
 let gLibrary;
 
 let testCases = [
   function allBookmarksScope() {
     let defScope = getDefaultScope(PlacesUIUtils.allBookmarksFolderId);
     search(PlacesUIUtils.allBookmarksFolderId, "dummy", defScope);
-    ok(!selectScope("scopeBarFolder"),
-       "Folder scope should be disabled for All Bookmarks");
-    ok(selectScope("scopeBarAll"),
-       "Bookmarks scope should be enabled for All Bookmarks");
-    resetSearch("scopeBarAll");
   },
 
   function historyScope() {
     let defScope = getDefaultScope(PlacesUIUtils.leftPaneQueries["History"]);
     search(PlacesUIUtils.leftPaneQueries["History"], "dummy", defScope);
-    ok(!selectScope("scopeBarFolder"),
-       "Folder scope should be disabled for History");
-    ok(selectScope("scopeBarAll"),
-       "Bookmarks scope should be enabled for History");
-    resetSearch("scopeBarAll");
   },
 
   function downloadsScope() {
     let defScope = getDefaultScope(PlacesUIUtils.leftPaneQueries["Downloads"]);
     search(PlacesUIUtils.leftPaneQueries["Downloads"], "dummy", defScope);
-    ok(!selectScope("scopeBarFolder"),
-       "Folder scope should be disabled for Downloads");
-    ok(!selectScope("scopeBarAll"),
-       "Bookmarks scope should be disabled for Downloads");
-    resetSearch(defScope);
-  },
-
-  function toolbarFolderScope() {
-    let defScope = getDefaultScope(PlacesUtils.toolbarFolderId);
-    search(PlacesUtils.toolbarFolderId, "dummy", defScope);
-    ok(selectScope("scopeBarAll"),
-       "Bookmarks scope should be enabled for toolbar folder");
-    ok(selectScope("scopeBarFolder"),
-       "Folder scope should be enabled for toolbar folder");
-    // Ensure that folder scope is still selected after resetting and searching
-    // again.
-    resetSearch("scopeBarFolder");
-    search(PlacesUtils.toolbarFolderId, "dummy", "scopeBarFolder");
-  },
-
-  function subFolderScope() {
-    let folderId = PlacesUtils.bookmarks.createFolder(PlacesUtils.toolbarFolderId,
-                                                      "dummy folder",
-                                                      PlacesUtils.bookmarks.DEFAULT_INDEX);
-    let defScope = getDefaultScope(folderId);
-    search(folderId, "dummy", defScope);
-    ok(selectScope("scopeBarAll"),
-       "Bookmarks scope should be enabled for regularfolder");
-    ok(selectScope("scopeBarFolder"),
-       "Folder scope should be enabled for regular subfolder");
-    // Ensure that folder scope is still selected after resetting and searching
-    // again.
-    resetSearch("scopeBarFolder");
-    search(folderId, "dummy", "scopeBarFolder");
-    PlacesUtils.bookmarks.removeItem(folderId);
   },
 ];
 
 ///////////////////////////////////////////////////////////////////////////////
 
 /**
  * Returns the default search scope for a given folder.
  *
@@ -111,31 +63,16 @@ function getDefaultScope(aFolderId) {
     case PlacesUIUtils.leftPaneQueries["Downloads"]:
       return "scopeBarDownloads";
     default:
       return "scopeBarAll";
   }
 }
 
 /**
- * Returns the ID of the search scope button that is currently checked.
- *
- * @return the ID of the selected scope folder button
- */
-function getSelectedScopeButtonId() {
-  let doc = gLibrary.document;
-  let scopeButtons = doc.getElementById("organizerScopeBar").childNodes;
-  for (let i = 0; i < scopeButtons.length; i++) {
-    if (scopeButtons[i].checked)
-      return scopeButtons[i].id;
-  }
-  return null;
-}
-
-/**
  * Returns the single nsINavHistoryQuery represented by a given place URI.
  *
  * @param  aPlaceURI
  *         a URI that represents a single query
  * @return an nsINavHistoryQuery object
  */
 function queryStringToQuery(aPlaceURI) {
   let queries = {};
@@ -195,73 +132,21 @@ function search(aFolderId, aSearchStr, a
   // properly.
   let searchBox = doc.getElementById("searchFilter");
   searchBox.value = aSearchStr;
   gLibrary.PlacesSearchBox.search(searchBox.value);
   let query = queryStringToQuery(contentTree.result.root.uri);
   if (aSearchStr) {
     is(query.searchTerms, aSearchStr,
        "Content tree's searchTerms should be text in search box");
-    is(doc.getElementById("searchModifiers").hidden, false,
-       "Scope bar should not be hidden after searching");
-
-    let scopeButtonId = getSelectedScopeButtonId();
-    if (scopeButtonId == "scopeBarDownloads" ||
-        scopeButtonId == "scopeBarHistory" ||
-        scopeButtonId == "scopeBarAll" ||
-        aFolderId == PlacesUtils.unfiledBookmarksFolderId) {
-      // Check that the target node exists in the tree's search results.
-      let url, count;
-      if (scopeButtonId == "scopeBarDownloads") {
-        url = TEST_DOWNLOAD_URL;
-        count = 1;
-      }
-      else {
-        url = TEST_URL;
-        count = scopeButtonId == "scopeBarHistory" ? 2 : 1;
-      }
-      is(contentTree.view.rowCount, count, "Found correct number of results");
-
-      let node = null;
-      for (let i = 0; i < contentTree.view.rowCount; i++) {
-        node = contentTree.view.nodeForTreeIndex(i);
-        if (node.uri === url)
-          break;
-      }
-      isnot(node, null, "At least the target node should be in the tree");
-      is(node.uri, url, "URI of node should match target URL");
-    }
   }
   else {
     is(query.hasSearchTerms, false,
        "Content tree's searchTerms should not exist after search reset");
-    ok(doc.getElementById("searchModifiers").hidden,
-       "Scope bar should be hidden after search reset");
   }
-  is(getSelectedScopeButtonId(), aExpectedScopeButtonId,
-     "Proper scope button should be selected after searching or resetting");
-}
-
-/**
- * Clicks the given search scope button if it is enabled.
- *
- * @param  aScopeButtonId
- *         the button with this ID will be clicked
- * @return true if the button is enabled, false otherwise
- */
-function selectScope(aScopeButtonId) {
-  let doc = gLibrary.document;
-  let button = doc.getElementById(aScopeButtonId);
-  isnot(button, null,
-     "Sanity check: scope button with ID " + aScopeButtonId + " should exist");
-  // Bug 469436 may hide an inappropriate scope button instead of disabling it.
-  if (button.disabled || button.hidden)
-    return false;
-  button.click();
-  return true;
 }
 
 /**
  * test() contains window-launching boilerplate that calls this to really kick
  * things off.  Add functions to the testCases array, and this will call them.
  */
 function onLibraryAvailable() {
   testCases.forEach(function (aTest) aTest());
--- a/browser/locales/en-US/chrome/browser/places/places.dtd
+++ b/browser/locales/en-US/chrome/browser/places/places.dtd
@@ -86,28 +86,16 @@
 <!ENTITY col.keyword.label       "Keyword">
 <!ENTITY col.description.label   "Description">
 <!ENTITY col.dateadded.label     "Added">
 <!ENTITY col.lastmodified.label  "Last Modified">
 
 <!ENTITY search.label                              "Search:">
 <!ENTITY search.accesskey                          "S">
 
-<!ENTITY search.in.label                           "Search in:">
-<!ENTITY search.scopeFolder.label                  "Selected Folder">
-<!ENTITY search.scopeFolder.accesskey              "r">
-<!ENTITY search.scopeBookmarks.label               "Bookmarks">
-<!ENTITY search.scopeBookmarks.accesskey           "k">
-<!ENTITY search.scopeDownloads.label               "Downloads">
-<!ENTITY search.scopeDownloads.accesskey           "D">
-<!ENTITY search.scopeHistory.label                 "History">
-<!ENTITY search.scopeHistory.accesskey             "H">
-<!ENTITY saveSearch.label                          "Save">
-<!ENTITY saveSearch.accesskey                      "S">
-
 <!ENTITY cmd.find.key  "f">
 
 <!ENTITY maintenance.label      "Import and Backup">
 <!ENTITY maintenance.accesskey  "I">
 <!ENTITY maintenance.tooltip    "Import and backup your bookmarks">
 
 <!ENTITY backButton.tooltip  "Go back">
 
--- a/browser/locales/en-US/chrome/browser/places/places.properties
+++ b/browser/locales/en-US/chrome/browser/places/places.properties
@@ -42,30 +42,25 @@ view.sortBy.dateAdded.accesskey=e
 view.sortBy.lastModified.label=Sort by Last Modified
 view.sortBy.lastModified.accesskey=M
 view.sortBy.tags.label=Sort by Tags
 view.sortBy.tags.accesskey=T
 
 searchBookmarks=Search Bookmarks
 searchHistory=Search History
 searchDownloads=Search Downloads
-searchCurrentDefault=Search in '%S'
 
 tabs.openWarningTitle=Confirm open
 tabs.openWarningMultipleBranded=You are about to open %S tabs.  This might slow down %S while the pages are loading.  Are you sure you want to continue?
 tabs.openButtonMultiple=Open tabs
 tabs.openWarningPromptMeBranded=Warn me when opening multiple tabs might slow down %S
 
 SelectImport=Import Bookmarks File
 EnterExport=Export Bookmarks File
 
-saveSearch.title=Save Search
-saveSearch.inputLabel=Name:
-saveSearch.inputDefaultText=New Search
-
 detailsPane.noItems=No items
 # LOCALIZATION NOTE (detailsPane.itemsCountLabel): Semi-colon list of plural forms.
 # See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
 # #1 number of items
 # example: 111 items
 detailsPane.itemsCountLabel=One item;#1 items
 
 mostVisitedTitle=Most Visited
--- a/browser/themes/gnomestripe/places/organizer.css
+++ b/browser/themes/gnomestripe/places/organizer.css
@@ -72,24 +72,16 @@
 #detailsDeck {
   padding: 5px;
 }
 
 #infoBoxExpanderLabel {
   -moz-padding-start: 2px;
 }
 
-#searchModifiers {
-  padding-right: 3px;
-}
-
-#saveSearch {
-  list-style-image: url("moz-icon://stock/gtk-save?size=menu");
-}
-
 /**** menuitem stock icons ****/
 #orgClose {
   list-style-image: url("moz-icon://stock/gtk-close?size=menu");
 }
 
 #fileImport {
   list-style-image: url("moz-icon://stock/gtk-revert-to-saved?size=menu");
 }
--- a/browser/themes/pinstripe/places/organizer.css
+++ b/browser/themes/pinstripe/places/organizer.css
@@ -226,128 +226,16 @@
 #placeContent > treechildren::-moz-tree-column {
   border-right: 1px solid #d7dad7;
 }
 
 #placeContent > treechildren::-moz-tree-cell(separator) {
   border-color: transparent;
 }
 
-/* Scope Bar */
-
-#advancedSearch > hbox, 
-#advancedSearchRows > row {
-  background-color: #E8E8E8;
-  border-top: 1px solid #F8F8F8;
-  border-bottom: 1px solid #BABABA;
-}
-
-#advancedSearchRows > row,
-#searchActions {
-  -moz-padding-start: 2px;
-  -moz-padding-end: 8px;
-}
-
-#organizerScopeBar {
-  padding: 3px;
-  -moz-appearance: none;
-  background: @scopeBarBackground@;
-  border-bottom: @scopeBarSeparatorBorder@;
-}
-
-#scopeBarTitle {
-  font: icon;
-  color: @scopeBarTitleColor@;
-  font-weight: bold;
-  text-shadow: @loweredShadow@;
-  margin: 0 6px 1px;
-}
-
-#organizerScopeBar > toolbarbutton {
-  border: 0;
-  font: icon;
-  font-weight: bold;
-  color: #2D2D2D;
-  border-radius: 10000px;
-  padding: 0 10px 1px;
-  margin: 1px;
-  font-weight: bold;
-}
-
-#organizerScopeBar > toolbarbutton > .toolbarbutton-text {
-   margin: 0 !important;
-}
-
-#organizerScopeBar > toolbarbutton:hover,
-#organizerScopeBar > toolbarbutton[checked="true"] {
-  color: #FFF !important; /* !imp because of [checked="true"] (see toolbarbutton.css) */
-  text-shadow: 0 1px rgba(0, 0, 0, .4);
-  background-color: rgba(0, 0, 0, .32);
-}
-
-#organizerScopeBar > toolbarbutton:active:hover,
-#organizerScopeBar > toolbarbutton[checked="true"] {
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4), 0 1px rgba(255, 255,
-255, 0.4);
-}
-
-#organizerScopeBar > toolbarbutton:active:hover {
-  background-color: rgba(0, 0, 0, .5);
-}
-
-#organizerScopeBarExpander {
-  margin: 0;
-  padding: 0;
-  -moz-padding-end: 2px;
-}
-
-#organizerScopeBar  > .expander-up {
-  list-style-image: url("chrome://browser/skin/places/plus.png") !important;
-}
-
-#organizerScopeBar  > .expander-up:hover:active {
-  list-style-image: url("chrome://browser/skin/places/plus-active.png") !important;
-}
-
-#organizerScopeBar  > .expander-down {
-  list-style-image: url("chrome://browser/skin/places/minus.png") !important;
-}
-
-#organizerScopeBar  > .expander-down:hover:active {
-  list-style-image: url("chrome://browser/skin/places/minus-active.png") !important;
-}
-
-#saveSearch {
-  margin: 0 4px;
-  padding: 0 10px;
-  -moz-appearance: none;
-  border-radius: 10000px;
-  border: @roundButtonBorder@;
-  text-shadow: @loweredShadow@;
-  background: @roundButtonBackground@;
-  box-shadow: @roundButtonShadow@;
-}
-
-#saveSearch > .button-box > .button-text {
-  margin: 0 !important;
-}
-
-#saveSearch:active:hover {
-  background: @roundButtonPressedBackground@;
-  box-shadow: @roundButtonPressedShadow@;
-}
-
-#saveSearch:focus {
-  box-shadow: @focusRingShadow@, @roundButtonShadow@;
-}
-
-#saveSearch:active:hover:focus {
-  box-shadow: @focusRingShadow@, @roundButtonPressedShadow@;
-}
-
 /**** expanders ****/
 
 .expander-up,
 .expander-down {
   -moz-appearance: none;
   margin-left: 8px;
   padding: 0;
   min-width: 0;
--- a/browser/themes/winstripe/places/organizer-aero.css
+++ b/browser/themes/winstripe/places/organizer-aero.css
@@ -32,17 +32,16 @@
 
   #placesToolbar {
     background-image: -moz-linear-gradient(@toolbarHighlight@, rgba(255,255,255,0));
   }
 }
 
 @media (-moz-windows-default-theme) {
   #placesView,
-  #searchModifiers,
   #infoPane,
   #placesList,
   #placeContent {
     background-color: #EEF3FA;
   }
 
   #placesToolbar {
     background-color: @customToolbarColor@;
@@ -54,25 +53,16 @@
     -moz-border-end: 1px solid #A9B7C9;
     min-width: 0;
     width: 3px;
     background-color: transparent;
     -moz-margin-start: -3px;
     position: relative;
   }
 
-  #searchModifiers {
-    border-bottom: 1px solid #A9B7C9;
-  }
-
-  #organizerScopeBar {
-    -moz-appearance: none;
-    border: none;
-  }
-
   #detailsDeck {
     border-top-color: #A9B7C9;
   }
 
   #searchFilter {
     -moz-appearance: none;
     padding: 2px;
     -moz-padding-start: 4px;
--- a/browser/themes/winstripe/places/organizer.css
+++ b/browser/themes/winstripe/places/organizer.css
@@ -119,42 +119,11 @@
   border-top: 1px solid ThreeDShadow;
   padding: 5px;
 }
 
 #infoBoxExpanderLabel {
   -moz-padding-start: 2px;
 }
 
-#organizerScopeBar {
-  padding: 2px 0;
-  -moz-padding-end: 3px;
-}
-
-#organizerScopeBar > toolbarbutton {
-  -moz-appearance: none;
-  border: 1px solid transparent;
-  border-radius: 2px;
-  padding: 0 !important;
-  margin: 0 1px;
-}
-
-#organizerScopeBar > toolbarbutton > .toolbarbutton-icon {
-  padding: 0;
-  margin: 0;
-}
-
-#organizerScopeBar > toolbarbutton > .toolbarbutton-text {
-   margin: 0;
-   padding: 2px 5px;
-}
-
-#organizerScopeBar > toolbarbutton:not([disabled="true"]):not([checked="true"]):hover {
-  border-color: ThreeDShadow;
-}
-
-#organizerScopeBar > toolbarbutton[checked="true"] {
-  border-color: ThreeDDarkShadow !important;
-}
-
 #searchFilter {
   margin: 0;
 }