help with making drop down menu?



I'm trying to make a drop down menu (the kind that
springs out from the root), and instead, I end up with
basically a button that then pops up a drop down menu.
 Can anyone help point out what I'm doing wrong?


1) I first redefine the root menu with my Backgrounds
menu definition that calls (popup-backgrounds-ment).

;redefine the root menu
(setq root-menu '(("Windows" . window-menu)
                  ("Programs" . apps-menu)
                  ("Workspaces" . workspace-menu)
                  ("Backgrounds" .
(popup-backgrounds-menu))
                  ("Customize" . custom-menu)
                  ()
                  ("Restart" restart)
                  ("Quit" quit)
                 )
)

2)  This is popup-backgrounds, and its accompaning
function, backgrounds-menu.

(defun popup-backgrounds-menu ()
  (interactive)
  (popup-menu (backgrounds-menu)))

(defun backgrounds-menu ( #!optional lst)
  "Creates the backgrounds menu"
  (mapcar
   (lambda (file)
     (cond ((listp file) `(,(file-name-nondirectory
(car file)) . ,(cdr (backgrounds-menu file))))
           ((file-readable-p file) `(,(basename file)
(set-background ,file)))
           (t nil)))
   (or lst (read-files-path background-image-path))))


When backgrounds is clicked, i get a nice popup menu
that contains the directory name and a slider (drop
down?)  menu to the images.  I'd like to attach this
to the root menu so that they all slide, instead of
having to click backgrounds.

Any suggestions?

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]