From 2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 6 Jan 2005 16:20:52 +0000 Subject: - move some install specific code out of ugtk2.pm into install_gtk.pm - move some install specific code out of common.pm into install_any.pm --- perl-install/ugtk2.pm | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'perl-install/ugtk2.pm') diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 28114565f..06c5a0594 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -872,17 +872,8 @@ sub new { gtkadd($::WizardWindow, gtknew('Frame', shadow_type => 'out', child => $::WizardTable)); if ($::isInstall) { - $::WizardWindow->signal_connect(key_press_event => sub { - my (undef, $event) = @_; - my $d = ${{ $Gtk2::Gdk::Keysyms{F2} => 'screenshot', $Gtk2::Gdk::Keysyms{Delete} => 'restart' }}{$event->keyval}; - if ($d eq 'screenshot') { - common::take_screenshot(); - } elsif ($d eq 'restart' && member('control-mask', @{$event->state}) && member('mod1-mask', @{$event->state})) { - log::l("restarting install"); - $o->exit(0x35); - } - 0; - }); + require install_gtk; #- for perl_checker + $::WizardWindow->signal_connect(key_press_event => \&install_gtk::special_shortcuts); } elsif (!$o->{isEmbedded}) { $::WizardWindow->set_position('center_always') if !$::isStandalone; eval { gtkpack__($::WizardTable, Gtk2::Banner->new(wm_icon(), $::Wizard_title)) }; @@ -971,14 +962,9 @@ sub _create_window { } }); - if ($::isInstall && $::o->{mouse}{unsafe}) { - $w->add_events('pointer-motion-mask'); - my $signal; #- do not make this line part of next one, signal_disconnect will not be able to access $signal value - $signal = $w->signal_connect(motion_notify_event => sub { - delete $::o->{mouse}{unsafe}; - log::l("unsetting unsafe mouse"); - $w->signal_handler_disconnect($signal); - }); + if ($::isInstall) { + require install_gtk; #- for perl_checker + install_gtk::handle_unsafe_mouse($::o, $w); } if ($force_center_at_pos) { -- cgit v1.2.1