summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive_gtk.pm
diff options
context:
space:
mode:
authorpad <pad@mandriva.com>1999-09-03 13:44:30 +0000
committerpad <pad@mandriva.com>1999-09-03 13:44:30 +0000
commit59a71876a17e616e3706c80cddf3e74f34bbcf67 (patch)
treee52f9979a37b9e3256a5f764d8c9f4cc85b9464f /perl-install/interactive_gtk.pm
parent874f08a1316d73d6f09f0ca2df235dac495a387b (diff)
downloaddrakx-59a71876a17e616e3706c80cddf3e74f34bbcf67.tar
drakx-59a71876a17e616e3706c80cddf3e74f34bbcf67.tar.gz
drakx-59a71876a17e616e3706c80cddf3e74f34bbcf67.tar.bz2
drakx-59a71876a17e616e3706c80cddf3e74f34bbcf67.tar.xz
drakx-59a71876a17e616e3706c80cddf3e74f34bbcf67.zip
pad stuff
Diffstat (limited to 'perl-install/interactive_gtk.pm')
-rw-r--r--perl-install/interactive_gtk.pm31
1 files changed, 29 insertions, 2 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index 47e978229..fcebb2b08 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -7,7 +7,7 @@ use vars qw(@ISA);
@ISA = qw(interactive);
use interactive;
-use common qw(:common);
+use common qw(:common :functional);
use my_gtk qw(:helpers :wrappers);
1;
@@ -25,7 +25,6 @@ sub ask_from_entryW {
$w->_ask_from_entry(@$messages);
$w->main;
}
-
sub ask_from_listW {
my ($o, $title, $messages, $l, $def) = @_;
@@ -73,6 +72,34 @@ sub ask_many_from_list_refW {
$w->main && $val;
}
+
+sub ask_from_entries_refW {
+ my ($o, $title, $messages, $l, $val) = @_;
+
+ my @entry_list = mapn {
+ my $entry = new Gtk::Entry;
+ my $ref = $_[1];
+ my $update = sub {
+ ${$ref} = $entry->get_text;
+ };
+ $entry->signal_connect(changed => $update);
+ $entry->set_text(${$_[1]}) if ${$_[1]};
+ $entry->set_visibility(0) if $_[0] =~ /password/;
+ &$update;
+ [($_[0], $entry)];
+ } $l, $val;
+
+ my $w = my_gtk->new($title, %$o);
+ gtkadd($w->{window},
+ gtkpack(
+ create_box_with_title($w, @$messages),
+ create_packtable({}, @entry_list),
+ $w->create_okcancel));
+
+ $w->main();
+}
+
+
sub wait_messageW($$$) {
my ($o, $title, $message) = @_;