From: Dietmar Maurer Date: Wed, 14 Jan 2015 08:05:13 +0000 (+0100) Subject: disable size option with zfs X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f7b853d175c7e80327290d27bbfcda433722e87c;p=pve-installer.git disable size option with zfs --- diff --git a/proxinstall b/proxinstall index dd44e67..d7c57c5 100755 --- a/proxinstall +++ b/proxinstall @@ -1944,9 +1944,6 @@ sub create_hdoption_view { $fstypecb->set_active (0); } - $fstypecb->signal_connect (changed => sub { - $config_options->{filesys} = $fstypecb->get_active_text(); - }); $grid->attach($fstypecb, 1, 0, 1, 1); my $label_hdsize = Gtk3::Label->new ("hdsize"); @@ -2006,6 +2003,23 @@ sub create_hdoption_view { $entry_maxvz->set_text($config_options->{maxvz}) if $config_options->{maxvz}; $grid->attach($entry_maxvz, 1, 5, 1, 1); + my $set_sensitive_flag = sub { + my $sensitive = $config_options->{filesys} ne 'zfs'; + $spinbutton_hdsize->set_sensitive($sensitive); + $entry_swapsize->set_sensitive($sensitive); + $entry_maxroot->set_sensitive($sensitive); + $entry_minfree->set_sensitive($sensitive); + $label_maxvz->set_sensitive($sensitive); + $entry_maxvz->set_sensitive($sensitive); + }; + + &$set_sensitive_flag(); + + $fstypecb->signal_connect (changed => sub { + $config_options->{filesys} = $fstypecb->get_active_text(); + &$set_sensitive_flag(); + }); + $dialog->show_all; $dialog->run();