Add some GT code points.
[chise/xemacs-chise.git.1] / lisp / package-ui.el
index c349ca2..c0b93ad 100644 (file)
@@ -31,7 +31,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defgroup pui nil
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defgroup pui nil
-  "Conventient interface to the package system."
+  "Convenient interface to the package system."
   :group 'package-tools
   :tag "Package User interface"
   :prefix "pui-")
   :group 'package-tools
   :tag "Package User interface"
   :prefix "pui-")
@@ -309,7 +309,7 @@ and whether or not it is up-to-date."
              (delete pkg-sym pui-deleted-packages))
       (setq pui-deleted-packages
            (cons pkg-sym pui-deleted-packages))
              (delete pkg-sym pui-deleted-packages))
       (setq pui-deleted-packages
            (cons pkg-sym pui-deleted-packages))
-      (setq pui-seleted-packages
+      (setq pui-selected-packages
            (delete pkg-sym pui-selected-packages)))
     (pui-update-package-display extent pkg-sym)
     ))
            (delete pkg-sym pui-selected-packages)))
     (pui-update-package-display extent pkg-sym)
     ))
@@ -373,7 +373,7 @@ and whether or not it is up-to-date."
        (mapcar (lambda (pkg)
                  (package-admin-delete-binary-package
                   pkg (package-admin-get-install-dir pkg nil)))
        (mapcar (lambda (pkg)
                  (package-admin-delete-binary-package
                   pkg (package-admin-get-install-dir pkg nil)))
-               pui-deleted-packages)
+               (nreverse pui-deleted-packages))
        (message "Packages deleted"))))
         
   (let ( (tmpbuf "*Packages-To-Install*") do-install)
        (message "Packages deleted"))))
         
   (let ( (tmpbuf "*Packages-To-Install*") do-install)
@@ -411,7 +411,7 @@ and whether or not it is up-to-date."
                                (if (not (package-get pkg nil nil
                                                       pui-package-install-dest-dir))
                                    (throw 'done nil)))
                                (if (not (package-get pkg nil nil
                                                       pui-package-install-dest-dir))
                                    (throw 'done nil)))
-                             pui-selected-packages)
+                             (nreverse pui-selected-packages))
                      t)
                    (progn
                      (pui-list-packages)
                      t)
                    (progn
                      (pui-list-packages)
@@ -424,6 +424,8 @@ and whether or not it is up-to-date."
       (if pui-deleted-packages
          (pui-list-packages)
        (error "No packages have been selected!")))
       (if pui-deleted-packages
          (pui-list-packages)
        (error "No packages have been selected!")))
+    ;; sync with windows type systems
+    (package-net-update-installed-db)
     ))
 
 (defun pui-add-required-packages ()
     ))
 
 (defun pui-add-required-packages ()
@@ -486,7 +488,7 @@ and whether or not it is up-to-date."
   "Display additional package info in the modeline.
 EXTENT determines the package to display (the package information is
 attached to the extent as properties)."
   "Display additional package info in the modeline.
 EXTENT determines the package to display (the package information is
 attached to the extent as properties)."
-  (let (pkg-sym info inst-ver auth-ver date maintainer)
+  (let (pkg-sym info inst-ver auth-ver date maintainer balloon req)
     (if (or force-update (not (current-message))
            (string-match ".*: .*: " (current-message))
            )
     (if (or force-update (not (current-message))
            (string-match ".*: .*: " (current-message))
            )
@@ -496,14 +498,29 @@ attached to the extent as properties)."
                inst-ver (package-get-key pkg-sym :version)
                auth-ver (package-get-info-prop info 'author-version)
                date (package-get-info-prop info 'date)
                inst-ver (package-get-key pkg-sym :version)
                auth-ver (package-get-info-prop info 'author-version)
                date (package-get-info-prop info 'date)
-               maintainer (package-get-info-prop info 'maintainer))
+               maintainer (package-get-info-prop info 'maintainer)
+               req (package-get-info-prop info 'requires))
          (if (not inst-ver)
          (if (not inst-ver)
-             (setq inst-ver ""))
+             (setq inst-ver 0))
+         (if (featurep 'balloon-help)
+             (progn
+               (setq balloon (format "
+Package Information:  [For package: \"%s\"]
+================
+Installed Version : %.2f
+Author Version : %s
+Maintainer: %s
+Released: %s
+Required Packages : %s\n\n"
+                                     pkg-sym inst-ver auth-ver maintainer 
+                                     date req))
+               (set-extent-property extent 'balloon-help balloon)))
          (if pui-list-verbose
          (if pui-list-verbose
-             (format "Author version: %-8s %11s: %s"
-                     auth-ver date maintainer)
-           (format "%-6s: %-8s %11s: %s"
-                   inst-ver auth-ver date maintainer))
+             (format 
+              "Inst V: %.2f Auth V: %s Maint: %s" 
+              inst-ver auth-ver maintainer)
+           (format "%.2f : %s : %s"
+                   inst-ver auth-ver maintainer))
          ))
     ))
 
          ))
     ))
 
@@ -521,17 +538,6 @@ Designed to be called interactively (from a keypress)."
          (error "No package under cursor!")))
       )))
 
          (error "No package under cursor!")))
       )))
 
-;;; "Why is there no standard function to do this?"
-(defun pui-popup-context-sensitive (event)
-  (interactive "e")
-  (save-excursion
-    (set-buffer (event-buffer event))
-    (goto-char (event-point event))
-    (popup-menu pui-menu event)
-    ;; I agree with dired.el - this is seriously bogus.
-    (while (popup-menu-up-p)
-      (dispatch-event (next-event)))))
-
 (defvar pui-menu
   '("Packages"
     ["Toggle install " pui-toggle-package-key :active (pui-current-package) :suffix (format "`%s'" (or (pui-current-package) "..."))]
 (defvar pui-menu
   '("Packages"
     ["Toggle install " pui-toggle-package-key :active (pui-current-package) :suffix (format "`%s'" (or (pui-current-package) "..."))]
@@ -547,6 +553,16 @@ Designed to be called interactively (from a keypress)."
     ["Help" pui-help t]
     ["Quit" pui-quit t]))
 
     ["Help" pui-help t]
     ["Quit" pui-quit t]))
 
+;;; "Why is there no standard function to do this?"
+(defun pui-popup-context-sensitive (event)
+  (interactive "e")
+  (save-excursion
+    (set-buffer (event-buffer event))
+    (goto-char (event-point event))
+    (popup-menu pui-menu event)
+    ;; I agree with dired.el - this is seriously bogus.
+    (while (popup-up-p)
+      (dispatch-event (next-event)))))
 
 (defun list-packages-mode ()
     "Symbols in the leftmost column:
 
 (defun list-packages-mode ()
     "Symbols in the leftmost column: