# version functions
-sub version_greater() {
+sub version_greater_or_equal() {
my ($version, $refvers) = @_;
my @version = split (/\./, $version);
my @refvers = split (/\./, $refvers);
++$idx;
}
return TRUE if (($idx > $#refvers)
- or (int ($version[$idx]) > int ($refvers[$idx])));
+ or (int ($version[$idx]) >= int ($refvers[$idx])));
return FALSE;
}
}
}
+sub set_widget_sens() {
+ my ($wdgt, $minver) = @_;
+ $wdgt->set_sensitive (&version_greater_or_equal ($CLAWSV, $minver));
+}
+
# graphic element creation
sub new_check_button_for {
&handle_bool_value($w, $e, \$HPVALUE{$name});
});
&set_widget_hint ($cb, $$hash{$key}[DESC]);
+ &set_widget_sens ($cb, $$hash{$key}[CMVER]);
$hbox->pack_start ($cb, FALSE, FALSE, HBOX_SPC);
#
return $hbox;
&handle_int_value($w, $e, \$HPVALUE{$name});
});
&set_widget_hint ($gentry, $$hash{$key}[DESC]);
+ &set_widget_sens ($gentry, $$hash{$key}[CMVER]);
+ $glabel->set_sensitive ($gentry->sensitive);
$hbox->pack_start ($glabel, FALSE, FALSE, HBOX_SPC);
$hbox->pack_start ($gentry, FALSE, FALSE, HBOX_SPC);
#
&handle_color_value($w, $e, \$HPVALUE{$name});
});
&set_widget_hint ($button, $$hash{$key}[DESC]);
+ &set_widget_sens ($button, $$hash{$key}[CMVER]);
+ $glabel->set_sensitive ($button->sensitive);
$hbox->pack_start ($button, FALSE, FALSE, HBOX_SPC);
$hbox->pack_start ($glabel, FALSE, FALSE, HBOX_SPC);
#
});
$combo->set_active ($HPVALUE{$name});
&set_widget_hint ($combo, $$hash{$key}[DESC]);
+ &set_widget_sens ($combo, $$hash{$key}[CMVER]);
+ $glabel->set_sensitive ($combo->sensitive);
$hbox->pack_start ($glabel, FALSE, FALSE, HBOX_SPC);
$hbox->pack_start ($combo, FALSE, FALSE, HBOX_SPC);
#
&command_line_fatal ("required a dotted numeric value")
unless ($ARGV[$arg] =~ /[\d\.]+/);
$CLAWSV = $ARGV[$arg];
+ last;
};
/--alternate-config-dir/ && do {
++$arg;