From d070fb9cf74a1aaca5782cf40154f5f62999edfa Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 23 Feb 2000 10:45:42 +0000 Subject: no_comment --- perl-install/Xconfigurator.pm | 2 +- perl-install/interactive_gtk.pm | 23 ++++++++++++++--------- perl-install/standalone/XFdrake | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) (limited to 'perl-install') diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 2257b1785..8b2089120 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -33,7 +33,7 @@ sub readCardsDB { my ($file) = @_; my ($card); - %cards and return; +# %cards and return; local *F; open F, $file or die "file $file not found"; diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index 8d45913fe..6b9d89fb9 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -78,8 +78,12 @@ sub ask_from_treelistW { if ($def eq $_) { $wdef = $node; my $s; $tree->expand($wtree{$s .= "$_$separator"}) foreach split $sep, $root; - foreach (1 .. @$l) { - $tree->node_nth($_) == $node and $ndef = $_, last; + foreach my $nb (1 .. @$l) { + if ($tree->node_nth($nb) == $node) { + $tree->focus_row($nb); + Gtk->idle_add(sub { $tree->moveto($nb, 0, 0.5, 0); 0 }); + last; + } } } } @@ -98,9 +102,11 @@ sub ask_from_treelistW { $w->{ok_clicked} = $leave; $w->{cancel_clicked} = sub { $o->destroy; die "ask_from_list cancel" }; #- make sure windows doesn't live any more. gtkadd($w->{window}, - gtkpack_(new Gtk::VBox(0,0), - 1, gtkset_usize(createScrolledWindow($tree), 400, 350), - 0, $w->create_okcancel)); + gtkpack($w->create_box_with_title(@$messages), + gtkpack_(new Gtk::VBox(0,7), + 1, gtkset_usize(createScrolledWindow($tree), 300, 350), + 0, $w->create_okcancel))); + $tree->set_column_auto_resize(0, 1); $tree->set_selection_mode('browse'); $tree->signal_connect(tree_select_row => sub { $curr = $_[1]; }); $tree->signal_connect(button_press_event => sub { &$leave if $_[1]{type} =~ /^2/ }); @@ -114,10 +120,9 @@ sub ask_from_treelistW { 1; }); - $tree->focus_row($ndef) if $ndef; - $tree->select($wdef) if $wdef; - $tree->node_moveto($wdef, 0, 0.5, 0) if $wdef; - + if ($wdef) { + $tree->select($wdef); + } $tree->grab_focus; $w->main or die "ask_from_list cancel"; diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake index 4ec8ef611..6ebfbca0a 100755 --- a/perl-install/standalone/XFdrake +++ b/perl-install/standalone/XFdrake @@ -17,7 +17,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -use lib qw(.); #/usr/lib/libDrakX); +use lib qw(/usr/lib/libDrakX); use interactive; use Xconfigurator; -- cgit v1.2.1