summaryrefslogtreecommitdiffstats
path: root/perl-install/install_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-01-06 16:20:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-01-06 16:20:52 +0000
commit2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1 (patch)
tree1a4b617866229fab81835f368ad6e9863461b3fc /perl-install/install_gtk.pm
parent36772d0e48af0e3fd74f3255f842a5b98f90f55b (diff)
downloaddrakx-backup-do-not-use-2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1.tar
drakx-backup-do-not-use-2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1.tar.gz
drakx-backup-do-not-use-2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1.tar.bz2
drakx-backup-do-not-use-2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1.tar.xz
drakx-backup-do-not-use-2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1.zip
- 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
Diffstat (limited to 'perl-install/install_gtk.pm')
-rw-r--r--perl-install/install_gtk.pm25
1 files changed, 25 insertions, 0 deletions
diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm
index b95063f92..d5d602f93 100644
--- a/perl-install/install_gtk.pm
+++ b/perl-install/install_gtk.pm
@@ -240,6 +240,31 @@ sub init_sizes() {
$::move and $::windowwidth -= 100;
}
+sub handle_unsafe_mouse {
+ my ($o, $window) = @_;
+
+ $o->{mouse}{unsafe} or return;
+
+ $window->add_events('pointer-motion-mask');
+ my $signal; $signal = $window->signal_connect(motion_notify_event => sub {
+ delete $o->{mouse}{unsafe};
+ log::l("unsetting unsafe mouse");
+ $window->signal_handler_disconnect($signal);
+ });
+}
+
+sub special_shortcuts {
+ my (undef, $event) = @_;
+ my $d = ${{ $Gtk2::Gdk::Keysyms{F2} => 'screenshot', $Gtk2::Gdk::Keysyms{Delete} => 'restart' }}{$event->keyval};
+ if ($d eq 'screenshot') {
+ take_screenshot($::o);
+ } elsif ($d eq 'restart' && member('control-mask', @{$event->state}) && member('mod1-mask', @{$event->state})) {
+ log::l("restarting install");
+ ugtk2->exit(0x35);
+ }
+ 0;
+}
+
#------------------------------------------------------------------------------
sub createXconf {
my ($file, $mouse_type, $mouse_dev, $_wacom_dev, $Driver) = @_;