/[soft]/drakx-kbd-mouse-x11/trunk/tools/mousedrake
ViewVC logotype

Contents of /drakx-kbd-mouse-x11/trunk/tools/mousedrake

Parent Directory Parent Directory | Revision Log Revision Log


Revision 391 - (show annotations) (download)
Thu Feb 3 13:54:58 2011 UTC (13 years, 1 month ago) by dmorgan
File size: 986 byte(s)
Import cleaned drakx-kbd-mouse-x11
1 #!/usr/bin/perl
2
3 use lib qw(/usr/lib/libDrakX);
4
5 # i18n: IMPORTANT: to get correct namespace (drakx-kbd-mouse-x11 instead of libDrakX)
6 BEGIN { unshift @::textdomains, 'drakx-kbd-mouse-x11' }
7
8 use standalone; #- warning, standalone must be loaded very first, for 'explanations'
9
10 use common;
11 use interactive;
12 use modules;
13 use mouse;
14 use c;
15
16
17 $ugtk2::wm_icon = "/usr/share/mcc/themes/default/mousedrake-mdk.png";
18 my $in = 'interactive'->vnew('su');
19
20 my $modules_conf = modules::any_conf->read;
21
22 my $mouse = mouse::read();
23 my %old = %$mouse;
24
25 if (!$::noauto) {
26 my $probed_mouse = mouse::detect($modules_conf);
27 $mouse = $probed_mouse if !$mouse->{Protocol} || !$probed_mouse->{unsafe};
28 }
29
30 if (!$mouse || !$::auto) {
31 $mouse ||= mouse::fullname2mouse('Universal|Any PS/2 & USB mice');
32 mouse::select($in, $mouse) or $in->exit(0);
33 }
34
35 mouse::write_conf($in->do_pkgs, $modules_conf, $mouse, 1);
36
37 system('service', 'gpm', 'restart') if -e '/var/lock/subsys/gpm';
38
39 $in->exit(0);

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.30