Index: /trunk/source/cocoa-ide/ide-contents/Resources/English.lproj/xapropos.nib/classes.nib
===================================================================
--- /trunk/source/cocoa-ide/ide-contents/Resources/English.lproj/xapropos.nib/classes.nib	(revision 12105)
+++ /trunk/source/cocoa-ide/ide-contents/Resources/English.lproj/xapropos.nib/classes.nib	(revision 12106)
@@ -16,4 +16,6 @@
 				<key>source</key>
 				<string>id</string>
+				<key>toggleExternalOnly</key>
+				<string>id</string>
 			</dict>
 			<key>CLASS</key>
@@ -27,5 +29,9 @@
 				<key>actionPopupButton</key>
 				<string>id</string>
+				<key>allSymbolsButton</key>
+				<string>id</string>
 				<key>contextualMenu</key>
+				<string>id</string>
+				<key>externalSymbolsButton</key>
 				<string>id</string>
 				<key>searchField</key>
Index: /trunk/source/cocoa-ide/ide-contents/Resources/English.lproj/xapropos.nib/info.nib
===================================================================
--- /trunk/source/cocoa-ide/ide-contents/Resources/English.lproj/xapropos.nib/info.nib	(revision 12105)
+++ /trunk/source/cocoa-ide/ide-contents/Resources/English.lproj/xapropos.nib/info.nib	(revision 12106)
@@ -9,9 +9,9 @@
 	<key>IBOpenObjects</key>
 	<array>
-		<integer>1</integer>
 		<integer>113</integer>
+		<integer>139</integer>
 	</array>
 	<key>IBSystem Version</key>
-	<string>9G55</string>
+	<string>9J61</string>
 	<key>targetFramework</key>
 	<string>IBCocoaFramework</string>
Index: /trunk/source/cocoa-ide/xapropos.lisp
===================================================================
--- /trunk/source/cocoa-ide/xapropos.lisp	(revision 12105)
+++ /trunk/source/cocoa-ide/xapropos.lisp	(revision 12106)
@@ -6,4 +6,5 @@
    (matched-symbols :initform (make-array 100 :fill-pointer 0 :adjustable t)
                     :accessor matched-symbols)
+   (external-only-p :initform nil :accessor external-only-p)
    ;; outlets
    (action-menu :foreign-type :id :accessor action-menu)
@@ -11,7 +12,28 @@
    (search-field :foreign-type :id :accessor search-field)
    (search-field-toolbar-item :foreign-type :id :accessor search-field-toolbar-item)
+   (all-symbols-button :foreign-type :id :accessor all-symbols-button)
+   (external-symbols-button :foreign-type :id :accessor external-symbols-button)
    (table-view :foreign-type :id :accessor table-view)
    (contextual-menu :foreign-type :id :accessor contextual-menu))
   (:metaclass ns:+ns-object))
+
+(defclass scope-bar-view (ns:ns-view)
+  ()
+  (:metaclass ns:+ns-object))
+
+(defconstant $scope-bar-border-width 1)
+
+;;; This should use a gradient, but we don't have NSGradient on Tiger.
+
+(objc:defmethod (#/drawRect: :void) ((self scope-bar-view) (rect #>NSRect))
+  (let* (;;(start-color (#/colorWithCalibratedWhite:alpha: ns:ns-color 0.75 1.0))
+         (end-color (#/colorWithCalibratedWhite:alpha: ns:ns-color 0.90 1.0))
+         (border-color (#/colorWithCalibratedWhite:alpha: ns:ns-color 0.69 1.0))
+         (bounds (#/bounds self)))
+    (#/set end-color)
+    (#_NSRectFill bounds)
+    (ns:with-ns-rect (r 0 0 (ns:ns-rect-width bounds) $scope-bar-border-width)
+      (#/set border-color)
+      (#_NSRectFill r))))
 
 (defconstant $all-symbols-item-tag 0)
@@ -56,4 +78,5 @@
     (#/setToolbar: (#/window wc) toolbar)
     (#/release toolbar)
+    (#/search: wc (search-field wc))
     (#/makeFirstResponder: (#/window wc) (search-field wc))))
 
@@ -100,13 +123,19 @@
                    (array row-objects)) wc
     (setf (fill-pointer v) 0)
-    (do-all-symbols (sym)
-      (when (case category
-              (:function (fboundp sym))
-              (:variable (boundp sym))
-              (:macro (macro-function sym))
-              (:class (find-class sym nil))
-              (t t))
-        (when (ccl::%apropos-substring-p substring (symbol-name sym))
-          (vector-push-extend sym v))))
+    (flet ((maybe-include-symbol (sym)
+             (when (case category
+                     (:function (fboundp sym))
+                     (:variable (boundp sym))
+                     (:macro (macro-function sym))
+                     (:class (find-class sym nil))
+                     (t t))
+               (when (ccl::%apropos-substring-p substring (symbol-name sym))
+                 (vector-push-extend sym v)))))
+      (if (external-only-p wc)
+        (dolist (p (list-all-packages))
+          (do-external-symbols (sym p)
+            (maybe-include-symbol sym)))
+        (do-all-symbols (sym)
+          (maybe-include-symbol sym))))
     (setf v (sort v #'string-lessp))
     (#/removeAllObjects array)
@@ -131,4 +160,13 @@
       (#/search: wc (search-field wc)))))
 
+(objc:defmethod (#/toggleExternalOnly: :void) ((wc xapropos-window-controller) sender)
+  (cond ((eql sender (all-symbols-button wc))
+         (#/setState: (external-symbols-button wc) #$NSOffState)
+         (setf (external-only-p wc) nil))
+        ((eql sender (external-symbols-button wc))
+         (#/setState: (all-symbols-button wc) #$NSOffState)
+         (setf (external-only-p wc) t)))
+  (#/search: wc (search-field wc)))
+  
 (objc:defmethod (#/inspect: :void) ((wc xapropos-window-controller) sender)
   (declare (ignore sender))
