diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-01-08 18:15:23 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-01-08 18:15:23 +0000 |
commit | fcd3259e9b2164520857d300f45588307de5b2cf (patch) | |
tree | f86565cab151a03d58b284144eb64839eb62cc6a | |
parent | 2e4efa0d049800bc26d42131527c4af2e5be8272 (diff) | |
download | drakx-backup-do-not-use-fcd3259e9b2164520857d300f45588307de5b2cf.tar drakx-backup-do-not-use-fcd3259e9b2164520857d300f45588307de5b2cf.tar.gz drakx-backup-do-not-use-fcd3259e9b2164520857d300f45588307de5b2cf.tar.bz2 drakx-backup-do-not-use-fcd3259e9b2164520857d300f45588307de5b2cf.tar.xz drakx-backup-do-not-use-fcd3259e9b2164520857d300f45588307de5b2cf.zip |
fixes
-rw-r--r-- | perl-install/interactive.pm | 2 | ||||
-rw-r--r-- | perl-install/interactive_gtk.pm | 21 | ||||
-rw-r--r-- | perl-install/my_gtk.pm | 1 |
3 files changed, 15 insertions, 9 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index fd1fbe059..e23206d4c 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -224,12 +224,12 @@ sub ask_from_entries_refH_powered_normalize { sub ask_from_entries_refH_powered { my ($o, $common, $l) = @_; ask_from_entries_refH_powered_normalize($o, $common, $l); + @$l or return 1; $o->ask_from_entries_refW($common, [ grep { !$_->{advanced} } @$l ], [ grep { $_->{advanced} } @$l ]); } sub ask_from_entries_refH_powered_no_check { my ($o, $common, $l) = @_; ask_from_entries_refH_powered_normalize($o, $common, $l); - @$l or return 1; $o->ask_from_entries_refW($common, [ grep { !$_->{advanced} } @$l ], [ grep { $_->{advanced} } @$l ]); } diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index c9ee639f0..310f88fc6 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -60,10 +60,6 @@ sub create_clist { # $list->signal_connect(button_release_event => $leave) : # $list->signal_connect(button_press_event => sub { &$leave if $_[1]{type} =~ /^2/ }); - $list->signal_connect(select_row => sub { - my ($w, $row) = @_; - ${$e->{val}} = $e->{list}[$curr = $row]; - }); $list->signal_connect(key_press_event => sub { my ($w, $event) = @_; my $c = chr($event->{keyval} & 0xff); @@ -97,12 +93,19 @@ sub create_clist { } 1; }); + $list->show; $list->append($_) foreach @l; + $list->signal_connect(select_row => sub { + my ($w, $row) = @_; + ${$e->{val}} = $e->{list}[$curr = $row]; + }); + $list, sub { + my ($v) = @_; eval { - $select->(find_index { $_ eq ${$e->{val}} } @{$e->{list}}) + $select->(find_index { $_ eq $v } @{$e->{list}}); }; }; } @@ -156,7 +159,7 @@ sub create_ctree { $tree->set_row_height($tree->style->font->ascent + $tree->style->font->descent + 1); $tree, sub { - my $node = $wleaves{${$e->{val}}} or return; + my $node = $wleaves{$_[0]} or return; for (my $c = $node; $c; $c = $c->row->parent) { $tree->expand($c); @@ -209,8 +212,9 @@ sub create_list { ${$e->{val}} = $l->[$list->child_position($row)]; }); $list, sub { + my ($v) = @_; eval { - $select->(find_index { $_ eq ${$e->{val}} } @$l) + $select->(find_index { $_ eq $v } @$l); }; }; } @@ -335,13 +339,14 @@ sub ask_from_entries_refW { }; my $advanced_button = [ _("Advanced"), sub { $set_advanced->(!$advanced) } ]; - $set_all->(); gtkadd($mainw->{window}, gtkpack(create_box_with_title($mainw, @{$common->{messages}}), may_createScrolledWindow(@widgets_always > 8, create_packtable({}, map { [($_->{icon_w}, $_->{e}{label}, $_->{real_w})]} @widgets_always), 200, min(350, $::windowheight - 60)), new Gtk::HSeparator, $advanced_pack = create_packtable({}, map { [($_->{icon_w}, $_->{e}{label}, $_->{real_w})]} @widgets_advanced), $mainw->create_okcancel($common->{ok}, $common->{cancel}, '', @$l2 ? $advanced_button : ()))); + $mainw->sync; #- for $set_all below (mainly for the set of clist) + $set_all->(); $set_advanced->(0); (@widgets ? $widgets[0]{w} : $mainw->{ok})->grab_focus(); diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 791a741f0..ac0dbb8d5 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -324,6 +324,7 @@ sub create_packtable($@) { if (defined $_) { ref $_ or $_ = new Gtk::Label($_); $w->attach($_, $j, $j + 1, $i, $i + 1, 'fill', 'fill', 5, 0); +# $w->attach_defaults($_, $j, $j + 1, $i, $i + 1); $_->show; } } @$_; |