summaryrefslogtreecommitdiffstats
ModeNameSize
-rw-r--r--ChangeLog4641060logstatsplain
-rw-r--r--Makefile817logstatsplain
-rw-r--r--Makefile.common1613logstatsplain
-rw-r--r--Makefile.config580logstatsplain
d---------advertising631logstatsplain
d---------docs708logstatsplain
d---------globetrotter424logstatsplain
d---------images275logstatsplain
d---------kernel117logstatsplain
d---------mdk-stage12680logstatsplain
d---------perl-install1997logstatsplain
d---------rescue877logstatsplain
d---------tools949logstatsplain
f='#n194'>194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433
#!/usr/bin/perl

use strict;
use diagnostics;
use lib qw(/usr/lib/libDrakX);
use standalone;
use common;

use ugtk2 qw(:create :helpers :wrappers);
use interactive;
use harddrake::data;  #- needs to stay after use-ugtk2 as long as this module defines globals containing some N()
use POSIX qw(:sys_wait_h);


# { field => [ short_translation, full_description] }
my %fields = 
    (
     generic =>
     {
      "alternative_drivers" => [ N("Alternative drivers"),
                                 N("the list of alternative drivers for this sound card") ],
      "bus" => 
      [ N("Bus"), 
        N("this is the physical bus on which the device is plugged (eg: PCI, USB, ...)") ],
      "channel" => [ N("Channel"), N("EIDE/SCSI channel") ],
      "bus_id" => 
      [ N("Bus identification"), 
        N("- PCI and USB devices: this lists the vendor, device, subvendor and subdevice PCI/USB ids") ],
      "bus_location" => 
      [ N("Location on the bus"), 
        N("- pci devices: this gives the PCI slot, device and function of this card
- eide devices: the device is either a slave or a master device
- scsi devices: the scsi bus and the scsi device ids") ],
      "capacity" => [ N("Drive capacity"), N("special capacities of the driver (burning ability and or DVD support)") ],
      "description" => [ N("Description"), N("this field describes the device") ],
      "device" => [ N("Old device file"),
                    N("old static device name used in dev package") ],
      "devfs_device" => [ N("New devfs device"),  
                          N("new dynamic device name generated by core kernel devfs") ],
      "driver" => [
                   #-PO: here "module" is the "jargon term" for a kernel driver
                   N("Module"), N("the module of the GNU/Linux kernel that handles the device") ],
      "extended_partitions" => [ N("Extended partitions"), N("the number of extended partitions") ],
      "geometry" => [ N("Geometry"), N("Cylinder/head/sectors geometry of the disk") ],
      "host" => [ N("Disk controller"), N("the disk controller on the host side") ],
      "media_type" => [ N("Media class"), N("class of hardware device") ],
      "Model" => [ N("Model"), N("hard disk model") ],
      "nbuttons" => [ N("Number of buttons"), N("the number of buttons the mouse has") ],
      "port" => [ N("Port"), N("network printer port") ],
      "primary_partitions" => [ N("Primary partitions"), N("the number of the primary partitions") ],
      "type" => [ N("Type"), N("the type of bus on which the mouse is connected") ],
      "Vendor" => [ N("Vendor"), N("the vendor name of the device") ],
     },
     CPU =>
     {
      "bogomips" => [ N("Bogomips"), N("the GNU/Linux kernel needs to run a calculation loop at boot time to initialize a timer counter.  Its result is stored as bogomips as a way to \"benchmark\" the cpu.") ],
      "cache size" => [ N("Cache size"), N("size of the (second level) cpu cache") ],
      "coma_bug" => [
                     #-PO: here "comas" is the medical coma, not the lexical coma!!
                     N("Coma bug"), N("whether this cpu has the Cyrix 6x86 Coma bug") ],
      "cpu family" => [ N("Cpuid family"), N("family of the cpu (eg: 6 for i686 class)") ],
      "cpuid level" => [ N("Cpuid level"), N("information level that can be obtained through the cpuid instruction") ],
      "cpu MHz" => [ N("Frequency (MHz)"), N("the CPU frequency in MHz (Megahertz which in first approximation may be coarsely assimilated to number of instructions the cpu is able to execute per second)") ],
      "flags" => [ N("Flags"), N("CPU flags reported by the kernel") ],
      "fdiv_bug" => [ N("Fdiv bug"), 
                      N("Early Intel Pentium chips manufactured have a bug in their floating point processor which did not achieve the required precision when performing a Floating point DIVision (FDIV)") ],
      "fpu" => [ N("Is FPU present"), N("yes means the processor has an arithmetic coprocessor") ],
      "fpu_exception" => [ N("Whether the FPU has an irq vector"), N("yes means the arithmetic coprocessor has an exception vector attached") ],
      "f00f_bug" => [ N("F00f bug"), N("early pentiums were buggy and freezed when decoding the F00F bytecode") ],
      "hlt_bug" => [ N("Halt bug"), 
                     N("Some of the early i486DX-100 chips cannot reliably return to operating mode after the \"halt\" instruction is used") ],
      "level" => [ N("Level"), N("sub generation of the cpu") ],
      "model" => [ N("Model"), N("generation of the cpu (eg: 8 for PentiumIII, ...)") ],
      "model name" => [ N("Model name"), N("official vendor name of the cpu") ],
      "name" => [ N("Name"), N("the name of the CPU") ],
      "processor" => [ N("Processor ID"), N("the number of the processor") ],
      "stepping" => [ N("Model stepping"), N("stepping of the cpu (sub model (generation) number)") ],
      "vendor_id" => [ N("Vendor"), N("the vendor name of the processor") ],
      "wp" => [ N("Write protection"), N("the WP flag in the CR0 register of the cpu enforce write proctection at the memory page level, thus enabling the processor to prevent unchecked kernel accesses to user memory (aka this is a bug guard)") ],
     },
     floppy =>
     {
      info => [ N("Floppy format"), N("format of floppies supported by the drive") ],
     },
     HARDDISK =>
     {
      info => [ N("Disk identifier"), N("usually the disk serial number") ],
     },
     MOUSE => {
      name => [ N("Name"), N("the name of the mouse") ],
     }
    );


my ($in, $pid, $w);

my (%options, %check_boxes);
my $conffile = "/etc/sysconfig/harddrake2/ui.conf";

my ($current_device, $current_class, $current_configurator);


my %menus = (
             'options' => 
             #-PO: please keep all "/" charaters !!!
             N("/_Options"),
             'help' => N("/_Help")
             );

my %menu_options = (
                    'PRINTERS_DETECTION' => [ $menus{options}, N("/Autodetect _printers") ],
                    'MODEMS_DETECTION' => [ $menus{options}, N("/Autodetect _modems") ],
                    'JAZZ_DETECTION' => [ $menus{options}, N("/Autodetect _jaz drives") ],
                    );


my @menu_items = 
    (
     [ N("/_File"), undef, undef, undef, '<Branch>' ],
     [ N("/_File").N("/_Quit"), N("<control>Q"), \&quit_global, undef, '<StockItem>', 'gtk-quit' ],
     [ join('', @{$menu_options{PRINTERS_DETECTION}}), undef, 
       sub { $options{PRINTERS_DETECTION} = $check_boxes{PRINTERS_DETECTION}->get_active }, undef, '<CheckItem>' ],
     [ join('', @{$menu_options{MODEMS_DETECTION}}), undef,
       sub { $options{MODEMS_DETECTION} = $check_boxes{MODEMS_DETECTION}->get_active }, undef, '<CheckItem>' ],
     [ join('', @{$menu_options{JAZZ_DETECTION}}), undef,
       sub { $options{JAZZ_DETECTION} = $check_boxes{JAZZ_DETECTION}->get_active }, undef, '<CheckItem>' ],
     [ $menus{help}, undef, undef, undef, '<Branch>' ],
     [ $menus{help}.N("/_Help"), undef, sub { unless (fork()) { exec("drakhelp --id harddrake") } }, undef, '<Item>' ],
     [ $menus{help}.N("/_Fields description"), undef, sub {
           if ($current_device) {
               create_dialog(N("Harddrake help"), 
                             N("Description of the fields:\n\n")
                             . join("\n\n", map {
                                 my $info = lookup_field($_);
                                 if_($info->[0], formatAlaTeX(qq(<span foreground="royalblue3">$info->[0]:</span> $info->[1])))
                             } sort keys %$current_device),
                             { use_markup => 1, if_(!$::isEmbedded, transient => $w->{window}), height => 400, scroll => 1 })

           } else {
               create_dialog(N("Select a device !"), N("Once you've selected a device, you'll be able to see the device information in fields displayed on the right frame (\"Information\")"), { if_(!$::isEmbedded, transient => $w->{window}) })
           }
       },
       undef, '<Item>'
     ],
     [ $menus{help}.N("/_Report Bug"), undef, sub { unless (fork()) { exec("drakbug --report harddrake2 &") } }, undef, '<Item>' ],
     [ $menus{help}.N("/_About..."), undef, sub {
           create_dialog(N("About Harddrake"), 
#-PO: Do not alter the <span ..> and </span> tags
                         N("This is HardDrake, a Mandrake hardware configuration tool.\n<span foreground=\"royalblue3\">Version:</span> %s
<span foreground=\"royalblue3\">Author:</span> Thierry Vignaud &lt;tvignaud\@mandrakesoft.com&gt;\n\n", $harddrake::data::version) . "\n" .
                         formatAlaTeX($::license), { use_markup => 1, if_(!$::isEmbedded, transient => $w->{window}) });
       }, undef, '<Item>'
     ]
    );

$ugtk2::wm_icon = "harddrake";
$in = 'interactive'->vnew('su'); #require_root_capability();

my $wait = $in->wait_message(N("Please wait"), N("Detection in progress"));
gtkflush();

%options = getVarsFromSh($conffile);

# Build the gui
add_icon_path('/usr/share/pixmaps/harddrake2/');
$w = ugtk2->new(N("Harddrake2 version %s", $harddrake::data::version));
local $::main_window;   # fake diagnostics pragma