changeset 1374:d638fc15d68b

[xemacs-hg @ 2003-03-24 11:10:54 by adrian] [PATCH] xemacs-21.5: Prototype categorizing dowload sites into Official, Pre-, Site <of42qexg.fsf@ecf.teradyne.com>
author adrian
date Mon, 24 Mar 2003 11:10:55 +0000
parents 454552c204e8
children 0b6d70f7d49c
files lisp/ChangeLog lisp/menubar-items.el lisp/package-get.el lisp/package-ui.el
diffstat 4 files changed, 59 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Mar 23 22:52:26 2003 +0000
+++ b/lisp/ChangeLog	Mon Mar 24 11:10:55 2003 +0000
@@ -1,3 +1,16 @@
+2003-03-23  Adrian Aichner  <adrian@xemacs.org>
+
+	* menubar-items.el (default-menubar): Reword "Add Download Site"
+	to the more appropriate "Set Download Site".  Categorize download
+	sites under separate menu entries for "Offical", "Pre-", and
+	"Site" Releases so that users only need to customize
+	`package-get-site-release-download-sites'.
+	* package-get.el (package-get-download-sites): Fix typo.
+	* package-get.el (package-get-site-release-download-sites): New.
+	Add support for "Site Releases".
+	* package-ui.el (package-ui-site-release-download-menu): New.
+	Ditto.
+
 2003-03-21  Adrian Aichner  <adrian@xemacs.org>
 
 	* package-get.el: Globally remove trailing whitespace.
--- a/lisp/menubar-items.el	Sun Mar 23 22:52:26 2003 +0000
+++ b/lisp/menubar-items.el	Mon Mar 24 11:10:55 2003 +0000
@@ -567,16 +567,22 @@
      
      ("%_Tools"
       ("%_Packages"
-       ("%_Add Download Site"
-	:filter (lambda (&rest junk)
-		  (menu-split-long-menu
-		   (submenu-generate-accelerator-spec
-		    (package-ui-download-menu)))))
-       ("%_Pre-Release Download Sites"
-	:filter (lambda (&rest junk)
-		  (menu-split-long-menu
-		   (submenu-generate-accelerator-spec
-		    (package-ui-pre-release-download-menu)))))
+       ("%_Set Download Site"
+	("%_Official Releases"
+	 :filter (lambda (&rest junk)
+		   (menu-split-long-menu
+		    (submenu-generate-accelerator-spec
+		     (package-ui-download-menu)))))
+	("%_Pre-Releases"
+	 :filter (lambda (&rest junk)
+		   (menu-split-long-menu
+		    (submenu-generate-accelerator-spec
+		     (package-ui-pre-release-download-menu)))))
+	("%_Site Releases"
+	 :filter (lambda (&rest junk)
+		   (menu-split-long-menu
+		    (submenu-generate-accelerator-spec
+		     (package-ui-site-release-download-menu))))))
        "--:shadowEtchedIn"
        ["%_Update Package Index" package-get-update-base]
        ["%_List and Install" pui-list-packages]
--- a/lisp/package-get.el	Sun Mar 23 22:52:26 2003 +0000
+++ b/lisp/package-get.el	Mon Mar 24 11:10:55 2003 +0000
@@ -214,7 +214,7 @@
     ("Japan (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/GNU/xemacs/packages")
     ("Japan (nucba.ac.jp)" "mirror.nucba.ac.jp" "mirror/xemacs/packages")
     ("Japan (sut.ac.jp)" "sunsite.sut.ac.jp" "pub/archives/packages/xemacs/packages")
-    ("Korea (kr.xemacs.org))" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/packages")
+    ("Korea (kr.xemacs.org)" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/packages")
     ("New Zealand (nz.xemacs.org)" "ftp.nz.xemacs.org" "mirror/ftp.xemacs.org/packages")
     ("Norway (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/packages")
     ("Poland (pl.xemacs.org)" "ftp.pl.xemacs.org" "pub/unix/editors/xemacs/packages")
@@ -334,6 +334,20 @@
   :type '(repeat (list (string :tag "Name") host-name directory))
   :group 'package-get)
 
+;;;###autoload
+(defcustom package-get-site-release-download-sites
+  nil
+  "*List of remote sites available for downloading \"Site Release\" packages.
+List format is '(site-description site-name directory-on-site).
+SITE-DESCRIPTION is a textual description of the site.  SITE-NAME
+is the internet address of the download site.  DIRECTORY-ON-SITE
+is the directory on the site in which packages may be found.
+This variable is used to initialize `package-get-remote', the
+variable actually used to specify package download sites."
+  :tag "Site Release Package download sites"
+  :type '(repeat (list (string :tag "Name") host-name directory))
+  :group 'package-get)
+
 (defcustom package-get-remove-copy t
   "*After copying and installing a package, if this is t, then remove the
 copy.  Otherwise, keep it around."
--- a/lisp/package-ui.el	Sun Mar 23 22:52:26 2003 +0000
+++ b/lisp/package-ui.el	Mon Mar 24 11:10:55 2003 +0000
@@ -181,6 +181,21 @@
   	  package-get-pre-release-download-sites))
 
 ;;;###autoload
+(defun package-ui-site-release-download-menu ()
+  "Build the 'Site Release Download Sites' menu."
+  (mapcar (lambda (site)
+  	    (vector (car site)
+  		    `(if (equal package-get-remote (quote ,(cdr site)))
+ 		      (setq package-get-remote nil)
+ 		      (package-ui-add-site (quote ,(cdr site))))
+		    ;; I've used radio buttons so that only a single
+		    ;; site can be selected, but they are in fact
+		    ;; toggles.  SY.
+  		    :style 'radio
+  		    :selected `(equal package-get-remote (quote ,(cdr site)))))
+  	  package-get-site-release-download-sites))
+
+;;;###autoload
 (defun pui-set-local-package-get-directory (dir)
   "Set a new package binary directory in `package-get-remote'.
 Note that no provision is made for saving any changes made by this function.