Browse Source

This remembers uml options which is a nice thing.

master
freesource 24 years ago
parent
commit
aac58339db
  1. 43
      gBootRoot

43
gBootRoot

@ -246,6 +246,12 @@ home_builder($home_rootfs);
# $HOME/.gbootroot/uml_kernel
home_builder($home_uml_kernel);
if (!-e "$home_uml_kernel/.options") {
open(OPTIONS,">$home_uml_kernel/.options")
or die "Couldn't write $home_uml_kernel/.options at $?\n";
print OPTIONS "root=/dev/ubd0\n";
close(OPTIONS);
}
sub home_builder {
@ -969,8 +975,8 @@ sub advanced_root_section {
$combo->entry->signal_connect("changed", sub {
$entry_advanced[7] = $combo->entry->get_text();
$ars->{template} = $entry_advanced[7];
ars($ars);
} );
ars($ars);
} );
$table_advanced_root->attach($combo,1,3,7,8,
['expand','fill'],['fill','shrink'],0,0);
show $combo;
@ -1048,8 +1054,30 @@ sub uml_box {
#_______________________________________
# UML options
label_advanced("Options:",0,1,1,2,$table_uml);
$eab2 = entry_advanced(1,3,1,2,9,$table_uml);
$eab2->set_text("root=/dev/ubd0");
#$eab2 = entry_advanced(1,3,1,2,9,$table_uml);
#$eab2->set_text("root=/dev/ubd0");
$eab2 = Gtk::Combo->new();
$table_uml->attach($eab2,1,3,1,2,
['expand','fill'],['fill','shrink'],0,0);
open(OPTIONS,"$home_uml_kernel/.options");
my @initial_options = <OPTIONS>;
close(OPTIONS); chomp @initial_options;
$eab2->entry->set_text($initial_options[0]);
$entry_advanced[9] = $eab2->entry->get_text();
$eab2->set_popdown_strings( @initial_options ) ;
$eab2->entry->signal_connect("changed", sub {
$entry_advanced[9] = $eab2->entry->get_text();
open(OPTIONS,">$home_uml_kernel/.options");
$entry_advanced[9] =~ s/\n/ /g;
print OPTIONS "$entry_advanced[9]\n";
foreach (@initial_options) {
if ($_ ne "$entry_advanced[9]") {
print OPTIONS "$_\n";
}
}
close(OPTIONS);
} );
$eab2->show();
#_______________________________________
# Root Filesystem defaults to generated one if found.
@ -1070,6 +1098,11 @@ sub uml_box {
# UML kernel = $entry_advanced[5]
# xterm -e linux ubd#=root_fs
# root=/dev/ubd#
open(OPTIONS,"$home_uml_kernel/.options");
@initial_options = <OPTIONS>;
close(OPTIONS); chomp @initial_options;
$eab2->set_popdown_strings( @initial_options ) ;
my $pid;
if ($entry_advanced[8] &&
$entry_advanced[10]) {
@ -1100,6 +1133,7 @@ sub uml_box {
}
waitpid($pid,0);
}
else {
if (!$entry_advanced[8]) {
@ -1116,6 +1150,7 @@ sub uml_box {
}
}
} );

Loading…
Cancel
Save