installer: partition: Differenciate Back button from Exit button.
* gnu/installer/newt/partition.scm (run-label-page): Pass the button text as an argument, (run-disk-page): Call run-label-page with the appropriate button text.
This commit is contained in:
		
							parent
							
								
									77c00b1e57
								
							
						
					
					
						commit
						cbeb27025f
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
					@ -76,7 +76,7 @@ DEVICES list."
 | 
				
			||||||
         (device (car result)))
 | 
					         (device (car result)))
 | 
				
			||||||
    device))
 | 
					    device))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (run-label-page button-callback)
 | 
					(define (run-label-page button-text button-callback)
 | 
				
			||||||
  "Run a page asking the user to select a partition table label."
 | 
					  "Run a page asking the user to select a partition table label."
 | 
				
			||||||
  (run-listbox-selection-page
 | 
					  (run-listbox-selection-page
 | 
				
			||||||
   #:info-text (G_ "Select a new partition table type. \
 | 
					   #:info-text (G_ "Select a new partition table type. \
 | 
				
			||||||
| 
						 | 
					@ -84,7 +84,7 @@ Be careful, all data on the disk will be lost.")
 | 
				
			||||||
   #:title (G_ "Partition table")
 | 
					   #:title (G_ "Partition table")
 | 
				
			||||||
   #:listbox-items '("msdos" "gpt")
 | 
					   #:listbox-items '("msdos" "gpt")
 | 
				
			||||||
   #:listbox-item->text identity
 | 
					   #:listbox-item->text identity
 | 
				
			||||||
   #:button-text (G_ "Exit")
 | 
					   #:button-text button-text
 | 
				
			||||||
   #:button-callback-procedure button-callback))
 | 
					   #:button-callback-procedure button-callback))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (run-type-page partition)
 | 
					(define (run-type-page partition)
 | 
				
			||||||
| 
						 | 
					@ -519,7 +519,7 @@ edit it."
 | 
				
			||||||
    (let ((item (car listbox-item)))
 | 
					    (let ((item (car listbox-item)))
 | 
				
			||||||
      (cond
 | 
					      (cond
 | 
				
			||||||
       ((disk? item)
 | 
					       ((disk? item)
 | 
				
			||||||
        (let ((label (run-label-page (const #f))))
 | 
					        (let ((label (run-label-page (G_ "Back") (const #f))))
 | 
				
			||||||
          (if label
 | 
					          (if label
 | 
				
			||||||
              (let* ((device (disk-device item))
 | 
					              (let* ((device (disk-device item))
 | 
				
			||||||
                     (new-disk (mklabel device label))
 | 
					                     (new-disk (mklabel device label))
 | 
				
			||||||
| 
						 | 
					@ -674,6 +674,7 @@ At least one partition must have its mounting point set to '/'.")
 | 
				
			||||||
                (disk (if disk-type
 | 
					                (disk (if disk-type
 | 
				
			||||||
                          (disk-new device)
 | 
					                          (disk-new device)
 | 
				
			||||||
                          (let* ((label (run-label-page
 | 
					                          (let* ((label (run-label-page
 | 
				
			||||||
 | 
					                                         (G_ "Exit")
 | 
				
			||||||
                                         button-exit-action))
 | 
					                                         button-exit-action))
 | 
				
			||||||
                                 (disk (mklabel device label)))
 | 
					                                 (disk (mklabel device label)))
 | 
				
			||||||
                            (disk-commit disk)
 | 
					                            (disk-commit disk)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue