Ignore:
Timestamp:
Mar 29, 2014, 7:21:58 PM (6 years ago)
Author:
cal@…
Message:

base: Delay displaying notes for installed ports until the end of the current operation

Mostly written by Jeremy Lavergne (snc).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portactivate.tcl

    r116820 r118304  
    6161
    6262proc portactivate::activate_main {args} {
    63     global env subport version revision portvariants user_options PortInfo startupitem.autostart UI_PREFIX
     63    global subport version revision portvariants user_options PortInfo
    6464
    6565    registry_activate $subport $version $revision $portvariants [array get user_options]
    66 
    67     # Display notes at the end of the activation phase.
    68     if {[info exists PortInfo(notes)] && $PortInfo(notes) ne {}} {
    69         ui_notice ""
    70         foreach note $PortInfo(notes) {
    71             # If env(COLUMNS) exists, limit each line's width to this width.
    72             if {[info exists env(COLUMNS)]} {
    73                 set maxlen $env(COLUMNS)
    74 
    75                 foreach line [split $note "\n"] {
    76                     set joiner ""
    77                     set lines ""
    78                     set newline ""
    79 
    80                     foreach word [split $line " "] {
    81                         if {[string length $newline] + [string length $word] >= $maxlen} {
    82                             lappend lines $newline
    83                             set newline ""
    84                             set joiner ""
    85                         }
    86                         append newline $joiner $word
    87                         set joiner " "
    88                     }
    89                     if {$newline ne {}} {
    90                         lappend lines $newline
    91                     }
    92                     ui_notice [join $lines "\n"]
    93                 }
    94             } else {
    95                 ui_notice $note
    96             }
    97         }
    98         ui_notice ""
     66    if {[info exists PortInfo(notes)] && [llength $PortInfo(notes)] > 0} {
     67        ui_notifications_append $subport $PortInfo(notes)
    9968    }
    10069
Note: See TracChangeset for help on using the changeset viewer.