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

Re: Menuの見 直し?



どうも、長です。

自分で再確認していたら、オオボケを見つけてしましました。
以前のメニュー生成を削りすぎてTABも消していました (__;

その部分を修正ものを再送します。
# どのみち、検討用のサンプルコードといったほうが適切な物かもしれません...

お目汚し失礼しました。
以上です。
--
Tsuyoshi CHO <mfalcon21@hotmail.com>
・var (ディレクトリ名) [う゛ぁー] [ばー]
    "VARiable" の略。
--- /tools/Meadow2/backup_lisp/w3m/w3m.el	2004-06-30 00:05:28.001000000 +0900
+++ /tools/Meadow2/site-lisp/w3m/w3m.el	2004-07-24 22:57:23.755508800 +0900
@@ -2028,46 +2028,65 @@
       [w3m-toolbar-db-history-icon w3m-db-history t "View Arrived URLs"]))
   "Toolbar definition for emacs-w3m.")
 
+;; "View" is page viewing
+;; "Show" is link list showing
 (defconst w3m-menubar
-  '("W3M"
-    ["Go to Home Page" w3m-gohome w3m-home-page]
+  '("w3m"
+    ("Session"
+     ["Create New Session..." w3m-goto-url-new-session t]
+     ["Copy This Session" w3m-copy-buffer t]
+     "----" ;; separator
+     ["Move Previous Session" w3m-previous-buffer
+      (> (safe-length (w3m-list-buffers)) 1)]
+     ["Move Next Session" w3m-next-buffer
+      (> (safe-length (w3m-list-buffers)) 1)]
+     "----" ;; separator
+     ["Close This Session" w3m-delete-buffer
+      (> (safe-length (w3m-list-buffers)) 1)]
+     ) ;; end session
+    ["Download This URL" w3m-download-this-url t]
+    ["Download to..." w3m-download t]
+    "----" ;; separator
     ["Back to Previous Page" w3m-view-previous-page
      (w3m-history-previous-link-available-p)]
     ["Forward to Next Page" w3m-view-next-page
      (w3m-history-next-link-available-p)]
-    ["View the parent page" w3m-view-parent-page
+    ["Up to Parent Page" w3m-view-parent-page
      (w3m-parent-page-available-p)]
-    ;;
+    ["Cancel Process" w3m-process-stop w3m-current-process]
     ["Reload This Page" w3m-reload-this-page w3m-current-url]
-    ["Cancel Process" w3m-process-stop t]
-    ["Toggle Images" w3m-toggle-inline-images (w3m-display-graphic-p)]
-    ;;
-    ["Redisplay This Page" w3m-redisplay-this-page w3m-current-url]
-    ["Redisplay This Page with Charset"
-     w3m-redisplay-with-charset w3m-current-url]
-    ["Redisplay This Page with Content-type"
-     w3m-redisplay-with-content-type w3m-current-url]
-    ["Reset Charset and Content-type" w3m-redisplay-and-reset w3m-current-url]
-    ;;
+    ("Redisplay"
+     ["Toggle Images" w3m-toggle-inline-images (w3m-display-graphic-p)]
+     "----" ;; separator
+     ["Redisplay This Page" w3m-redisplay-this-page w3m-current-url]
+     ["Redisplay This Page with Charset"
+      w3m-redisplay-with-charset w3m-current-url]
+     ["Redisplay This Page with Content-type"
+      w3m-redisplay-with-content-type w3m-current-url]
+     ["Reset Charset and Content-type" w3m-redisplay-and-reset w3m-current-url]
+     ) ;; end redisplay
+    ["Search the Internet..." w3m-search t]
+    ["Go to Home Page" w3m-gohome w3m-home-page]
     ["Go to..." w3m-goto-url t]
-    ["Go to... in the New Session" w3m-goto-url-new-session t]
-    ["Make a Copy of This Session" w3m-copy-buffer t]
-    ;;
+    "----" ;; separator
     ["View Bookmark" w3m-bookmark-view t]
-    ["Search the Internet" w3m-search t]
+    ("History"
+     ["Show a Visited URLs Tree" w3m-history t]
+     ["Show an Arrived URLs List" w3m-db-history t]
+     )
     ["Weather Forecast" w3m-weather t]
     ["Investigate with Antenna" w3m-antenna t]
-    ;;
-    ["View Source" w3m-view-source t]
-    ["View Header" w3m-view-header t]
-    ["Show a History" w3m-history t]
-    ["View Arrived URLs" w3m-db-history t]
-    ;;
-    ["Download This URL" w3m-download-this-url t]
-    ["Print the Current URL" w3m-print-current-url t]
-    ;;
+    ("Resource"
+     ["View Source" w3m-view-source t]
+     ["View Header" w3m-view-header t]
+     ) ;; end resource
+    "----" ;; separator
     ["Send a Bug Report" report-emacs-w3m-bug t]
-    )
+    "----" ;; separator
+    ["Print the Current URL" w3m-print-current-url t]
+    ["Close w3m" w3m-close-window t]
+    ["Quit w3m" w3m-quit t]
+    );; end w3m
   "Menubar definition for emacs-w3m.")
 
 (defvar w3m-cid-retrieve-function-alist nil)
@@ -2940,11 +2959,11 @@
 	  (define-key w3m-mode-map [menu-bar] (make-sparse-keymap))
 	  (when w3m-use-tab-menubar (w3m-setup-tab-menu))
 	  (define-key w3m-mode-map [menu-bar w3m] (cons (car w3m-menubar) map))
-	  (dolist (def (reverse (cdr w3m-menubar)))
-	    (define-key map (vector (aref def 1)) (cons (aref def 0)
-							(aref def 1)))
-	    (put (aref def 1) 'menu-enable (aref def 2)))
-	  ;;(define-key map [separator-eval] '("--"))
+	  (require 'easymenu)
+	  (easy-menu-define
+	    w3m-mode-menu w3m-mode-map
+	    "w3m menu item" w3m-menubar)
+	  (easy-menu-add w3m-mode-menu)
 	  )))))
 
 (defun w3m-fontify-images ()