summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpad <pad@mandriva.com>1999-09-05 22:59:26 +0000
committerpad <pad@mandriva.com>1999-09-05 22:59:26 +0000
commit5798823e331c86fb3f97593b0cd2820224767d15 (patch)
tree5dccbae0c0d401beeb09a46154847884e1f474b3
parent38dce4a6d02d689b7aefa2b5f925ac5441c51a89 (diff)
downloaddrakx-5798823e331c86fb3f97593b0cd2820224767d15.tar
drakx-5798823e331c86fb3f97593b0cd2820224767d15.tar.gz
drakx-5798823e331c86fb3f97593b0cd2820224767d15.tar.bz2
drakx-5798823e331c86fb3f97593b0cd2820224767d15.tar.xz
drakx-5798823e331c86fb3f97593b0cd2820224767d15.zip
focus_out
-rw-r--r--perl-install/commands.pm2
-rw-r--r--perl-install/install_steps_interactive.pm2
-rw-r--r--perl-install/interactive_gtk.pm21
-rw-r--r--perl-install/log.pm12
4 files changed, 29 insertions, 8 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index bd511c850..b345acacb 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -10,7 +10,6 @@ my $BUFFER_SIZE = 1024;
1;
-
sub getopts {
my $o = shift;
my @r = map { '' } (@_ = split //, $_[0]);
@@ -212,7 +211,6 @@ sub ls {
} else { print "$_\n"; }
}
}
-
sub cp {
my ($force) = getopts(\@_, qw(f));
@_ >= 2 or die "usage: cp [-f] <sources> <dest>\n(this cp does -Rl by default)\n";
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 15292eb39..a4571ec7b 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -225,7 +225,7 @@ name (often lp) and a spool directory associated with it. What
name and directory should be used for this queue?"),
[_("Name of queue:"), _("Spool directory:")],
[\$o->{printer}{QUEUE}, \$o->{printer}{SPOOLDIR}],
- changed => sub
+ focus_out => sub
{
$o->{printer}{SPOOLDIR}
= "$printer::spooldir/$o->{printer}{QUEUE}" unless $_[0];
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index 6a0b1d1d2..cb3258d3b 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -77,9 +77,10 @@ sub ask_many_from_list_refW($$$$$) {
sub ask_from_entries_refW {
my ($o, $title, $messages, $l, $val, %hcallback) = @_;
my $num_champs = @{$l};
- my $ignore = 0;
+ my $ignore = 0; #to handle recursivity
my $w = my_gtk->new($title, %$o);
+ #the widgets
my @entries = map {
if ($_->{type} eq "list") {
my $depth_combo = new Gtk::Combo;
@@ -111,7 +112,9 @@ sub ask_from_entries_refW {
for (my $i = 0; $i < $num_champs; $i++) {
- my $ind = $i;
+ my $ind = $i; #cos lexical bindings pb !!
+ my $entry = $entries[$i];
+ #changed callback
my $callback = sub {
return if $ignore; #handle recursive deadlock
&{$updates[$ind]};
@@ -121,9 +124,19 @@ sub ask_from_entries_refW {
$ignore = 1;
foreach (@updates_inv) { &{$_};}
$ignore = 0;
- }
+ };
};
- my $entry = $entries[$i];
+ if ($hcallback{focus_out}) {
+ my $callfocusout = sub {
+ return if $ignore;
+ &{$hcallback{focus_out}}($ind);
+ #update all the value
+ $ignore = 1;
+ foreach (@updates_inv) { &{$_};}
+ $ignore = 0;
+ };
+ comb_entry($entry,$val->[$i])->signal_connect(focus_out_event => $callfocusout);
+ }
comb_entry($entry,$val->[$i])->signal_connect(changed => $callback);
comb_entry($entry,$val->[$i])->signal_connect(activate => sub {
($ind == ($num_champs -1)) ?
diff --git a/perl-install/log.pm b/perl-install/log.pm
index 1d4ba05b4..3f119b365 100644
--- a/perl-install/log.pm
+++ b/perl-install/log.pm
@@ -4,11 +4,16 @@ use diagnostics;
use strict;
+#-#####################################################################################
+#- Globals
+#-#####################################################################################
my $logOpen = 0;
my $logDebugMessages = 0;
-1;
+#-######################################################################################
+#- Functions
+#-######################################################################################
sub fd() { fileno LOG }
sub l {
@@ -35,3 +40,8 @@ sub openLog(;$) {
}
sub closeLog() { close LOG; close LOG2; }
+
+#-######################################################################################
+#- Wonderful perl :(
+#-######################################################################################
+1; #