summaryrefslogtreecommitdiffstats
path: root/perl-install/harddrake/ui.pm
blob: d314de59fb65941ae170477226ea397f5dd5a365 (plain)
ofshex dumpascii
0000 70 61 63 6b 61 67 65 20 68 61 72 64 64 72 61 6b 65 3a 3a 75 69 3b 0a 0a 75 73 65 20 73 74 72 69 package.harddrake::ui;..use.stri
0020 63 74 3b 0a 0a 75 73 65 20 68 61 72 64 64 72 61 6b 65 3a 3a 64 61 74 61 3b 0a 75 73 65 20 63 6f ct;..use.harddrake::data;.use.co
0040 6d 6d 6f 6e 3b 0a 75 73 65 20 69 6e 74 65 72 61 63 74 69 76 65 3b 0a 75 73 65 20 6d 79 5f 67 74 mmon;.use.interactive;.use.my_gt
0060 6b 20 71 77 28 3a 68 65 6c 70 65 72 73 20 3a 77 72 61 70 70 65 72 73 29 3b 0a 75 73 65 20 75 67 k.qw(:helpers.:wrappers);.use.ug
0080 74 6b 20 71 77 28 3a 68 65 6c 70 65 72 73 20 3a 77 72 61 70 70 65 72 73 20 3a 76 61 72 69 6f 75 tk.qw(:helpers.:wrappers.:variou
00a0 73 29 3b 0a 0a 0a 23 20 7b 20 66 69 65 6c 64 20 3d 3e 20 5b 20 73 68 6f 72 74 5f 74 72 61 6e 73 s);...#.{.field.=>.[.short_trans
00c0 6c 61 74 69 6f 6e 2c 20 66 75 6c 6c 5f 64 65 73 63 72 69 70 74 69 6f 6e 5d 20 7d 0a 6d 79 20 25 lation,.full_description].}.my.%
00e0 66 69 65 6c 64 73 20 3d 20 0a 20 20 20 20 28 0a 09 22 4d 6f 64 65 6c 22 20 3d 3e 20 5b 5f 28 22 fields.=......(.."Model".=>.[_("
0100 4d 6f 64 65 6c 22 29 2c 20 5f 28 22 68 61 72 64 20 64 69 73 6b 20 6d 6f 64 65 6c 22 29 5d 2c 0a Model"),._("hard.disk.model")],.
0120 09 22 63 68 61 6e 6e 65 6c 22 20 3d 3e 20 5b 5f 28 22 43 68 61 6e 6e 65 6c 22 29 2c 20 5f 28 22 ."channel".=>.[_("Channel"),._("
0140 45 49 44 45 2f 53 43 53 49 20 63 68 61 6e 6e 65 6c 22 29 5d 2c 0a 09 22 62 75 73 22 20 3d 3e 20 EIDE/SCSI.channel")],.."bus".=>.
0160 0a 09 5b 20 5f 28 22 42 75 73 22 29 2c 20 0a 09 20 20 5f 28 22 74 68 69 73 20 69 73 20 74 68 65 ..[._("Bus"),....._("this.is.the
0180 20 70 68 79 73 69 63 61 6c 20 62 75 73 20 6f 6e 20 77 68 69 63 68 20 74 68 65 20 64 65 76 69 63 .physical.bus.on.which.the.devic
01a0 65 20 69 73 20 70 6c 75 67 67 65 64 20 28 65 67 3a 20 50 43 49 2c 20 55 53 42 2c 20 2e 2e 2e 29 e.is.plugged.(eg:.PCI,.USB,....)
01c0 22 29 5d 2c 0a 09 22 64 72 69 76 65 72 22 20 3d 3e 20 5b 20 5f 28 22 4d 6f 64 75 6c 65 22 29 2c ")],.."driver".=>.[._("Module"),
01e0 20 5f 28 22 74 68 65 20 6d 6f 64 75 6c 65 20 6f 66 20 74 68 65 20 47 4e 55 2f 4c 69 6e 75 78 20 ._("the.module.of.the.GNU/Linux.
0200 6b 65 72 6e 65 6c 20 74 68 61 74 20 68 61 6e 64 6c 65 20 74 68 61 74 20 64 65 76 69 63 65 22 29 kernel.that.handle.that.device")
0220 5d 2c 0a 09 22 6d 65 64 69 61 5f 74 79 70 65 22 20 3d 3e 20 5b 20 5f 28 22 4d 65 64 69 61 20 63 ],.."media_type".=>.[._("Media.c
0240 6c 61 73 73 22 29 2c 20 5f 28 22 63 6c 61 73 73 20 6f 66 20 68 61 72 64 77 61 72 65 20 64 65 76 lass"),._("class.of.hardware.dev
0260 69 63 65 22 29 5d 2c 0a 09 22 64 65 73 63 72 69 70 74 69 6f 6e 22 20 3d 3e 20 5b 20 5f 28 22 44 ice")],.."description".=>.[._("D
0280 65 73 63 72 69 70 74 69 6f 6e 22 29 2c 20 5f 28 22 74 68 69 73 20 66 69 65 6c 64 20 64 65 73 63 escription"),._("this.field.desc
02a0 72 69 62 65 20 74 68 65 20 64 65 76 69 63 65 22 29 5d 2c 0a 09 22 62 75 73 5f 69 64 22 20 3d 3e ribe.the.device")],.."bus_id".=>
02c0 20 0a 09 5b 20 5f 28 22 42 75 73 20 69 64 65 6e 74 69 66 69 63 61 74 69 6f 6e 22 29 2c 20 0a 09 ...[._("Bus.identification"),...
02e0 20 20 5f 28 22 2d 20 50 43 49 20 61 6e 64 20 55 53 42 20 64 65 76 69 63 65 73 20 3a 20 74 68 69 .._("-.PCI.and.USB.devices.:.thi
0300 73 20 6c 69 73 74 20 74 68 65 20 76 65 6e 64 6f 72 2c 20 64 65 76 69 63 65 2c 20 73 75 62 76 65 s.list.the.vendor,.device,.subve
0320 6e 64 6f 72 20 61 6e 64 20 73 75 62 64 65 76 69 63 65 20 50 43 49 2f 55 53 42 20 69 64 73 22 29 ndor.and.subdevice.PCI/USB.ids")
0340 5d 2c 0a 09 22 62 75 73 5f 6c 6f 63 61 74 69 6f 6e 22 20 3d 3e 20 0a 09 5b 20 5f 28 22 4c 6f 63 ],.."bus_location".=>...[._("Loc
0360 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 62 75 73 22 29 2c 20 0a 09 20 20 5f 28 22 2d 20 70 63 69 ation.on.the.bus"),....._("-.pci
0380 20 64 65 76 69 63 65 73 3a 20 74 68 69 73 20 67 69 76 65 73 20 74 68 65 20 50 43 49 20 73 6c 6f .devices:.this.gives.the.PCI.slo
03a0 74 2c 20 64 65 76 69 63 65 20 61 6e 64 20 66 75 6e 63 74 69 6f 6e 20 6f 66 20 74 68 69 73 20 63 t,.device.and.function.of.this.c
03c0 61 72 64 0a 2d 20 65 69 64 65 20 64 65 76 69 63 65 73 3a 20 74 68 65 20 64 65 76 69 63 65 20 69 ard.-.eide.devices:.the.device.i
03e0 73 20 65 69 74 68 65 72 20 61 20 73 6c 61 76 65 20 6f 72 20 61 20 6d 61 73 74 65 72 20 64 65 76 s.either.a.slave.or.a.master.dev
0400 69 63 65 0a 2d 20 73 63 73 69 20 64 65 76 69 63 65 73 3a 20 74 68 65 20 73 63 73 69 20 62 75 73 ice.-.scsi.devices:.the.scsi.bus
0420 20 61 6e 64 20 74 68 65 20 73 63 73 69 20 64 65 76 69 63 65 20 69 64 73 22 29 5d 2c 0a 09 22 64 .and.the.scsi.device.ids")],.."d
0440 65 76 69 63 65 22 20 3d 3e 20 5b 20 5f 28 22 4f 6c 64 20 64 65 76 69 63 65 20 66 69 6c 65 22 29 evice".=>.[._("Old.device.file")
0460 2c 0a 09 09 09 20 20 20 20 5f 28 22 6f 6c 64 20 73 74 61 74 69 63 20 64 65 76 69 63 65 20 6e 61 ,........_("old.static.device.na
0480 6d 65 20 75 73 65 64 20 69 6e 20 64 65 76 20 70 61 63 6b 61 67 65 22 29 5d 2c 0a 09 22 64 65 76 me.used.in.dev.package")],.."dev
04a0 66 73 5f 64 65 76 69 63 65 22 20 3d 3e 20 5b 20 5f 28 22 4e 65 77 20 64 65 76 66 73 20 64 65 76 fs_device".=>.[._("New.devfs.dev
04c0 69 63 65 22 29 2c 20 20 0a 09 09 09 09 09 5f 28 22 6e 65 77 20 64 69 6e 61 6d 69 63 20 64 65 76 ice"),........_("new.dinamic.dev
04e0 69 63 65 20 6e 61 6d 65 20 67 65 6e 65 72 61 74 65 64 20 62 79 20 69 6e 63 6f 72 65 20 6b 65 72 ice.name.generated.by.incore.ker
0500 6e 65 6c 20 64 65 76 66 73 22 29 5d 2c 0a 09 22 6e 62 75 74 74 6f 6e 73 22 20 3d 3e 20 5b 20 5f nel.devfs")],.."nbuttons".=>.[._
0520 28 22 4e 75 6d 62 65 72 20 6f 66 20 62 75 74 74 6f 6e 73 22 29 2c 20 22 74 68 65 20 6e 75 6d 62 ("Number.of.buttons"),."the.numb
0540 65 72 20 6f 66 20 62 75 74 74 6f 6e 73 20 74 68 65 20 6d 6f 75 73 65 20 68 61 76 65 22 5d 2c 0a er.of.buttons.the.mouse.have"],.
0560 09 22 56 65 6e 64 6f 72 22 20 3d 3e 20 5b 20 5f 28 22 56 65 6e 64 6f 72 22 29 2c 20 5f 28 22 74 ."Vendor".=>.[._("Vendor"),._("t
0580 68 65 20 76 65 6e 64 6f 72 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 64 65 76 69 63 65 22 29 5d 0a he.vendor.name.of.the.device")].
05a0 09 29 3b 0a 0a 0a 6f 75 72 20 24 6c 69 63 65 6e 73 65 20 3d 20 27 43 6f 70 79 72 69 67 68 74 20 .);...our.$license.=.'Copyright.
05c0 28 43 29 20 31 39 39 39 2d 32 30 30 32 20 4d 61 6e 64 72 61 6b 65 53 6f 66 74 20 62 79 20 74 76 (C).1999-2002.MandrakeSoft.by.tv
05e0 69 67 6e 61 75 64 40 6d 61 6e 64 72 61 6b 65 73 6f 66 74 2e 63 6f 6d 0a 0a 54 68 69 73 20 70 72 ignaud@mandrakesoft.com..This.pr
0600 6f 67 72 61 6d 20 69 73 20 66 72 65 65 20 73 6f 66 74 77 61 72 65 3b 20 79 6f 75 20 63 61 6e 20 ogram.is.free.software;.you.can.
0620 72 65 64 69 73 74 72 69 62 75 74 65 20 69 74 20 61 6e 64 2f 6f 72 20 6d 6f 64 69 66 79 0a 69 74 redistribute.it.and/or.modify.it
0640 20 75 6e 64 65 72 20 74 68 65 20 74 65 72 6d 73 20 6f 66 20 74 68 65 20 47 4e 55 20 47 65 6e 65 .under.the.terms.of.the.GNU.Gene
0660 72 61 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 20 61 73 20 70 75 62 6c 69 73 68 65 64 20 ral.Public.License.as.published.
0680 62 79 0a 74 68 65 20 46 72 65 65 20 53 6f 66 74 77 61 72 65 20 46 6f 75 6e 64 61 74 69 6f 6e 3b by.the.Free.Software.Foundation;
06a0 20 65 69 74 68 65 72 20 76 65 72 73 69 6f 6e 20 32 2c 20 6f 72 20 28 61 74 20 79 6f 75 72 20 6f .either.version.2,.or.(at.your.o
06c0 70 74 69 6f 6e 29 0a 61 6e 79 20 6c 61 74 65 72 20 76 65 72 73 69 6f 6e 2e 0a 0a 54 68 69 73 20 ption).any.later.version...This.
06e0 70 72 6f 67 72 61 6d 20 69 73 20 64 69 73 74 72 69 62 75 74 65 64 20 69 6e 20 74 68 65 20 68 6f program.is.distributed.in.the.ho
0700 70 65 20 74 68 61 74 20 69 74 20 77 69 6c 6c 20 62 65 20 75 73 65 66 75 6c 2c 0a 62 75 74 20 57 pe.that.it.will.be.useful,.but.W
0720 49 54 48 4f 55 54 20 41 4e 59 20 57 41 52 52 41 4e 54 59 3b 20 77 69 74 68 6f 75 74 20 65 76 65 ITHOUT.ANY.WARRANTY;.without.eve
0740 6e 20 74 68 65 20 69 6d 70 6c 69 65 64 20 77 61 72 72 61 6e 74 79 20 6f 66 0a 4d 45 52 43 48 41 n.the.implied.warranty.of.MERCHA
0760 4e 54 41 42 49 4c 49 54 59 20 6f 72 20 46 49 54 4e 45 53 53 20 46 4f 52 20 41 20 50 41 52 54 49 NTABILITY.or.FITNESS.FOR.A.PARTI
0780 43 55 4c 41 52 20 50 55 52 50 4f 53 45 2e 20 20 53 65 65 20 74 68 65 0a 47 4e 55 20 47 65 6e 65 CULAR.PURPOSE...See.the.GNU.Gene
07a0 72 61 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 ral.Public.License.for.more.deta
07c0 69 6c 73 2e 0a 0a 59 6f 75 20 73 68 6f 75 6c 64 20 68 61 76 65 20 72 65 63 65 69 76 65 64 20 61 ils...You.should.have.received.a
07e0 20 63 6f 70 79 20 6f 66 20 74 68 65 20 47 4e 55 20 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 20 .copy.of.the.GNU.General.Public.
0800 4c 69 63 65 6e 73 65 0a 61 6c 6f 6e 67 20 77 69 74 68 20 74 68 69 73 20 70 72 6f 67 72 61 6d 3b License.along.with.this.program;
0820 20 69 66 20 6e 6f 74 2c 20 77 72 69 74 65 20 74 6f 20 74 68 65 20 46 72 65 65 20 53 6f 66 74 77 .if.not,.write.to.the.Free.Softw
0840 61 72 65 0a 46 6f 75 6e 64 61 74 69 6f 6e 2c 20 49 6e 63 2e 2c 20 35 39 20 54 65 6d 70 6c 65 20 are.Foundation,.Inc.,.59.Temple.
0860 50 6c 61 63 65 20 2d 20 53 75 69 74 65 20 33 33 30 2c 20 42 6f 73 74 6f 6e 2c 20 4d 41 20 30 32 Place.-.Suite.330,.Boston,.MA.02
0880 31 31 31 2d 31 33 30 37 2c 20 55 53 41 2e 0a 27 3b 0a 0a 6d 79 20 28 24 69 6e 2c 20 24 6d 61 69 111-1307,.USA..';..my.($in,.$mai
08a0 6e 5f 77 69 6e 2c 20 25 49 44 73 2c 20 24 70 69 64 29 3b 0a 0a 6d 79 20 40 6d 65 6e 75 5f 69 74 n_win,.%IDs,.$pid);..my.@menu_it
08c0 65 6d 73 20 3d 20 28 20 7b 20 70 61 74 68 20 3d 3e 20 5f 28 22 2f 5f 46 69 6c 65 22 29 2c 20 74 ems.=.(.{.path.=>._("/_File"),.t
08e0 79 70 65 20 3d 3e 20 27 3c 42 72 61 6e 63 68 3e 27 20 7d 2c 0a 09 09 09 20 20 20 20 7b 20 70 61 ype.=>.'<Branch>'.},........{.pa
0900 74 68 20 3d 3e 20 5f 28 22 2f 5f 46 69 6c 65 22 29 2e 5f 28 22 2f 5f 51 75 69 74 22 29 2c 20 61 th.=>._("/_File")._("/_Quit"),.a
0920 63 63 65 6c 65 72 61 74 6f 72 20 3d 3e 20 5f 28 22 3c 63 6f 6e 74 72 6f 6c 3e 51 22 29 2c 20 63 ccelerator.=>._("<control>Q"),.c
0940 61 6c 6c 62 61 63 6b 20 3d 3e 20 5c 26 71 75 69 74 5f 67 6c 6f 62 61 6c 09 7d 2c 0a 09 09 09 20 allback.=>.\&quit_global.},.....
0960 20 20 20 7b 20 70 61 74 68 20 3d 3e 20 5f 28 22 2f 5f 48 65 6c 70 22 29 2c 20 74 79 70 65 20 3d ...{.path.=>._("/_Help"),.type.=
0980 3e 20 27 3c 42 72 61 6e 63 68 3e 27 20 7d 2c 0a 09 09 09 20 20 20 20 7b 20 70 61 74 68 20 3d 3e >.'<Branch>'.},........{.path.=>
09a0 20 5f 28 22 2f 5f 48 65 6c 70 22 29 2e 5f 28 22 2f 5f 48 65 6c 70 2e 2e 2e 22 29 2c 20 63 61 6c ._("/_Help")._("/_Help..."),.cal
09c0 6c 62 61 63 6b 20 3d 3e 20 73 75 62 20 7b 0a 09 09 09 09 20 20 20 24 69 6e 2d 3e 61 73 6b 5f 77 lback.=>.sub.{........$in->ask_w
09e0 61 72 6e 28 5f 28 22 48 61 72 64 64 72 61 6b 65 20 68 65 6c 70 22 29 2c 20 0a 09 09 09 09 09 09 arn(_("Harddrake.help"),........
0a00 09 20 20 5f 28 22 44 65 73 63 72 69 70 74 69 6f 6e 20 6f 66 20 74 68 65 20 66 69 65 6c 64 73 3a ..._("Description.of.the.fields:
0a20 5c 6e 5c 6e 22 29 0a 09 09 09 09 09 09 09 20 20 2e 20 6a 6f 69 6e 28 22 5c 6e 5c 6e 22 2c 20 6d \n\n")............join("\n\n",.m
0a40 61 70 20 7b 20 22 24 66 69 65 6c 64 73 7b 24 5f 7d 5b 30 5d 3a 20 24 66 69 65 6c 64 73 7b 24 5f ap.{."$fields{$_}[0]:.$fields{$_
0a60 7d 5b 31 5d 22 7d 20 6b 65 79 73 20 25 66 69 65 6c 64 73 29 29 3b 0a 09 09 09 20 20 20 20 7d 0a }[1]"}.keys.%fields));........}.
0a80 09 09 09 20 20 7d 2c 0a 09 09 09 20 20 20 20 7b 20 70 61 74 68 20 3d 3e 20 5f 28 22 2f 5f 48 65 .....},........{.path.=>._("/_He
0aa0 6c 70 22 29 2e 5f 28 22 2f 5f 41 62 6f 75 74 2e 2e 2e 22 29 2c 20 63 61 6c 6c 62 61 63 6b 20 3d lp")._("/_About..."),.callback.=
0ac0 3e 20 73 75 62 20 7b 0a 09 09 09 09 20 20 20 24 69 6e 2d 3e 61 73 6b 5f 77 61 72 6e 28 5f 28 22 >.sub.{........$in->ask_warn(_("
0ae0 41 62 6f 75 74 20 48 61 72 64 64 72 61 6b 65 22 29 2c 20 0a 09 09 09 09 09 09 09 20 20 6a 6f 69 About.Harddrake"),...........joi
0b00 6e 20 28 22 22 2c 20 5f 28 22 54 68 69 73 20 69 73 20 48 61 72 64 44 72 61 6b 65 2c 20 61 20 4d n.("",._("This.is.HardDrake,.a.M
0b20 61 6e 64 72 61 6b 65 20 68 61 72 64 77 61 72 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 74 andrake.hardware.configuration.t
0b40 6f 6f 6c 2e 5c 6e 56 65 72 73 69 6f 6e 3a 22 29 2c 20 22 20 24 68 61 72 64 64 72 61 6b 65 3a 3a ool.\nVersion:"),.".$harddrake::
0b60 64 61 74 61 3a 3a 76 65 72 73 69 6f 6e 5c 6e 22 2c 20 0a 09 09 09 09 09 09 09 09 20 20 20 5f 28 data::version\n",............._(
0b80 22 41 75 74 68 6f 72 3a 22 29 2c 20 22 20 54 68 69 65 72 72 79 20 56 69 67 6e 61 75 64 20 3c 74 "Author:"),.".Thierry.Vignaud.<t
0ba0 76 69 67 6e 61 75 64 5c 40 6d 61 6e 64 72 61 6b 65 73 6f 66 74 2e 63 6f 6d 3e 20 5c 6e 5c 6e 22 vignaud\@mandrakesoft.com>.\n\n"
0bc0 20 2c 0a 09 09 09 09 09 09 09 09 20 20 20 66 6f 72 6d 61 74 41 6c 61 54 65 58 28 24 6c 69 63 65 .,............formatAlaTeX($lice
0be0 6e 73 65 29 29 29 3b 0a 09 09 09 20 20 20 20 7d 0a 09 09 09 20 20 7d 2c 0a 09 09 09 20 20 20 20 nse)));........}......},........
0c00 29 3b 0a 0a 73 75 62 20 6e 65 77 20 7b 0a 20 20 20 20 6d 79 20 24 73 69 67 5f 69 64 3b 0a 0a 20 );..sub.new.{.....my.$sig_id;...
0c20 20 20 20 24 69 6e 20 3d 20 27 69 6e 74 65 72 61 63 74 69 76 65 27 2d 3e 76 6e 65 77 28 27 73 75 ...$in.=.'interactive'->vnew('su
0c40 27 2c 20 27 64 65 66 61 75 6c 74 27 29 3b 0a 20 20 20 20 61 64 64 5f 69 63 6f 6e 5f 70 61 74 68 ',.'default');.....add_icon_path
0c60 28 27 2f 75 73 72 2f 73 68 61 72 65 2f 70 69 78 6d 61 70 73 2f 68 61 72 64 64 72 61 6b 65 32 2f ('/usr/share/pixmaps/harddrake2/
0c80 27 29 3b 0a 20 20 20 20 24 6d 61 69 6e 5f 77 69 6e 20 3d 20 24 3a 3a 69 73 45 6d 62 65 64 64 65 ');.....$main_win.=.$::isEmbedde
0ca0 64 20 3f 20 6e 65 77 20 47 74 6b 3a 3a 50 6c 75 67 20 28 24 3a 3a 58 49 44 29 20 3a 20 6e 65 77 d.?.new.Gtk::Plug.($::XID).:.new
0cc0 20 47 74 6b 3a 3a 57 69 6e 64 6f 77 20 2d 74 6f 70 6c 65 76 65 6c 3b 0a 20 20 20 20 24 6d 61 69 .Gtk::Window.-toplevel;.....$mai
0ce0 6e 5f 77 69 6e 2d 3e 73 65 74 5f 74 69 74 6c 65 28 5f 28 22 48 61 72 64 64 72 61 6b 65 32 20 76 n_win->set_title(_("Harddrake2.v
0d00 65 72 73 69 6f 6e 20 22 29 20 2e 20 24 68 61 72 64 64 72 61 6b 65 3a 3a 64 61 74 61 3a 3a 76 65 ersion.")...$harddrake::data::ve
0d20 72 73 69 6f 6e 29 3b 0a 20 20 20 20 24 6d 61 69 6e 5f 77 69 6e 2d 3e 73 65 74 5f 64 65 66 61 75 rsion);.....$main_win->set_defau
0d40 6c 74 5f 73 69 7a 65 28 37 36 30 2c 20 33 35 30 29 3b 20 23 20 37 36 30 20 73 68 6f 75 6c 64 20 lt_size(760,.350);.#.760.should.
0d60 62 65 20 6f 6b 20 66 6f 72 20 6d 6f 73 74 20 77 6d 20 69 6e 20 38 30 30 78 36 30 30 0a 20 20 20 be.ok.for.most.wm.in.800x600....
0d80 20 24 6d 61 69 6e 5f 77 69 6e 2d 3e 73 65 74 5f 70 6f 6c 69 63 79 28 30 2c 20 31 2c 20 30 29 3b .$main_win->set_policy(0,.1,.0);
0da0 0a 0a 20 20 20 20 67 74 6b 61 64 64 28 24 6d 61 69 6e 5f 77 69 6e 2c 20 6d 79 20 24 6d 61 69 6e ......gtkadd($main_win,.my.$main
0dc0 5f 76 62 6f 78 20 3d 20 67 74 6b 61 64 64 28 67 74 6b 61 64 64 28 67 74 6b 61 64 64 28 6e 65 77 _vbox.=.gtkadd(gtkadd(gtkadd(new
0de0 20 47 74 6b 3a 3a 56 42 6f 78 28 30 2c 20 30 29 2c 20 6d 79 20 24 6d 65 6e 75 62 61 72 20 3d 20 .Gtk::VBox(0,.0),.my.$menubar.=.
0e00 75 67 74 6b 3a 3a 63 72 65 61 74 65 5f 66 61 63 74 6f 72 79 5f 6d 65 6e 75 28 24 6d 61 69 6e 5f ugtk::create_factory_menu($main_
0e20 77 69 6e 2c 20 40 6d 65 6e 75 5f 69 74 65 6d 73 29 29 2c 20 6d 79 20 24 68 70 61 6e 65 64 20 3d win,.@menu_items)),.my.$hpaned.=
0e40 20 6e 65 77 20 47 74 6b 3a 3a 48 50 61 6e 65 64 29 2c 20 6d 79 20 24 73 74 61 74 75 73 62 61 72 .new.Gtk::HPaned),.my.$statusbar
0e60 20 3d 20 6e 65 77 20 47 74 6b 3a 3a 53 74 61 74 75 73 62 61 72 29 29 3b 0a 20 20 20 20 24 6d 61 .=.new.Gtk::Statusbar));.....$ma
0e80 69 6e 5f 76 62 6f 78 2d 3e 73 65 74 5f 63 68 69 6c 64 5f 70 61 63 6b 69 6e 67 28 24 73 74 61 74 in_vbox->set_child_packing($stat
0ea0 75 73 62 61 72 2c 20 30 2c 20 30 2c 20 30 2c 20 27 73 74 61 72 74 27 29 3b 0a 20 20 20 20 24 6d usbar,.0,.0,.0,.'start');.....$m
0ec0 61 69 6e 5f 76 62 6f 78 2d 3e 73 65 74 5f 63 68 69 6c 64 5f 70 61 63 6b 69 6e 67 28 24 6d 65 6e ain_vbox->set_child_packing($men
0ee0 75 62 61 72 2c 20 30 2c 20 30 2c 20 30 2c 20 27 73 74 61 72 74 27 29 3b 0a 0a 20 20 20 20 24 68 ubar,.0,.0,.0,.'start');......$h
0f00 70 61 6e 65 64 2d 3e 70 61 63 6b 31 28 67 74 6b 61 64 64 28 6e 65 77 20 47 74 6b 3a 3a 46 72 61 paned->pack1(gtkadd(new.Gtk::Fra
0f20 6d 65 28 5f 28 22 44 65 74 65 63 74 65 64 20 68 61 72 64 77 61 72 65 22 29 29 2c 20 63 72 65 61 me(_("Detected.hardware")),.crea
0f40 74 65 53 63 72 6f 6c 6c 65 64 57 69 6e 64 6f 77 28 6d 79 20 24 74 72 65 65 20 3d 20 6e 65 77 20 teScrolledWindow(my.$tree.=.new.
0f60 47 74 6b 3a 3a 54 72 65 65 29 29 2c 20 31 2c 20 31 29 3b 0a 20 20 20 20 24 68 70 61 6e 65 64 2d Gtk::Tree)),.1,.1);.....$hpaned-
0f80 3e 70 61 63 6b 32 28 6d 79 20 24 76 62 6f 78 20 3d 20 67 74 6b 61 64 64 28 67 74 6b 61 64 64 28 >pack2(my.$vbox.=.gtkadd(gtkadd(
0fa0 67 74 6b 61 64 64 28 6e 65 77 20 47 74 6b 3a 3a 56 42 6f 78 2c 20 67 74 6b 61 64 64 28 6e 65 77 gtkadd(new.Gtk::VBox,.gtkadd(new
0fc0 20 47 74 6b 3a 3a 46 72 61 6d 65 28 5f 28 22 49 6e 66 6f 72 6d 61 74 69 6f 6e 73 22 29 29 2c 20 .Gtk::Frame(_("Informations")),.
0fe0 67 74 6b 61 64 64 28 6e 65 77 20 47 74 6b 3a 3a 48 42 6f 78 2c 20 63 72 65 61 74 65 53 63 72 6f gtkadd(new.Gtk::HBox,.createScro
1000 6c 6c 65 64 57 69 6e 64 6f 77 28 6d 79 20 24 74 65 78 74 20 3d 20 6e 65 77 20 47 74 6b 3a 3a 54 lledWindow(my.$text.=.new.Gtk::T
1020 65 78 74 29 29 29 29 2c 20 6d 79 20 24 6d 6f 64 75 6c 65 5f 63 66 67 5f 62 75 74 74 6f 6e 20 3d ext)))),.my.$module_cfg_button.=
1040 20 6e 65 77 20 47 74 6b 3a 3a 42 75 74 74 6f 6e 28 5f 28 22 43 6f 6e 66 69 67 75 72 65 20 6d 6f .new.Gtk::Button(_("Configure.mo
1060 64 75 6c 65 22 29 29 29 2c 20 6d 79 20 24 63 6f 6e 66 69 67 5f 62 75 74 74 6f 6e 20 3d 20 6e 65 dule"))),.my.$config_button.=.ne
1080 77 20 47 74 6b 3a 3a 42 75 74 74 6f 6e 28 5f 28 22 52 75 6e 20 63 6f 6e 66 69 67 20 74 6f 6f 6c w.Gtk::Button(_("Run.config.tool
10a0 22 29 29 29 2c 20 31 2c 20 31 29 3b 0a 20 20 20 20 24 76 62 6f 78 2d 3e 73 65 74 5f 63 68 69 6c "))),.1,.1);.....$vbox->set_chil
10c0 64 5f 70 61 63 6b 69 6e 67 28 24 63 6f 6e 66 69 67 5f 62 75 74 74 6f 6e 2c 20 30 2c 20 30 2c 20 d_packing($config_button,.0,.0,.
10e0 30 2c 20 27 73 74 61 72 74 27 29 3b 0a 20 20 20 20 24 76 62 6f 78 2d 3e 73 65 74 5f 63 68 69 6c 0,.'start');.....$vbox->set_chil
1100 64 5f 70 61 63 6b 69 6e 67 28 24 6d 6f 64 75 6c 65 5f 63 66 67 5f 62 75 74 74 6f 6e 2c 20 30 2c d_packing($module_cfg_button,.0,
1120 20 30 2c 20 30 2c 20 27 73 74 61 72 74 27 29 3b 0a 0a 20 20 20 20 6d 79 20 24 77 61 69 74 20 3d .0,.0,.'start');......my.$wait.=
1140 20 24 69 6e 2d 3e 77 61 69 74 5f 6d 65 73 73 61 67 65 28 5f 28 22 50 6c 65 61 73 65 20 77 61 69 .$in->wait_message(_("Please.wai
1160 74 22 29 2c 20 5f 28 22 44 65 74 65 63 74 69 6f 6e 20 69 6e 20 70 72 6f 67 72 65 73 73 22 29 29 t"),._("Detection.in.progress"))
1180 3b 0a 0a 20 20 20 20 6d 79 20 24 63 6d 61 70 20 3d 20 47 74 6b 3a 3a 47 64 6b 3a 3a 43 6f 6c 6f ;......my.$cmap.=.Gtk::Gdk::Colo
11a0 72 6d 61 70 2d 3e 67 65 74 5f 73 79 73 74 65 6d 3b 0a 20 20 20 20 6d 79 20 24 63 6f 6c 6f 72 20 rmap->get_system;.....my.$color.
11c0 3d 20 7b 20 27 72 65 64 27 20 3d 3e 20 30 78 33 31 30 30 2c 20 27 67 72 65 65 6e 27 20 3d 3e 20 =.{.'red'.=>.0x3100,.'green'.=>.
11e0 30 78 36 34 30 30 2c 20 27 62 6c 75 65 27 20 3d 3e 20 30 78 62 63 30 30 20 7d 3b 0a 20 20 20 20 0x6400,.'blue'.=>.0xbc00.};.....
1200 24 63 6d 61 70 2d 3e 63 6f 6c 6f 72 5f 61 6c 6c 6f 63 28 24 63 6f 6c 6f 72 29 3b 0a 20 20 20 20 $cmap->color_alloc($color);.....
1220 6d 79 20 24 77 63 6f 6c 6f 72 20 3d 20 7b 20 27 72 65 64 27 20 3d 3e 20 30 78 46 46 46 46 2c 20 my.$wcolor.=.{.'red'.=>.0xFFFF,.
1240 27 67 72 65 65 6e 27 20 3d 3e 20 30 78 36 34 30 30 2c 20 27 62 6c 75 65 27 20 3d 3e 20 30 78 36 'green'.=>.0x6400,.'blue'.=>.0x6
1260 34 30 30 20 7d 3b 0a 20 20 20 20 24 63 6d 61 70 2d 3e 63 6f 6c 6f 72 5f 61 6c 6c 6f 63 28 24 77 400.};.....$cmap->color_alloc($w
1280 63 6f 6c 6f 72 29 3b 0a 0a 20 20 20 20 24 74 72 65 65 2d 3e 61 70 70 65 6e 64 28 6d 79 20 24 72 color);......$tree->append(my.$r
12a0 6f 6f 74 20 3d 20 6e 65 77 20 47 74 6b 3a 3a 54 72 65 65 49 74 65 6d 29 3b 0a 20 20 20 20 24 72 oot.=.new.Gtk::TreeItem);.....$r
12c0 6f 6f 74 2d 3e 73 65 74 5f 73 75 62 74 72 65 65 28 6d 79 20 24 6d 61 69 6e 5f 73 75 62 74 72 65 oot->set_subtree(my.$main_subtre
12e0 65 20 3d 20 6e 65 77 20 47 74 6b 3a 3a 54 72 65 65 29 3b 0a 20 20 20 20 0a 20 20 20 20 66 6f 72 e.=.new.Gtk::Tree);..........for
1300 65 61 63 68 20 28 40 68 61 72 64 64 72 61 6b 65 3a 3a 64 61 74 61 3a 3a 74 72 65 65 29 20 7b 0a each.(@harddrake::data::tree).{.
1320 09 20 20 20 6d 79 20 28 24 49 64 65 6e 74 2c 20 24 74 69 74 6c 65 2c 20 24 69 63 6f 6e 2c 20 24 ....my.($Ident,.$title,.$icon,.$
1340 63 6f 6e 66 69 67 75 72 61 74 6f 72 2c 20 24 64 65 74 65 63 74 6f 72 29 20 3d 20 40 24 5f 3b 0a configurator,.$detector).=.@$_;.
1360 09 20 20 20 6e 65 78 74 20 69 66 20 28 72 65 66 28 24 64 65 74 65 63 74 6f 72 29 20 6e 65 20 22 ....next.if.(ref($detector).ne."
1380 43 4f 44 45 22 29 3b 20 23 73 6b 69 70 20 63 6c 61 73 73 20 77 69 74 6f 75 74 68 20 64 65 74 65 CODE");.#skip.class.witouth.dete
13a0 63 74 6f 72 0a 09 20 20 20 6d 79 20 40 64 65 76 69 63 65 73 20 3d 20 26 24 64 65 74 65 63 74 6f ctor.....my.@devices.=.&$detecto
13c0 72 3b 0a 09 20 20 20 6e 65 78 74 20 69 66 20 28 21 6c 69 73 74 6c 65 6e 67 74 68 28 40 64 65 76 r;.....next.if.(!listlength(@dev
13e0 69 63 65 73 29 29 3b 20 23 20 53 6b 69 70 20 65 6d 70 74 79 20 63 6c 61 73 73 20 28 6e 6f 20 64 ices));.#.Skip.empty.class.(no.d
1400 65 76 69 63 65 73 29 0a 09 20 20 20 6d 79 20 28 24 68 77 5f 63 6c 61 73 73 5f 69 74 65 6d 2c 20 evices).....my.($hw_class_item,.
1420 24 68 77 5f 63 6c 61 73 73 5f 74 72 65 65 29 20 3d 20 28 6e 65 77 20 47 74 6b 3a 3a 54 72 65 65 $hw_class_tree).=.(new.Gtk::Tree
1440 49 74 65 6d 2c 20 6e 65 77 20 47 74 6b 3a 3a 54 72 65 65 29 3b 0a 09 20 20 20 24 6d 61 69 6e 5f Item,.new.Gtk::Tree);.....$main_
1460 73 75 62 74 72 65 65 2d 3e 61 70 70 65 6e 64 28 24 68 77 5f 63 6c 61 73 73 5f 69 74 65 6d 29 3b subtree->append($hw_class_item);
1480 0a 09 20 20 20 24 68 77 5f 63 6c 61 73 73 5f 69 74 65 6d 2d 3e 73 69 67 6e 61 6c 5f 63 6f 6e 6e .....$hw_class_item->signal_conn
14a0 65 63 74 28 73 65 6c 65 63 74 20 20 3d 3e 20 73 75 62 20 7b 0a 09 09 20 20 24 74 65 78 74 2d 3e ect(select..=>.sub.{.....$text->
14c0 62 61 63 6b 77 61 72 64 5f 64 65 6c 65 74 65 28 24 74 65 78 74 2d 3e 67 65 74 5f 70 6f 69 6e 74 backward_delete($text->get_point
14e0 29 3b 20 23 20 65 72 61 73 65 20 61 6c 6c 20 70 72 65 76 69 6f 75 73 20 74 65 78 74 0a 09 09 20 );.#.erase.all.previous.text....
1500 20 24 63 6f 6e 66 69 67 5f 62 75 74 74 6f 6e 2d 3e 68 69 64 65 3b 0a 09 09 20 20 24 6d 6f 64 75 .$config_button->hide;.....$modu
1520 6c 65 5f 63 66 67 5f 62 75 74 74 6f 6e 2d 3e 68 69 64 65 3b 0a 09 20 20 20 7d 2c 20 2c 20 22 22 le_cfg_button->hide;.....},.,.""
1540 29 3b 0a 09 20 20 20 0a 09 20 20 20 75 67 74 6b 3a 3a 74 72 65 65 5f 73 65 74 5f 69 63 6f 6e 28 );..........ugtk::tree_set_icon(
1560 67 74 6b 73 68 6f 77 28 24 68 77 5f 63 6c 61 73 73 5f 69 74 65 6d 29 2c 20 24 74 69 74 6c 65 2c gtkshow($hw_class_item),.$title,
1580 20 24 69 63 6f 6e 29 3b 0a 09 20 20 20 24 68 77 5f 63 6c 61 73 73 5f 69 74 65 6d 2d 3e 73 65 74 .$icon);.....$hw_class_item->set
15a0 5f 73 75 62 74 72 65 65 28 24 68 77 5f 63 6c 61 73 73 5f 74 72 65 65 29 3b 0a 09 20 20 20 24 68 _subtree($hw_class_tree);.....$h
15c0 77 5f 63 6c 61 73 73 5f 69 74 65 6d 2d 3e 65 78 70 61 6e 64 20 75 6e 6c 65 73 73 20 28 24 74 69 w_class_item->expand.unless.($ti
15e0 74 6c 65 20 3d 7e 20 2f 55 6e 6b 6e 6f 77 6e 2f 00 29 3b 0a 0a 09 20 20 20 66 6f 72 65 61 63 68 tle.=~./Unknown/.);......foreach
1600 20 28 40 64 65 76 69 63 65 73 29 20 7b 0a 09 09 20 20 69 66 20 28 65 78 69 73 74 73 20 24 5f 2d .(@devices).{.....if.(exists.$_-
1620 3e 7b 62 75 73 7d 20 26 26 20 24 5f 2d 3e 7b 62 75 73 7d 20 65 71 20 22 50 43 49 22 29 20 7b 0a >{bus}.&&.$_->{bus}.eq."PCI").{.
1640 09 09 09 20 6d 79 20 24 69 20 3d 20 24 5f 3b 0a 09 09 09 20 24 5f 2d 3e 7b 62 75 73 5f 69 64 7d ....my.$i.=.$_;.....$_->{bus_id}
1660 20 3d 20 6a 6f 69 6e 20 27 3a 27 2c 20 6d 61 70 20 7b 20 69 66 5f 28 24 69 2d 3e 7b 24 5f 7d 20 .=.join.':',.map.{.if_($i->{$_}.
1680 6e 65 20 22 36 35 35 33 35 22 2c 20 20 73 70 72 69 6e 74 66 28 22 25 6c 78 22 2c 20 24 69 2d 3e ne."65535",..sprintf("%lx",.$i->
16a0 7b 24 5f 7d 29 29 20 7d 20 71 77 28 76 65 6e 64 6f 72 20 69 64 20 73 75 62 76 65 6e 64 6f 72 20 {$_})).}.qw(vendor.id.subvendor.
16c0 73 75 62 69 64 29 3b 0a 09 09 09 20 24 5f 2d 3e 7b 62 75 73 5f 6c 6f 63 61 74 69 6f 6e 7d 20 3d subid);.....$_->{bus_location}.=
16e0 20 6a 6f 69 6e 20 27 3a 27 2c 20 6d 61 70 20 7b 20 73 70 72 69 6e 74 66 28 22 25 6c 78 22 2c 20 .join.':',.map.{.sprintf("%lx",.
1700 24 69 2d 3e 7b 24 5f 7d 20 29 20 7d 20 71 77 28 70 63 69 5f 62 75 73 20 70 63 69 5f 64 65 76 69 $i->{$_}.).}.qw(pci_bus.pci_devi
1720 63 65 20 70 63 69 5f 66 75 6e 63 74 69 6f 6e 29 3b 0a 09 09 20 20 7d 0a 09 09 20 20 23 20 73 70 ce.pci_function);.....}.....#.sp
1740 6c 69 74 20 64 65 73 63 72 69 70 74 69 6f 6e 20 69 6e 74 6f 20 6d 61 6e 75 66 61 63 74 75 72 65 lit.description.into.manufacture
1760 72 2f 64 65 73 63 72 69 70 74 69 6f 6e 0a 09 09 20 20 28 24 5f 2d 3e 7b 56 65 6e 64 6f 72 7d 2c r/description.....($_->{Vendor},
1780 20 24 5f 2d 3e 7b 64 65 73 63 72 69 70 74 69 6f 6e 7d 29 20 3d 20 73 70 6c 69 74 28 2f 5c 7c 2f .$_->{description}).=.split(/\|/
17a0 2c 24 5f 2d 3e 7b 64 65 73 63 72 69 70 74 69 6f 6e 7d 29 20 69 66 20 65 78 69 73 74 73 20 24 5f ,$_->{description}).if.exists.$_
17c0 2d 3e 7b 64 65 73 63 72 69 70 74 69 6f 6e 7d 3b 0a 09 09 20 20 0a 09 09 20 20 69 66 20 28 65 78 ->{description};..........if.(ex
17e0 69 73 74 73 20 24 5f 2d 3e 7b 76 61 6c 7d 29 20 7b 20 23 20 53 63 61 6e 6e 65 72 20 3f 0a 09 09 ists.$_->{val}).{.#.Scanner.?...
1800 09 20 20 6d 79 20 24 76 61 6c 20 3d 20 24 5f 2d 3e 7b 76 61 6c 7d 3b 0a 09 09 09 20 20 28 24 5f ...my.$val.=.$_->{val};......($_
1820 2d 3e 7b 56 65 6e 64 6f 72 7d 2c 24 5f 2d 3e 7b 64 65 73 63 72 69 70 74 69 6f 6e 7d 29 20 3d 20 ->{Vendor},$_->{description}).=.
1840 73 70 6c 69 74 28 2f 5c 7c 2f 2c 20 24 76 61 6c 2d 3e 7b 44 45 53 43 52 49 50 54 49 4f 4e 7d 29 split(/\|/,.$val->{DESCRIPTION})
1860 3b 0a 09 09 20 20 7d 0a 09 09 20 20 23 20 45 49 44 45 20 64 65 74 65 63 74 69 6f 6e 20 69 6e 63 ;.....}.....#.EIDE.detection.inc
1880 6f 68 65 72 65 6e 63 79 3a 0a 09 09 20 20 69 66 20 28 65 78 69 73 74 73 20 24 5f 2d 3e 7b 62 75 oherency:.....if.(exists.$_->{bu
18a0 73 7d 20 26 26 20 24 5f 2d 3e 7b 62 75 73 7d 20 65 71 20 27 69 64 65 27 29 20 7b 0a 09 09 09 20 s}.&&.$_->{bus}.eq.'ide').{.....
18c0 24 5f 2d 3e 7b 63 68 61 6e 6e 65 6c 7d 20 3d 20 5f 28 24 5f 2d 3e 7b 63 68 61 6e 6e 65 6c 7d 20 $_->{channel}.=._($_->{channel}.
18e0 3f 20 22 73 65 63 6f 6e 64 61 72 79 22 20 3a 20 22 70 72 69 6d 61 72 79 22 29 3b 0a 09 09 09 64 ?."secondary".:."primary");....d
1900 65 6c 65 74 65 20 24 5f 2d 3e 7b 69 6e 66 6f 7d 3b 0a 09 09 20 20 7d 20 65 6c 73 69 66 20 28 28 elete.$_->{info};.....}.elsif.((
1920 65 78 69 73 74 73 20 24 5f 2d 3e 7b 69 64 7d 29 20 26 26 20 28 24 5f 2d 3e 7b 62 75 73 7d 20 6e exists.$_->{id}).&&.($_->{bus}.n
1940 65 20 27 50 43 49 27 29 29 20 7b 0a 09 09 09 20 23 20 53 43 53 49 20 64 65 74 65 63 74 69 6f 6e e.'PCI')).{.....#.SCSI.detection
1960 20 69 6e 63 6f 68 65 72 65 6e 63 79 3a 0a 09 09 09 20 6d 79 20 24 69 20 3d 20 24 5f 3b 0a 09 09 .incoherency:.....my.$i.=.$_;...
1980 09 20 24 5f 2d 3e 7b 62 75 73 5f 6c 6f 63 61 74 69 6f 6e 7d 20 3d 20 6a 6f 69 6e 20 27 3a 27 2c ..$_->{bus_location}.=.join.':',
19a0 20 6d 61 70 20 7b 20 73 70 72 69 6e 74 66 28 22 25 6c 78 22 2c 20 24 69 2d 3e 7b 24 5f 7d 20 29 .map.{.sprintf("%lx",.$i->{$_}.)
19c0 20 7d 20 71 77 28 62 75 73 20 69 64 29 3b 0a 09 09 20 20 7d 0a 09 09 20 20 66 6f 72 65 61 63 68 .}.qw(bus.id);.....}.....foreach
19e0 20 6d 79 20 24 69 20 28 71 77 28 76 65 6e 64 6f 72 20 69 64 20 73 75 62 76 65 6e 64 6f 72 20 73 .my.$i.(qw(vendor.id.subvendor.s
1a00 75 62 69 64 20 70 63 69 5f 62 75 73 20 70 63 69 5f 64 65 76 69 63 65 20 70 63 69 5f 66 75 6e 63 ubid.pci_bus.pci_device.pci_func
1a20 74 69 6f 6e 20 4d 4f 55 53 45 54 59 50 45 20 58 4d 4f 55 53 45 54 59 50 45 20 75 6e 73 61 66 65 tion.MOUSETYPE.XMOUSETYPE.unsafe
1a40 20 76 61 6c 20 64 65 76 66 73 5f 70 72 65 66 69 78 20 77 61 63 6f 6d 20 61 75 78 6d 6f 75 73 65 .val.devfs_prefix.wacom.auxmouse
1a60 29 29 20 7b 20 64 65 6c 65 74 65 20 24 5f 2d 3e 7b 24 69 7d 20 7d 0a 09 09 20 20 6d 79 20 24 68 )).{.delete.$_->{$i}.}.....my.$h
1a80 77 5f 69 74 65 6d 20 3d 20 6e 65 77 20 47 74 6b 3a 3a 54 72 65 65 49 74 65 6d 28 64 65 66 69 6e w_item.=.new.Gtk::TreeItem(defin
1aa0 65 64 28 24 5f 2d 3e 7b 64 65 76 69 63 65 7d 29 20 3f 20 24 5f 2d 3e 7b 64 65 76 69 63 65 7d 20 ed($_->{device}).?.$_->{device}.
1ac0 3a 0a 09 09 09 09 28 64 65 66 69 6e 65 64 28 24 5f 2d 3e 7b 64 65 73 63 72 69 70 74 69 6f 6e 7d :.....(defined($_->{description}
1ae0 29 20 3f 20 24 5f 2d 3e 7b 64 65 73 63 72 69 70 74 69 6f 6e 7d 20 3a 20 24 74 69 74 6c 65 29 29 ).?.$_->{description}.:.$title))
1b00 3b 0a 09 09 20 20 24 5f 2d 3e 7b 64 65 76 69 63 65 7d 20 3d 20 27 2f 64 65 76 2f 27 2e 24 5f 2d ;.....$_->{device}.=.'/dev/'.$_-
1b20 3e 7b 64 65 76 69 63 65 7d 20 69 66 20 65 78 69 73 74 73 20 24 5f 2d 3e 7b 64 65 76 69 63 65 7d >{device}.if.exists.$_->{device}
1b40 3b 0a 09 09 20 20 24 68 77 5f 63 6c 61 73 73 5f 74 72 65 65 2d 3e 61 70 70 65 6e 64 28 67 74 6b ;.....$hw_class_tree->append(gtk
1b60 65 78 70 61 6e 64 28 67 74 6b 73 68 6f 77 28 24 68 77 5f 69 74 65 6d 29 29 29 3b 0a 09 09 20 20 expand(gtkshow($hw_item)));.....
1b80 6d 79 20 24 64 61 74 61 20 3d 20 24 5f 3b 0a 09 09 20 20 24 68 77 5f 69 74 65 6d 2d 3e 73 69 67 my.$data.=.$_;.....$hw_item->sig
1ba0 6e 61 6c 5f 68 61 6e 64 6c 65 72 73 5f 64 65 73 74 72 6f 79 28 29 3b 0a 09 09 20 20 24 68 77 5f nal_handlers_destroy();.....$hw_
1bc0 69 74 65 6d 2d 3e 73 69 67 6e 61 6c 5f 63 6f 6e 6e 65 63 74 28 73 65 6c 65 63 74 20 3d 3e 20 73 item->signal_connect(select.=>.s
1be0 75 62 20 7b 0a 09 09 09 20 24 5f 20 3d 20 24 64 61 74 61 3b 0a 09 09 09 20 24 74 65 78 74 2d 3e ub.{.....$_.=.$data;.....$text->
1c00 68 69 64 65 3b 0a 09 09 09 20 24 74 65 78 74 2d 3e 62 61 63 6b 77 61 72 64 5f 64 65 6c 65 74 65 hide;.....$text->backward_delete
1c20 28 24 74 65 78 74 2d 3e 67 65 74 5f 70 6f 69 6e 74 29 3b 0a 09 09 09 20 66 6f 72 65 61 63 68 20 ($text->get_point);.....foreach.
1c40 6d 79 20 24 69 20 28 73 6f 72 74 20 6b 65 79 73 20 25 24 5f 29 20 7b 0a 09 09 09 09 24 74 65 78 my.$i.(sort.keys.%$_).{.....$tex
1c60 74 2d 3e 69 6e 73 65 72 74 28 22 22 2c 20 24 74 65 78 74 2d 3e 73 74 79 6c 65 2d 3e 62 6c 61 63 t->insert("",.$text->style->blac
1c80 6b 2c 20 22 22 2c 20 28 24 66 69 65 6c 64 73 7b 24 69 7d 5b 30 5d 20 3f 20 24 66 69 65 6c 64 73 k,."",.($fields{$i}[0].?.$fields
1ca0 7b 24 69 7d 5b 30 5d 20 3a 20 24 69 29 20 2e 20 22 3a 20 22 29 3b 0a 09 09 09 09 69 66 20 28 24 {$i}[0].:.$i)...":.");.....if.($
1cc0 69 20 65 71 20 27 64 72 69 76 65 72 27 20 26 26 20 24 5f 2d 3e 7b 24 69 7d 20 65 71 20 27 75 6e i.eq.'driver'.&&.$_->{$i}.eq.'un
1ce0 6b 6e 6f 77 6e 27 29 20 7b 0a 09 09 09 09 20 20 20 20 24 74 65 78 74 2d 3e 69 6e 73 65 72 74 28 known').{.........$text->insert(
1d00 22 22 2c 20 24 77 63 6f 6c 6f 72 2c 20 22 22 2c 20 22 24 5f 2d 3e 7b 24 69 7d 5c 6e 5c 6e 22 29 "",.$wcolor,."",."$_->{$i}\n\n")
1d20 3b 0a 09 09 09 09 7d 20 65 6c 73 65 20 7b 20 24 74 65 78 74 2d 3e 69 6e 73 65 72 74 28 22 22 2c ;.....}.else.{.$text->insert("",
1d40 20 24 63 6f 6c 6f 72 2c 20 22 22 2c 20 22 24 5f 2d 3e 7b 24 69 7d 5c 6e 5c 6e 22 29 20 7d 0a 09 .$color,."",."$_->{$i}\n\n").}..
1d60 09 09 20 7d 0a 09 09 09 20 64 69 73 63 6f 6e 6e 65 63 74 28 24 6d 6f 64 75 6c 65 5f 63 66 67 5f ...}.....disconnect($module_cfg_
1d80 62 75 74 74 6f 6e 2c 20 27 6d 6f 64 75 6c 65 27 29 3b 0a 09 09 09 20 69 66 20 28 65 78 69 73 74 button,.'module');.....if.(exist
1da0 73 20 24 5f 2d 3e 7b 64 72 69 76 65 72 7d 20 26 26 20 20 24 5f 2d 3e 7b 64 72 69 76 65 72 7d 20 s.$_->{driver}.&&..$_->{driver}.
1dc0 6e 65 20 22 75 6e 6b 6e 6f 77 6e 22 20 26 26 20 20 24 5f 2d 3e 7b 64 72 69 76 65 72 7d 20 21 7e ne."unknown".&&..$_->{driver}.!~
1de0 20 2f 5e 43 61 72 64 3a 2f 29 20 7b 0a 09 09 09 09 24 6d 6f 64 75 6c 65 5f 63 66 67 5f 62 75 74 ./^Card:/).{.....$module_cfg_but
1e00 74 6f 6e 2d 3e 73 68 6f 77 3b 0a 09 09 09 09 24 49 44 73 7b 6d 6f 64 75 6c 65 7d 20 3d 20 24 6d ton->show;.....$IDs{module}.=.$m
1e20 6f 64 75 6c 65 5f 63 66 67 5f 62 75 74 74 6f 6e 2d 3e 73 69 67 6e 61 6c 5f 63 6f 6e 6e 65 63 74 odule_cfg_button->signal_connect
1e40 28 63 6c 69 63 6b 65 64 20 3d 3e 20 73 75 62 20 7b 0a 09 09 09 09 20 20 20 20 72 65 71 75 69 72 (clicked.=>.sub.{.........requir
1e60 65 20 6d 6f 64 75 6c 65 73 3b 0a 09 09 09 09 20 20 20 20 6d 6f 64 75 6c 65 73 3a 3a 6d 65 72 67 e.modules;.........modules::merg
1e80 65 69 6e 5f 63 6f 6e 66 28 27 2f 65 74 63 2f 6d 6f 64 75 6c 65 73 2e 63 6f 6e 66 27 29 3b 0a 09 ein_conf('/etc/modules.conf');..
1ea0 09 09 09 20 20 20 20 6d 79 20 25 63 6f 6e 66 20 3d 20 6d 6f 64 75 6c 65 73 3a 3a 67 65 74 5f 70 .......my.%conf.=.modules::get_p
1ec0 61 72 61 6d 65 74 65 72 73 28 24 5f 2d 3e 7b 64 72 69 76 65 72 7d 29 3b 0a 09 09 09 09 20 20 20 arameters($_->{driver});........
1ee0 20 72 65 71 75 69 72 65 20 6d 6f 64 70 61 72 6d 3b 0a 09 09 09 09 20 20 20 20 6d 79 20 40 6c 3b .require.modparm;.........my.@l;
1f00 0a 09 09 09 09 20 20 20 20 66 6f 72 65 61 63 68 20 28 6d 6f 64 70 61 72 6d 3a 3a 70 61 72 61 6d .........foreach.(modparm::param
1f20 65 74 65 72 73 28 24 5f 2d 3e 7b 64 72 69 76 65 72 7d 29 29 20 7b 0a 09 09 09 09 09 20 20 20 6d eters($_->{driver})).{.........m
1f40 79 20 28 24 6e 61 6d 65 2c 20 24 66 6f 72 6d 61 74 2c 20 24 64 65 73 63 72 69 70 74 69 6f 6e 29 y.($name,.$format,.$description)
1f60 20 3d 20 40 24 5f 3b 0a 09 09 09 09 09 20 20 20 70 75 73 68 20 40 6c 2c 20 7b 20 6c 61 62 65 6c .=.@$_;.........push.@l,.{.label
1f80 20 3d 3e 20 24 6e 61 6d 65 2c 20 68 65 6c 70 20 3d 3e 20 22 24 64 65 73 63 72 69 70 74 69 6f 6e .=>.$name,.help.=>."$description
1fa0 5c 6e 5b 24 66 6f 72 6d 61 74 5d 22 2c 20 76 61 6c 20 3d 3e 20 5c 24 63 6f 6e 66 7b 24 6e 61 6d \n[$format]",.val.=>.\$conf{$nam
1fc0 65 7d 20 7d 3b 0a 09 09 09 09 20 20 20 20 7d 0a 09 09 09 09 20 20 20 20 69 66 20 28 24 69 6e 2d e}.};.........}.........if.($in-
1fe0 3e 61 73 6b 5f 66 72 6f 6d 28 22 4d 6f 64 75 6c 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 22 >ask_from("Module.configuration"
2000 2c 20 5f 28 22 59 6f 75 20 63 61 6e 20 63 6f 6e 66 69 67 75 72 65 20 65 61 63 68 20 70 61 72 61 ,._("You.can.configure.each.para
2020 6d 65 74 65 72 20 6f 66 20 74 68 65 20 6d 6f 64 75 6c 65 20 68 65 72 65 2e 22 29 2c 20 5c 40 6c meter.of.the.module.here."),.\@l
2040 29 29 20 7b 0a 09 09 09 09 09 20 20 20 6d 79 20 24 6f 70 74 69 6f 6e 73 20 3d 20 6a 6f 69 6e 28 )).{.........my.$options.=.join(
2060 27 20 27 2c 20 6d 61 70 20 7b 20 69 66 5f 28 24 63 6f 6e 66 7b 24 5f 7d 2c 20 22 24 5f 3d 24 63 '.',.map.{.if_($conf{$_},."$_=$c
2080 6f 6e 66 7b 24 5f 7d 22 29 20 7d 20 6b 65 79 73 20 25 63 6f 6e 66 29 3b 0a 09 09 09 09 09 20 20 onf{$_}").}.keys.%conf);........
20a0 20 69 66 20 28 24 6f 70 74 69 6f 6e 73 29 20 7b 0a 09 09 09 09 09 09 20 20 6d 6f 64 75 6c 65 73 .if.($options).{.........modules
20c0 3a 3a 73 65 74 5f 6f 70 74 69 6f 6e 73 28 24 5f 2d 3e 7b 64 72 69 76 65 72 7d 2c 20 24 6f 70 74 ::set_options($_->{driver},.$opt
20e0 69 6f 6e 73 29 3b 0a 09 09 09 09 09 09 20 20 6d 6f 64 75 6c 65 73 3a 3a 77 72 69 74 65 5f 63 6f ions);.........modules::write_co
2100 6e 66 3b 0a 09 09 09 09 09 20 20 20 7d 0a 09 09 09 09 20 20 20 20 7d 0a 09 09 09 09 20 20 20 20 nf;.........}.........}.........
2120 67 74 6b 73 65 74 5f 6d 6f 75 73 65 63 75 72 73 6f 72 5f 6e 6f 72 6d 61 6c 28 29 3b 0a 09 09 09 gtkset_mousecursor_normal();....
2140 09 7d 29 3b 0a 09 09 09 20 7d 0a 09 09 09 20 64 69 73 63 6f 6e 6e 65 63 74 28 24 63 6f 6e 66 69 .});.....}.....disconnect($confi
2160 67 5f 62 75 74 74 6f 6e 2c 20 27 74 6f 6f 6c 27 29 3b 0a 09 09 09 20 24 74 65 78 74 2d 3e 73 68 g_button,.'tool');.....$text->sh
2180 6f 77 3b 0a 09 09 09 20 72 65 74 75 72 6e 20 75 6e 6c 65 73 73 20 2d 78 20 24 63 6f 6e 66 69 67 ow;.....return.unless.-x.$config
21a0 75 72 61 74 6f 72 3b 0a 09 09 09 20 24 49 44 73 7b 74 6f 6f 6c 7d 20 3d 20 24 63 6f 6e 66 69 67 urator;.....$IDs{tool}.=.$config
21c0 5f 62 75 74 74 6f 6e 2d 3e 73 69 67 6e 61 6c 5f 63 6f 6e 6e 65 63 74 28 63 6c 69 63 6b 65 64 20 _button->signal_connect(clicked.
21e0 3d 3e 20 73 75 62 20 7b 0a 09 09 09 09 72 65 74 75 72 6e 20 69 66 20 64 65 66 69 6e 65 64 20 24 =>.sub.{.....return.if.defined.$
2200 70 69 64 3b 0a 09 09 09 09 69 66 20 28 24 70 69 64 20 3d 20 66 6f 72 6b 28 29 29 20 7b 0a 09 09 pid;.....if.($pid.=.fork()).{...
2220 09 09 20 20 20 20 24 73 69 67 5f 69 64 20 3d 20 24 73 74 61 74 75 73 62 61 72 2d 3e 70 75 73 68 ......$sig_id.=.$statusbar->push
2240 28 24 73 74 61 74 75 73 62 61 72 2d 3e 67 65 74 5f 63 6f 6e 74 65 78 74 5f 69 64 28 22 69 64 22 ($statusbar->get_context_id("id"
2260 29 2c 20 5f 28 22 52 75 6e 6e 69 6e 67 20 5c 22 25 73 5c 22 20 2e 2e 2e 22 2c 20 24 63 6f 6e 66 ),._("Running.\"%s\"....",.$conf
2280 69 67 75 72 61 74 6f 72 29 29 3b 0a 09 09 09 09 7d 20 65 6c 73 65 20 7b 20 65 78 65 63 28 24 63 igurator));.....}.else.{.exec($c
22a0 6f 6e 66 69 67 75 72 61 74 6f 72 29 20 6f 72 20 64 69 65 20 22 24 63 6f 6e 66 69 67 75 72 61 74 onfigurator).or.die."$configurat
22c0 6f 72 20 6d 69 73 73 69 6e 67 5c 6e 22 20 7d 0a 09 09 09 20 7d 29 20 3b 0a 09 09 09 20 24 63 6f or.missing\n".}.....}).;.....$co
22e0 6e 66 69 67 5f 62 75 74 74 6f 6e 2d 3e 73 68 6f 77 3b 0a 09 09 20 20 7d 29 3b 0a 09 20 20 20 7d nfig_button->show;.....});.....}
2300 0a 20 20 20 20 7d 0a 20 20 20 20 0a 20 20 20 20 24 53 49 47 7b 43 48 4c 44 7d 20 3d 20 73 75 62 .....}..........$SIG{CHLD}.=.sub
2320 20 7b 20 75 6e 64 65 66 20 24 70 69 64 3b 20 24 73 74 61 74 75 73 62 61 72 2d 3e 70 6f 70 28 24 .{.undef.$pid;.$statusbar->pop($
2340 73 69 67 5f 69 64 29 20 7d 3b 0a 20 20 20 20 24 6d 61 69 6e 5f 77 69 6e 2d 3e 73 69 67 6e 61 6c sig_id).};.....$main_win->signal
2360 5f 63 6f 6e 6e 65 63 74 20 28 64 65 6c 65 74 65 5f 65 76 65 6e 74 20 3d 3e 20 5c 26 71 75 69 74 _connect.(delete_event.=>.\&quit
2380 5f 67 6c 6f 62 61 6c 29 3b 0a 20 20 20 20 75 6e 64 65 66 20 24 77 61 69 74 3b 0a 20 20 20 20 67 _global);.....undef.$wait;.....g
23a0 74 6b 73 65 74 5f 6d 6f 75 73 65 63 75 72 73 6f 72 5f 6e 6f 72 6d 61 6c 28 29 3b 0a 20 20 20 20 tkset_mousecursor_normal();.....
23c0 24 6d 61 69 6e 5f 77 69 6e 2d 3e 73 65 74 5f 70 6f 73 69 74 69 6f 6e 28 27 63 65 6e 74 65 72 27 $main_win->set_position('center'
23e0 29 3b 0a 20 20 20 20 24 6d 61 69 6e 5f 73 75 62 74 72 65 65 2d 3e 73 68 6f 77 3b 0a 20 20 20 20 );.....$main_subtree->show;.....
2400 24 6d 61 69 6e 5f 77 69 6e 2d 3e 73 68 6f 77 5f 61 6c 6c 28 29 3b 0a 20 20 20 20 66 6f 72 65 61 $main_win->show_all();.....forea
2420 63 68 20 28 24 6d 6f 64 75 6c 65 5f 63 66 67 5f 62 75 74 74 6f 6e 2c 20 24 63 6f 6e 66 69 67 5f ch.($module_cfg_button,.$config_
2440 62 75 74 74 6f 6e 29 20 7b 20 24 5f 2d 3e 68 69 64 65 20 7d 3b 0a 20 20 20 20 47 74 6b 2d 3e 6d button).{.$_->hide.};.....Gtk->m
2460 61 69 6e 3b 0a 7d 0a 0a 0a 73 75 62 20 71 75 69 74 5f 67 6c 6f 62 61 6c 20 7b 0a 20 20 20 20 6b ain;.}...sub.quit_global.{.....k
2480 69 6c 6c 28 31 35 2c 20 24 70 69 64 29 20 69 66 20 28 24 70 69 64 29 3b 0a 20 20 20 20 24 6d 61 ill(15,.$pid).if.($pid);.....$ma
24a0 69 6e 5f 77 69 6e 2d 3e 64 65 73 74 72 6f 79 3b 0a 20 20 20 20 24 69 6e 2d 3e 65 78 69 74 3b 0a in_win->destroy;.....$in->exit;.
24c0 7d 0a 0a 73 75 62 20 64 69 73 63 6f 6e 6e 65 63 74 20 7b 0a 20 20 20 20 6d 79 20 28 24 62 75 74 }..sub.disconnect.{.....my.($but
24e0 74 6f 6e 2c 20 24 69 64 29 20 3d 20 40 5f 3b 0a 20 20 20 20 69 66 20 28 24 49 44 73 7b 24 69 64 ton,.$id).=.@_;.....if.($IDs{$id
2500 7d 29 20 7b 0a 09 20 20 20 24 62 75 74 74 6f 6e 2d 3e 73 69 67 6e 61 6c 5f 64 69 73 63 6f 6e 6e }).{.....$button->signal_disconn
2520 65 63 74 28 24 49 44 73 7b 24 69 64 7d 29 3b 0a 09 20 20 20 24 62 75 74 74 6f 6e 2d 3e 68 69 64 ect($IDs{$id});.....$button->hid
2540 65 3b 0a 09 20 20 20 75 6e 64 65 66 20 24 49 44 73 7b 24 69 64 7d 3b 0a 20 20 20 20 7d 0a 7d 0a e;.....undef.$IDs{$id};.....}.}.
2560 0a 31 3b 0a .1;.