summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-01-22 15:59:21 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-01-22 15:59:21 +0000
commitda3f8c2c6c48923b32b40e062f6a6692e0cef6ff (patch)
treece129d9a33b3cd0174f5430fe1d3bafc2c19fe53 /perl-install/ugtk2.pm
parent7d289ed1943ea89be23c3ca94b3fc3c5e53f94a5 (diff)
downloaddrakx-backup-do-not-use-da3f8c2c6c48923b32b40e062f6a6692e0cef6ff.tar
drakx-backup-do-not-use-da3f8c2c6c48923b32b40e062f6a6692e0cef6ff.tar.gz
drakx-backup-do-not-use-da3f8c2c6c48923b32b40e062f6a6692e0cef6ff.tar.bz2
drakx-backup-do-not-use-da3f8c2c6c48923b32b40e062f6a6692e0cef6ff.tar.xz
drakx-backup-do-not-use-da3f8c2c6c48923b32b40e062f6a6692e0cef6ff.zip
revive F1, F2 and alt-e (dialogs for F1 and F2 are broken, though)
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm37
1 files changed, 15 insertions, 22 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 34f887303..4b6a1f36b 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -733,6 +733,21 @@ sub new {
if ($::isInstall) {
$::WizardTable->set_size_request($::windowwidth * 0.90, $::windowheight * 0.73);
$::WizardWindow->set_uposition($::stepswidth + $::windowwidth * 0.04, $::logoheight + $::windowheight * 0.15);
+ $::WizardWindow->signal_connect(key_press_event => sub {
+ my (undef, $event) = @_;
+ my $d = ${{ Gtk2::Gdk::Event::Key->Sym_F1 => 'help',
+ Gtk2::Gdk::Event::Key->Sym_F2 => 'screenshot' }}{$event->keyval};
+
+ if ($d eq "help") {
+ require install_gtk;
+ install_gtk::create_big_help($::o);
+ } elsif ($d eq 'screenshot') {
+ common::take_screenshot($o);
+ } elsif (chr($event->keyval) eq 'e' && member('mod1-mask', @{$event->state})) { #- alt-e
+ log::l("Switching to " . ($::expert ? "beginner" : "expert"));
+ $::expert = !$::expert;
+ }
+ });
} else {
my $draw1 = Gtk2::DrawingArea->new;
$draw1->set_size_request(540, 100);
@@ -881,28 +896,6 @@ sub _create_window($$) {
$w->signal_disconnect($signal);
});
}
- $w->signal_connect(key_press_event => sub {
- my (undef, $event) = @_;
- my $d = ${{ Gtk2::Gdk::Event::Key->Sym_F1 => 'help',
- Gtk2::Gdk::Event::Key->Sym_F2 => 'screenshot' }}{$event->keyval};
-
- if ($event->keyval == Gtk2::Gdk::Event::Key->Sym_Print) { #- TEMP
- print STDERR "Sym Print\n"; #- TEMP
- }
- if ($event->keyval == Gtk2::Gdk::Event::Key->Sym_3270_PrintScreen) { #- TEMP
- print STDERR "Sym 3270_PrintScreen\n"; #- TEMP
- }
-
- if ($d eq "help") {
- require install_gtk;
- install_gtk::create_big_help($::o);
- } elsif ($::isInstall && $d eq 'screenshot') {
- common::take_screenshot($o);
- } elsif (chr($event->keyval) eq 'e' && member('mod1-mask', @{$event->state})) { #- alt-e
- log::l("Switching to " . ($::expert ? "beginner" : "expert"));
- $::expert = !$::expert;
- }
- }); #- if $::isInstall;
my ($wi, $he);
$w->signal_connect(size_allocate => sub {