summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-02-10 10:10:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-02-10 10:10:00 +0000
commit1366ba7668973fede10bc34d0759b7cebd9d2099 (patch)
tree46771f043d3d5fdba99b663f1a42aacba23a8b0d /perl-install/interactive_gtk.pm
parent46e25ae29ee4cf5aab5e0b439aca9a68f91a2181 (diff)
downloaddrakx-1366ba7668973fede10bc34d0759b7cebd9d2099.tar
drakx-1366ba7668973fede10bc34d0759b7cebd9d2099.tar.gz
drakx-1366ba7668973fede10bc34d0759b7cebd9d2099.tar.bz2
drakx-1366ba7668973fede10bc34d0759b7cebd9d2099.tar.xz
drakx-1366ba7668973fede10bc34d0759b7cebd9d2099.zip
button behaviour now chosen, and implemented
Diffstat (limited to 'perl-install/interactive_gtk.pm')
-rw-r--r--perl-install/interactive_gtk.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index c26f72a4b..7bb62fdd9 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -41,7 +41,7 @@ sub create_clist {
my $select = sub {
$list->set_focus_row($_[0]);
$list->select_row($_[0], 0);
- $list->moveto($_[0], 0, 0.5, 0);
+ $list->moveto($_[0], 0, 0.5, 0) if $list->row_is_visible($_[0]) ne 'full';
};
# ref $title && !@okcancel ?
@@ -93,7 +93,7 @@ sub create_clist {
$list, sub {
my ($v) = @_;
- eval {
+ eval {
$select->(find_index { $_ eq $v } @{$e->{list}});
};
};
@@ -280,13 +280,15 @@ sub ask_from_entries_refW {
$set = sub { $w->set_active($_[0]) };
$get = sub { $w->get_active };
} elsif ($e->{type} eq 'button') {
- $w = Gtk::Button->new($e->{text});
+ $w = Gtk::Button->new('');
$w->signal_connect(clicked => sub {
- $o->{retval} = 1;
- Gtk->main_quit;
- $mainw->destroy;
+ $get_all->();
+ $mainw->{rwindow}->hide;
$e->{clicked}();
+ $mainw->{rwindow}->show;
+ $set_all->();
});
+ $set = sub { $w->child->set(may_apply($e->{format}, $_[0])) };
} elsif ($e->{type} eq 'range') {
my $adj = create_adjustment(${$e->{val}}, $e->{min}, $e->{max});
$adj->signal_connect(value_changed => $changed);