diff lisp/package-ui.el @ 852:d83885ef293b

[xemacs-hg @ 2002-05-25 01:55:29 by youngs] 2002-05-25 Steve Youngs <youngs@xemacs.org> * package-ui.el (pui-help-echo): Display both installed and author version. Use a balloon-help window to display extra info like package requires.
author youngs
date Sat, 25 May 2002 01:55:30 +0000
parents 59c2a61efa7d
children 02909207294a
line wrap: on
line diff
--- a/lisp/package-ui.el	Thu May 23 11:46:46 2002 +0000
+++ b/lisp/package-ui.el	Sat May 25 01:55:30 2002 +0000
@@ -488,7 +488,7 @@
   "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))
 	    )
@@ -498,14 +498,29 @@
 		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)
-	      (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
-	      (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))
 	  ))
     ))