system_info sub in bin/mh

View: New views
1 Messages — Rating Filter:   Alert me  

system_info sub in bin/mh

by dmark :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From SVN:

sub system_info {
        display "time=0 app=system window_name=info System Info"
}

From mine (submitted last fall):

sub system_info {
        my $display = display("time=0 wait=1 app=system window_name=system_info type=empty System Info");

        if (!$$display{activated}) {
                my $element;
       
                $element = $$display{MW}->Label(-textvariable => \$Info{User}, -justify => 'center');
        $element->pack(qw/-side top -padx 2 -anchor n/);
                &configure_element('label', \$element);
                $element = $$display{MW}->Label(-textvariable => \$Info{Machine}, -justify => 'center');
        $element->pack(qw/-side top -padx 2 -anchor n/);
                &configure_element('label', \$element);
                $element = $$display{MW}->Label(-textvariable => \$Info{OS_name}, -justify => 'center');
        $element->pack(qw/-side top -padx 2 -anchor n/);
                &configure_element('label', \$element);
                $element = $$display{MW}->Label(-textvariable => \$Tk_objects{label_uptime_cpu}, -justify => 'center');
        $element->pack(qw/-side bottom -padx 2 -anchor n/);
                &configure_element('label', \$element);
                $element = $$display{MW}->Label(-textvariable => \$Tk_objects{label_uptime_mh}, -justify => 'center');
                $element->pack(qw/-side bottom -padx 2 -anchor n/);
                &configure_element('label', \$element);
                $element = $$display{MW}->Label(-textvariable => \$Tk_objects{label_cpu_used}, -justify => 'center');
        $element->pack(qw/-side bottom -padx 2 -anchor n/);
                &configure_element('label', \$element);
                $element = $$display{MW}->Label(-textvariable => \$Tk_objects{label_memory_used}, -justify => 'center') unless $Info{OS_name} =~ /Win/; # Works for NT/2k
                $element->pack(qw/-side bottom -padx 2 -anchor n/);
                &configure_element('label', \$element);
                $display->activate();
        }

}

I wouldn't mind this laziness (and/or stupidity) so much, but these guys want to be the conduit for my changes.  They obviously can't handle the workload.  The original sub was just a placeholder.  I put it in there and I filled it in a month or two later, but by that time the "geniuses" had locked out my changes.  There are several of these loose ends in bin/mh.  How many years before they take five minutes and paste in these updates?