diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-04-13 23:27:43 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-04-13 23:27:43 +0000 |
commit | 3f3ced984833bf1084447c1afd3cfc7d17d0838b (patch) | |
tree | d1c9b1884efe353b3fa5a165ca7f601dfa8c6ff5 /perl-install/my_gtk.pm | |
parent | 21afb921cd71327cae09ec568f11e6f020a93229 (diff) | |
download | drakx-backup-do-not-use-3f3ced984833bf1084447c1afd3cfc7d17d0838b.tar drakx-backup-do-not-use-3f3ced984833bf1084447c1afd3cfc7d17d0838b.tar.gz drakx-backup-do-not-use-3f3ced984833bf1084447c1afd3cfc7d17d0838b.tar.bz2 drakx-backup-do-not-use-3f3ced984833bf1084447c1afd3cfc7d17d0838b.tar.xz drakx-backup-do-not-use-3f3ced984833bf1084447c1afd3cfc7d17d0838b.zip |
no_comment
Diffstat (limited to 'perl-install/my_gtk.pm')
-rw-r--r-- | perl-install/my_gtk.pm | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index c1f35749e..02037f5b5 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -18,6 +18,7 @@ $EXPORT_TAGS{all} = [ map { @$_ } values %EXPORT_TAGS ]; use Gtk; use c; +use log; use common qw(:common :functional); my $forgetTime = 1000; #- in milli-seconds @@ -324,12 +325,27 @@ sub _create_window($$) { $w->signal_connect(delete_event => sub { undef $o->{retval}; Gtk->main_quit }); $w->set_uposition(@{$my_gtk::force_position || $o->{force_position}}) if $my_gtk::force_position || $o->{force_position}; - $w->signal_connect('focus' => sub { Gtk->idle_add(sub { $w->ensure_focus($_[0]); 0 }, $_[1]) }) if $w->can('ensure_focus'); + $w->signal_connect(focus => sub { Gtk->idle_add(sub { $w->ensure_focus($_[0]); 0 }, $_[1]) }) if $w->can('ensure_focus'); - $w->signal_connect("key_press_event" => sub { + $w->set_events("pointer_motion_mask"); + my $signal; + $signal = $w->signal_connect(motion_notify_event => sub { + delete $o->{mouse}{unsafe}; + log::l("unsetting unsafe mouse"); + $w->signal_disconnect($signal); + }) if $o->{mouse}{unsafe}; + + $w->signal_connect(key_press_event => sub { my $d = ${{ 65470 => 'help', 65481 => 'next', 65480 => 'previous' }}{$_[1]->{keyval}} or return; + + #- previous field is created here :( + my $s; foreach (reverse @{$::o->{orderedSteps}}) { + $s->{previous} = $_ if $s; + $s = $::o->{steps}{$_}; + } + if ($d eq "help") { require install_steps_gtk; install_steps_gtk::create_big_help(); |