XEmacs 21.2.26 "Millenium".
[chise/xemacs-chise.git.1] / lisp / menubar-items.el
index 1d400ab..0750bc8 100644 (file)
            ("Set language environment")
            "--"
            ["Toggle input method" toggle-input-method]
-           ["Select input method" select-input-method]
+           ["Select input method" set-input-method]
            ["Describe input method" describe-input-method]
            "--"
            ["Describe current coding systems"
                   (package-get-download-menu)))
        ["Update Package Index" package-get-update-base]
        ["List & Install" pui-list-packages]
-       ("Using Custom"
-       ("Select" :filter (lambda (&rest junk)
-                         (cdr (custom-menu-create 'packages))))
-       ["Update" package-get-custom])
+       ["Update Installed Packages" package-get-update-all]
+       ;; hack-o-matic, we can't force a laod of package-base here
+       ;; since it triggers dialog box interactions which we can't
+       ;; deal while using a menu
+       ("Using Custom" 
+       :filter (lambda (&rest junk)
+                 (if package-get-base
+                     (cdr (custom-menu-create 'packages))
+                   '(["Please load Package Index" (lamda (&rest junk) ()) nil]))))
+       
        ["Help" (Info-goto-node "(xemacs)Packages")])
 
       "---"
                 :selected (eq default-toolbar-position 'right)]
                )
               )))
+      ,@(if (featurep 'gutter)
+           '(("Gutter Appearance"
+              ["Visible"
+               (customize-set-variable 'gutter-visible-p
+                                       (not gutter-visible-p))
+               :style toggle
+               :selected gutter-visible-p]
+              ("Default Location"
+               ["Top"
+                (customize-set-variable 'default-gutter-position 'top)
+                :style radio
+                :selected (eq default-gutter-position 'top)]
+               ["Bottom"
+                (customize-set-variable 'default-gutter-position 'bottom)
+                :style radio
+                :selected (eq default-gutter-position 'bottom)]
+               ["Left"
+                (customize-set-variable 'default-gutter-position 'left)
+                :style radio
+                :selected (eq default-gutter-position 'left)]
+               ["Right"
+                (customize-set-variable 'default-gutter-position 'right)
+                :style radio
+                :selected (eq default-gutter-position 'right)]
+               )
+              )))
       ("Mouse"
        ["Avoid Text..."
        (customize-set-variable 'mouse-avoidance-mode
        ["No Warranty" describe-no-warranty]
        ["XEmacs License" describe-copying]
        ["The Latest Version" describe-distribution])
-      ["Send Bug Report..." report-emacs-bug]))))
+      ["Send Bug Report..." report-emacs-bug
+       :active (fboundp 'report-emacs-bug)]))))
 
 \f
 (defun maybe-add-init-button ()
 Adds `Load .emacs' button to menubar when starting up with -q."
   ;; by Stig@hackvan.com
   (cond
-   (init-file-user nil)
+   (load-user-init-file-p nil)
    ((file-exists-p (expand-file-name ".emacs" "~"))
     (add-menu-button nil
                     ["Load .emacs"
@@ -1075,7 +1108,7 @@ returns a whole bunch of info about a buffer."
   'sort-buffers-menu-by-mode-then-alphabetically
   "*If non-nil, a function to sort the list of buffers in the buffers menu.
 It will be passed two arguments (two buffers to compare) and should return
-T if the first is \"less\" than the second.  One possible value is
+t if the first is \"less\" than the second.  One possible value is
 `sort-buffers-menu-alphabetically'; another is
 `sort-buffers-menu-by-mode-then-alphabetically'."
   :type '(choice (const :tag "None" nil)
@@ -1491,10 +1524,18 @@ The menu is computed by combining `global-popup-menu' and `mode-popup-menu'."
 (defun xemacs-splash-buffer ()
   "Redisplay XEmacs splash screen in a buffer."
   (interactive)
-  (let ((buffer (get-buffer-create "*Splash*")))
+  (let ((buffer (get-buffer-create "*Splash*"))
+       tmout)
     (set-buffer buffer)
+    (setq buffer-read-only t)
     (erase-buffer buffer)
-    (startup-splash-frame)
+    (setq tmout (display-splash-frame))
+    (when tmout
+      (make-local-hook 'kill-buffer-hook)
+      (add-hook 'kill-buffer-hook
+               `(lambda ()
+                  (disable-timeout ,tmout))
+               nil t))
     (pop-to-buffer buffer)
     (delete-other-windows)))