summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/mousedrake
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-05-30 13:57:58 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-05-30 13:57:58 +0000
commitc80bde7023c6c223aea4cbce2f5f79913e5f2351 (patch)
tree6785e04d4dcf23f57bd8dd65a3554a2c896cdf88 /perl-install/standalone/mousedrake
parent039f6d5d590742c5ee4c2fae96fb37d01f8a9b17 (diff)
downloaddrakx-c80bde7023c6c223aea4cbce2f5f79913e5f2351.tar
drakx-c80bde7023c6c223aea4cbce2f5f79913e5f2351.tar.gz
drakx-c80bde7023c6c223aea4cbce2f5f79913e5f2351.tar.bz2
drakx-c80bde7023c6c223aea4cbce2f5f79913e5f2351.tar.xz
drakx-c80bde7023c6c223aea4cbce2f5f79913e5f2351.zip
add mouse test in non-embedded mode (#2049)
Diffstat (limited to 'perl-install/standalone/mousedrake')
-rwxr-xr-xperl-install/standalone/mousedrake16
1 files changed, 16 insertions, 0 deletions
diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake
index e6048a173..a774eeb9f 100755
--- a/perl-install/standalone/mousedrake
+++ b/perl-install/standalone/mousedrake
@@ -63,6 +63,22 @@ if (!$mouse || !$::auto) {
}
mouse::write_conf($in, $mouse, 1);
+
+if (!$::isEmbedded && $in->isa('interactive::gtk')) {
+ require ugtk2;
+ ugtk2->import(qw(:wrappers :create));
+ my $w = ugtk2->new(N("Mouse test"));
+ gtkadd($w->{window},
+ gtkpack(Gtk2::VBox->new(0, 5),
+ Gtk2::Label->new(N("Please test your mouse:")),
+ my $test_hbox = Gtk2::HBox->new(0, 5),
+ gtkpack(create_hbox(),
+ gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub { $w->{retval} = 1; Gtk2->main_quit }),
+ gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $w->{retval} = 0; Gtk2->main_quit }))));
+ mouse::test_mouse_standalone($mouse, $test_hbox);
+ $w->main or goto begin;
+}
+
system('service', 'gpm', 'restart') if -e '/var/lock/subsys/gpm';
$in->exit(0);