diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-01-22 23:34:59 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-01-22 23:34:59 +0000 |
commit | d4b8566f7d690b25c3aec5dab2c42886b309d4bc (patch) | |
tree | ea1382ddf19aa4b46602d90792339e470c755bc4 /perl-install/interactive_gtk.pm | |
parent | f274ed163f035102a4460a815582b8f5a2e1236a (diff) | |
download | drakx-backup-do-not-use-d4b8566f7d690b25c3aec5dab2c42886b309d4bc.tar drakx-backup-do-not-use-d4b8566f7d690b25c3aec5dab2c42886b309d4bc.tar.gz drakx-backup-do-not-use-d4b8566f7d690b25c3aec5dab2c42886b309d4bc.tar.bz2 drakx-backup-do-not-use-d4b8566f7d690b25c3aec5dab2c42886b309d4bc.tar.xz drakx-backup-do-not-use-d4b8566f7d690b25c3aec5dab2c42886b309d4bc.zip |
add "quit_if_double_click" and "tree_expanded" flags (request from till)
Diffstat (limited to 'perl-install/interactive_gtk.pm')
-rw-r--r-- | perl-install/interactive_gtk.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index eb39348c6..e42833f80 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -147,7 +147,7 @@ sub create_clist { } sub create_ctree { - my ($e, $may_go_to_next, $changed, $double_click) = @_; + my ($e, $may_go_to_next, $changed, $double_click, $tree_expanded) = @_; my @l = map { may_apply($e->{format}, $_) } @{$e->{list}}; my $sep = quotemeta $e->{separator}; @@ -159,7 +159,7 @@ sub create_ctree { my $s; foreach (split $sep, $_[0]) { $wtree{"$s$_$e->{separator}"} ||= - $tree->insert_node($s ? $parent->($s) : undef, undef, [$_], 5, (undef) x 4, 0, 0); + $tree->insert_node($s ? $parent->($s) : undef, undef, [$_], 5, (undef) x 4, 0, $tree_expanded); $size++ if !$s; $s .= "$_$e->{separator}"; } @@ -435,7 +435,7 @@ sub ask_fromW { my $quit_if_double_click = #- i'm the only one, double click means accepting - @$l == 1 ? + @$l == 1 || $e->{quit_if_double_click} ? sub { if ($_[1]{type} =~ /^2/) { $mainw->{retval} = 1; Gtk->main_quit } } : ''; my @para = ($e, $may_go_to_next, $changed, $quit_if_double_click); @@ -445,7 +445,7 @@ sub ask_fromW { #- used only when needed, as key bindings are dropped by List (CList does not seems to accepts Tooltips). ($w, $set, $focus_w) = $use_boxradio ? create_boxradio(@para) : create_list(@para); } elsif ($e->{type} eq 'treelist') { - ($w, $set, $size) = create_ctree(@para); + ($w, $set, $size) = create_ctree(@para, $e->{tree_expanded}); } else { ($w, $set, $focus_w) = $use_boxradio ? create_boxradio(@para) : create_clist(@para); } |