From 9de4fc1d565e47305db903cf3649f0e4679ad587 Mon Sep 17 00:00:00 2001 From: freesource Date: Mon, 4 Mar 2002 20:33:19 +0000 Subject: [PATCH] Remembers state for the new mtd emulation. --- BootRoot/BootRoot.pm | 32 ++++++++++++++++++++++++++++---- Changes | 6 ++++-- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/BootRoot/BootRoot.pm b/BootRoot/BootRoot.pm index d16cb0e..dc31cab 100644 --- a/BootRoot/BootRoot.pm +++ b/BootRoot/BootRoot.pm @@ -135,7 +135,8 @@ my @entry_advanced; my ($ea1,$ea2,$ea3,$ea4,$ea5,$ea6); # entry advanced boot my ($ear1,$ear2,$ear2_save,$ear3,$ear4); # entry advanced root my ($eab1,$eab2,$eab3,$eab4); # entry advanced uml -my ($mtd_radio, $mtd_fs_type, $mtd_fs_type_combo, @fs_types); # entry advanced uml +my ($mtd_radio, $mtd_fs_type, $mtd_fs_type_combo, @fs_types, + $mtd_radio_mtdram, $mtd_radio_blkmtd, $mtd_check); # mtd uml box my $uml_window; my $table_advanced; my $table_advanced_root; @@ -1576,17 +1577,36 @@ sub uml_box { # Which? label_advanced("MTD:",0,1,3,4,$table_uml); - my $mtd_check = Gtk::CheckButton->new("On or Off"); + my $mtd_check_on; + if ( $mtd_check ) { + if ( $mtd_check->get_active() ) { + $mtd_check_on = 1; + } + } + $mtd_check = Gtk::CheckButton->new("On or Off"); $tooltips->set_tip( $mtd_check, "Turn MTD emulation on or off.", "" ); - #$mtd_check->set_active($boolean); + $mtd_check->set_active( $true ) if $mtd_check_on; $table_uml->attach($mtd_check,1,2,3,4, ['expand','fill'],['fill','shrink'],0,0); $mtd_check->show(); + + my ($mtdram_on, $blkmtd_on); + if ( $mtd_radio_mtdram ) { + if ( $mtd_radio_mtdram->get_active() ) { + $mtdram_on = 1; + } + else { + $blkmtd_on = 1; + } + } + # mtdram $mtd_radio = Gtk::RadioButton->new("mtdram"); + $mtd_radio_mtdram = $mtd_radio; + $mtd_radio->set_active( $true ) if $mtdram_on; $tooltips->set_tip( $mtd_radio, "Use memory to emulate test mtd device.", "" ); @@ -1596,6 +1616,8 @@ sub uml_box { # blkmtd $mtd_radio = Gtk::RadioButton->new("blkmtd", $mtd_radio); + $mtd_radio_blkmtd = $mtd_radio; + $mtd_radio->set_active( $true ) if $blkmtd_on; $tooltips->set_tip( $mtd_radio, "Use block device to emulate test mtd device.", "" ); @@ -1603,6 +1625,7 @@ sub uml_box { ['shrink','expand','fill'],['fill','shrink'],0,0); $mtd_radio->show(); + # fs_type - users can define their own, but this won't be remembered. $mtd_fs_type_combo = Gtk::Combo->new(); $tooltips->set_tip( Gtk::Combo::entry($mtd_fs_type_combo), @@ -1611,7 +1634,7 @@ sub uml_box { $table_uml->attach($mtd_fs_type_combo,4,5,3,4, ['shrink','expand','fill'],['fill','shrink'],20,0); if ( !$mtd_fs_type ) { - @fs_types = qw(jffs2 jffs ext2 ext3 minix cramfs romfs reisers); + @fs_types = qw(jffs2 jffs ext2 ext3 minix cramfs romfs reiserfs); $mtd_fs_type_combo->entry->set_text( $fs_types[0] ); $mtd_fs_type_combo->set_popdown_strings( @fs_types ); } @@ -1630,6 +1653,7 @@ sub uml_box { $mtd_fs_type_combo->show(); + $table_uml->set_row_spacing( 4, 6); diff --git a/Changes b/Changes index ba7f711..afb056f 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,9 @@ Added cad "Ctrl-Alt-Del" to mconsole interface, and documented it. -Now looks for mconsole at both old location /tmp/uml/$umid/mconsole and -new location $ENV{HOME}/.uml/$umid/mconsole. +Now looks for mconsole at both Locations /tmp/uml/$umid/mconsole and +new location $ENV{HOME}/.uml/$umid/mconsole by not specifying a direct +path. Some older mconsoles seemed to require this, but 10um onwards +respects this. Now files for uml_exclusively are made in create_expect_uml which is effectively known as the create stage. This avoids the unecessary previous