From dee6cbaeafba78e97f4c7f8c2420f80e95d3d4e5 Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Fri, 8 Jul 2005 14:39:34 +0000 Subject: add a checkbox to enable/disable advanced options --- perl-install/standalone/draknfs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/perl-install/standalone/draknfs b/perl-install/standalone/draknfs index e3c78180c..6e7e3b763 100644 --- a/perl-install/standalone/draknfs +++ b/perl-install/standalone/draknfs @@ -328,6 +328,17 @@ sub add_modify_entry { $anonuid->set_sensitive(0); } + my $advanced = Gtk2::CheckButton->new("Enable advanced options"); + $advanced->set_active(0); + foreach ($lsync, $lr, $lsecure) { $_->set_sensitive(0) } + $advanced->signal_connect(clicked => sub { + if ($advanced->get_active =~ /1/) { + foreach ($lsync, $lr, $lsecure) { $_->set_sensitive(1) } + } else { + foreach ($lsync, $lr, $lsecure) { $_->set_sensitive(0) } + } + }); + gtkpack_($dialog->vbox, 0, gtkadd(Gtk2::Frame->new(N("NFS directory")), gtkpack_(gtkset_border_width(Gtk2::VBox->new, 5), @@ -348,6 +359,7 @@ sub add_modify_entry { ), 0, gtkadd(Gtk2::Frame->new(N("Advanced Options")), gtkpack_(gtkset_border_width(Gtk2::VBox->new, 5), + 0, $advanced, 0, $label_and_widgets->(N("Synchronous access:"), $lsync, help_b(N_("Help Adcanced options"), create_pango_help_box($help_global))), 0, $label_and_widgets->(N("Secured Connection:"), $lsecure, ""), 0, $label_and_widgets->(N("Read-Only share:"), $lr, ""), -- cgit v1.2.1