summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/mousedrake
blob: 2f6d0dd8767171a6599c68ee166b26ec0b9fa25f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/perl

use lib qw(/usr/lib/libDrakX);

use standalone;     #- warning, standalone must be loaded very first, for 'explanations'

use common;
use interactive;
use modules;
use mouse;
use c;


$ugtk2::wm_icon = "/usr/share/mcc/themes/default/mousedrake-mdk.png";
my $in = 'interactive'->vnew('su');

my $modules_conf = modules::any_conf->read;

begin:
my $mouse = mouse::read();
my %old = %$mouse;

if (!$::noauto) {
    my $probed_mouse = mouse::detect($modules_conf);
    $mouse = $probed_mouse if !$mouse->{XMOUSETYPE} || !$probed_mouse->{unsafe};
}

if (!$mouse || !$::auto) {
    $mouse ||= mouse::fullname2mouse("serial|Generic 2 Button Mouse");
    my $test_hbox;
    my $name = $in->ask_from_treelistf('mousedrake', N("Please choose your mouse type."), '|',
				       sub { join '|', map { translate($_) } split '\|', $_[0] },
				       [ mouse::fullnames() ], 
				       $mouse->{type} . '|' . $mouse->{name});
    $name or $in->exit(0);
    my $mouse_chosen = mouse::fullname2mouse($name);
    $mouse = $mouse_chosen if !($mouse->{type} eq $mouse_chosen->{type} && $mouse->{name} eq $mouse_chosen->{name});

    if ($mouse->{device} eq "usbmouse") {
	modules::load_category($modules_conf, 'bus/usb') or die 'no usb bus found\n';
	modules::load(qw(hid mousedev usbmouse));
    }

    $mouse->{XEMU3} = 'yes' if $mouse->{nbuttons} < 3 && (!$::noauto || $in->ask_yesorno('', N("Emulate third button?"), 1));

    $mouse->{device} = $in->ask_from_listf(N("Mouse Port"),
					   N("Please choose which serial port your mouse is connected to."),
					   \&mouse::serial_port2text,
					   [ mouse::serial_ports ],
					   $mouse->{device},
					  ) || goto begin if $mouse->{type} eq 'serial';
    $test_hbox and $test_hbox->destroy;
}

mouse::write_conf($in->do_pkgs, $modules_conf, $mouse, 1);

if ($in->isa('interactive::gtk') && mouse::change_mouse_live($mouse, \%old)) {

    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),
		   $w->create_okcancel));
    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);
goto begin;
b222aee46749076d8b5c3a1b8d8555ff8349'>Added locale->fonts-* dependenciesPablo Saratxaga2003-08-011-5/+8 * updated pot filePablo Saratxaga2003-07-312-634/+219 * Add vera font by defaultFrederic Crozat2003-07-291-1/+1 * updated pot filePablo Saratxaga2003-07-292-90/+67 * moved mkfs.xfsFrancois Pons2003-07-281-1/+1 * updated pot filePablo Saratxaga2003-07-252-787/+757 * removed ncompress (contrib)Frederic Lepied2003-07-241-1/+1 * Added Uzbek cyrillic filePablo Saratxaga2003-07-231-0/+18251 * updated pot filePablo Saratxaga2003-07-211-51/+117 * updated pot filePablo Saratxaga2003-07-141-138/+418 * changed "Country" . " / Region" to "Country / Region" and fixed Chinese po'sPablo Saratxaga2003-07-121-12/+7 * updated pot filePablo Saratxaga2003-07-101-95/+129 * updated pot filePablo Saratxaga2003-07-092-10998/+11474 * install netprofile on laptopsFrederic Lepied2003-07-081-0/+1 * iAdded various new keyboard layoutsPablo Saratxaga2003-07-011-0/+0 * Moved Bokmaal file to nb.poPablo Saratxaga2003-06-281-21449/+0 * Fixed typos; updated Ukrainian po filePablo Saratxaga2003-06-272-33/+33 * updated pot filePablo Saratxaga2003-06-272-498/+721 * use the mkswap commandPascal Rigaux2003-06-181-0/+1 * updated pot filePablo Saratxaga2003-06-162-458/+572 * change a bit how strings are passed to advertising systemGuillaume Cottenceau2003-06-1216-1252/+1632 * cookerGuillaume Cottenceau2003-06-061-0/+0 * updated Estonien, Japanese, Albanian and Vietnamese po filesPablo Saratxaga2003-06-033-3301/+3539 * UpdateArkadiusz Lipiec2003-06-021-195/+308 * updated Spanish translationsFabián Mandelbaum2003-06-021-154/+271 * changed the name of the russian phonetic layoutPablo Saratxaga2003-05-3147-6454/+11245 * updated Vietnamese filePablo Saratxaga2003-05-302-67/+68 * updated Albanian filePablo Saratxaga2003-05-281-5/+46 * updated pot filePablo Saratxaga2003-05-261-3/+43 * updated pot filePablo Saratxaga2003-05-222-75/+134 * updated pot filePablo Saratxaga2003-05-202-98/+147 * updated German, Estonian and Finnish filesPablo Saratxaga2003-05-203-1420/+1964 * update french translationThierry Vignaud2003-05-201-67/+54 * updated Spanish translationsFabián Mandelbaum2003-05-191-221/+176 * updated pot filePablo Saratxaga2003-05-16