Changeset 15616 in vbox
- Timestamp:
- Dec 17, 2008 1:21:20 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp
r15610 r15616 2078 2078 static const char *sSectionHrefTpl = 2079 2079 "<tr><td width=22 rowspan=%1 align=left><img src='%2'></td>" 2080 "<td colspan= 2><b><a href='%3'><nobr>%4</nobr></a></b></td></tr>"2080 "<td colspan=3><b><a href='%3'><nobr>%4</nobr></a></b></td></tr>" 2081 2081 "%5" 2082 "<tr><td colspan= 2><font size=1> </font></td></tr>";2082 "<tr><td colspan=3><font size=1> </font></td></tr>"; 2083 2083 static const char *sSectionBoldTpl = 2084 2084 "<tr><td width=22 rowspan=%1 align=left><img src='%2'></td>" 2085 "<td colspan= 2><!-- %3 --><b><nobr>%4</nobr></b></td></tr>"2085 "<td colspan=3><!-- %3 --><b><nobr>%4</nobr></b></td></tr>" 2086 2086 "%5" 2087 "<tr><td colspan=2><font size=1> </font></td></tr>"; 2088 static const char *sSectionItemTpl = 2089 "<tr><td width=40%><nobr>%1</nobr></td><td>%2</td></tr>"; 2087 "<tr><td colspan=3><font size=1> </font></td></tr>"; 2088 static const char *sSectionItemTpl1 = 2089 "<tr><td width=40%><nobr><i>%1</i></nobr></td><td/><td/></tr>"; 2090 static const char *sSectionItemTpl2 = 2091 "<tr><td width=40%><nobr>%1:</nobr></td><td/><td>%2</td></tr>"; 2090 2092 2091 2093 static QString sGeneralBasicHrefTpl, sGeneralBasicBoldTpl; … … 2099 2101 2100 2102 QString generalItems 2101 = QString (sSectionItemTpl ).arg (tr ("Name", "details report"), "%1")2102 + QString (sSectionItemTpl ).arg (tr ("OS Type", "details report"), "%2")2103 + QString (sSectionItemTpl ).arg (tr ("Base Memory", "details report"),2104 tr ("<nobr>%3 MB</nobr>", "details report"));2103 = QString (sSectionItemTpl2).arg (tr ("Name", "details report"), "%1") 2104 + QString (sSectionItemTpl2).arg (tr ("OS Type", "details report"), "%2") 2105 + QString (sSectionItemTpl2).arg (tr ("Base Memory", "details report"), 2106 tr ("<nobr>%3 MB</nobr>", "details report")); 2105 2107 sGeneralBasicHrefTpl = QString (sSectionHrefTpl) 2106 2108 .arg (2 + 3) /* rows */ … … 2117 2119 2118 2120 generalItems 2119 += QString (sSectionItemTpl ).arg (tr ("Video Memory", "details report"),2120 tr ("<nobr>%4 MB</nobr>", "details report"))2121 + QString (sSectionItemTpl ).arg (tr ("Boot Order", "details report"), "%5")2122 + QString (sSectionItemTpl ).arg (tr ("ACPI", "details report"), "%6")2123 + QString (sSectionItemTpl ).arg (tr ("IO APIC", "details report"), "%7")2124 + QString (sSectionItemTpl ).arg (tr ("VT-x/AMD-V", "details report"), "%8")2125 + QString (sSectionItemTpl ).arg (tr ("PAE/NX", "details report"), "%9")2126 + QString (sSectionItemTpl ).arg (tr ("3D Acceleration", "details report"), "%10");2121 += QString (sSectionItemTpl2).arg (tr ("Video Memory", "details report"), 2122 tr ("<nobr>%4 MB</nobr>", "details report")) 2123 + QString (sSectionItemTpl2).arg (tr ("Boot Order", "details report"), "%5") 2124 + QString (sSectionItemTpl2).arg (tr ("ACPI", "details report"), "%6") 2125 + QString (sSectionItemTpl2).arg (tr ("IO APIC", "details report"), "%7") 2126 + QString (sSectionItemTpl2).arg (tr ("VT-x/AMD-V", "details report"), "%8") 2127 + QString (sSectionItemTpl2).arg (tr ("PAE/NX", "details report"), "%9") 2128 + QString (sSectionItemTpl2).arg (tr ("3D Acceleration", "details report"), "%10"); 2127 2129 2128 2130 sGeneralFullHrefTpl = QString (sSectionHrefTpl) … … 2163 2165 LONG channel = hda.GetChannel(); 2164 2166 LONG device = hda.GetDevice(); 2165 hardDisks += QString (sSectionItemTpl )2167 hardDisks += QString (sSectionItemTpl2) 2166 2168 .arg (toFullString (bus, channel, device)) 2167 2169 .arg (details (hd, aIsNewVM)); … … 2172 2174 if (hardDisks.isNull()) 2173 2175 { 2174 hardDisks = QString (sSectionItemTpl )2175 .arg (tr ("Not Attached", "details report (HDDs)")) .arg ("");2176 hardDisks = QString (sSectionItemTpl1) 2177 .arg (tr ("Not Attached", "details report (HDDs)")); 2176 2178 ++ rows; 2177 2179 } … … 2268 2270 /* DVD */ 2269 2271 CDVDDrive dvd = aMachine.GetDVDDrive(); 2270 item = QString (sSectionItemTpl);2271 2272 switch (dvd.GetState()) 2272 2273 { 2273 2274 case KDriveState_NotMounted: 2274 item = item.arg (tr ("Not mounted", "details report (DVD)"), ""); 2275 item = QString (sSectionItemTpl1) 2276 .arg (tr ("Not mounted", "details report (DVD)")); 2275 2277 break; 2276 2278 case KDriveState_ImageMounted: 2277 2279 { 2278 2280 CDVDImage2 img = dvd.GetImage(); 2279 item = item.arg (tr ("Image", "details report (DVD)"), 2280 locationForHTML (img.GetName())); 2281 item = QString (sSectionItemTpl2) 2282 .arg (tr ("Image", "details report (DVD)"), 2283 locationForHTML (img.GetName())); 2281 2284 break; 2282 2285 } … … 2289 2292 drvName : 2290 2293 QString ("%1 (%2)").arg (description, drvName); 2291 item = item.arg (tr ("Host Drive", "details report (DVD)"), 2292 fullName); 2294 item = QString (sSectionItemTpl2) 2295 .arg (tr ("Host Drive", "details report (DVD)"), 2296 fullName); 2293 2297 break; 2294 2298 } … … 2305 2309 /* Floppy */ 2306 2310 CFloppyDrive floppy = aMachine.GetFloppyDrive(); 2307 item = QString (sSectionItemTpl);2308 2311 switch (floppy.GetState()) 2309 2312 { 2310 2313 case KDriveState_NotMounted: 2311 item = item.arg (tr ("Not mounted", "details report (floppy)"), ""); 2314 item = QString (sSectionItemTpl1) 2315 .arg (tr ("Not mounted", "details report (floppy)")); 2312 2316 break; 2313 2317 case KDriveState_ImageMounted: 2314 2318 { 2315 2319 CFloppyImage2 img = floppy.GetImage(); 2316 item = item.arg (tr ("Image", "details report (floppy)"), 2317 locationForHTML (img.GetName())); 2320 item = QString (sSectionItemTpl2) 2321 .arg (tr ("Image", "details report (floppy)"), 2322 locationForHTML (img.GetName())); 2318 2323 break; 2319 2324 } … … 2326 2331 drvName : 2327 2332 QString ("%1 (%2)").arg (description, drvName); 2328 item = item.arg (tr ("Host Drive", "details report (floppy)"), 2329 fullName); 2333 item = QString (sSectionItemTpl2) 2334 .arg (tr ("Host Drive", "details report (floppy)"), 2335 fullName); 2330 2336 break; 2331 2337 } … … 2345 2351 int rows = audio.GetEnabled() ? 3 : 2; 2346 2352 if (audio.GetEnabled()) 2347 item = QString (sSectionItemTpl )2353 item = QString (sSectionItemTpl2) 2348 2354 .arg (tr ("Host Driver", "details report (audio)"), 2349 2355 toString (audio.GetAudioDriver())) + 2350 QString (sSectionItemTpl )2356 QString (sSectionItemTpl2) 2351 2357 .arg (tr ("Controller", "details report (audio)"), 2352 2358 toString (audio.GetAudioController())); 2353 2359 else 2354 item = QString (sSectionItemTpl )2355 .arg (tr ("Disabled", "details report (audio)") , "");2360 item = QString (sSectionItemTpl1) 2361 .arg (tr ("Disabled", "details report (audio)")); 2356 2362 2357 2363 detailsReport += sectionTpl … … 2387 2393 attType = attType.arg (vboxGlobal().toString (type)); 2388 2394 2389 item += QString (sSectionItemTpl )2395 item += QString (sSectionItemTpl2) 2390 2396 .arg (tr ("Adapter %1", "details report (network)") 2391 2397 .arg (adapter.GetSlot() + 1)) … … 2396 2402 if (item.isNull()) 2397 2403 { 2398 item = QString (sSectionItemTpl )2399 .arg (tr ("Disabled", "details report (network)") , "");2404 item = QString (sSectionItemTpl1) 2405 .arg (tr ("Disabled", "details report (network)")); 2400 2406 ++ rows; 2401 2407 } … … 2429 2435 data += toString (mode); 2430 2436 2431 item += QString (sSectionItemTpl )2437 item += QString (sSectionItemTpl2) 2432 2438 .arg (tr ("Port %1", "details report (serial ports)") 2433 2439 .arg (port.GetSlot() + 1)) … … 2438 2444 if (item.isNull()) 2439 2445 { 2440 item = QString (sSectionItemTpl )2441 .arg (tr ("Disabled", "details report (serial ports)") , "");2446 item = QString (sSectionItemTpl1) 2447 .arg (tr ("Disabled", "details report (serial ports)")); 2442 2448 ++ rows; 2443 2449 } … … 2465 2471 .arg (QDir::toNativeSeparators (port.GetPath())); 2466 2472 2467 item += QString (sSectionItemTpl )2473 item += QString (sSectionItemTpl2) 2468 2474 .arg (tr ("Port %1", "details report (parallel ports)") 2469 2475 .arg (port.GetSlot() + 1)) … … 2474 2480 if (item.isNull()) 2475 2481 { 2476 item = QString (sSectionItemTpl )2477 .arg (tr ("Disabled", "details report (parallel ports)") , "");2482 item = QString (sSectionItemTpl1) 2483 .arg (tr ("Disabled", "details report (parallel ports)")); 2478 2484 ++ rows; 2479 2485 } … … 2503 2509 active ++; 2504 2510 2505 item = QString (sSectionItemTpl )2511 item = QString (sSectionItemTpl2) 2506 2512 .arg (tr ("Device Filters", "details report (USB)"), 2507 2513 tr ("%1 (%2 active)", "details report (USB)") … … 2509 2515 } 2510 2516 else 2511 item = QString (sSectionItemTpl )2512 .arg (tr ("Disabled", "details report (USB)") , "");2517 item = QString (sSectionItemTpl1) 2518 .arg (tr ("Disabled", "details report (USB)")); 2513 2519 2514 2520 detailsReport += sectionTpl … … 2525 2531 if (count > 0) 2526 2532 { 2527 item = QString (sSectionItemTpl) 2528 .arg (tr ("Shared Folders", "details report (shared folders)"), 2529 tr ("%1", "details report (shadef folders)") 2530 .arg (count)); 2533 item = QString (sSectionItemTpl2) 2534 .arg (tr ("Shared Folders", "details report (shared folders)")) 2535 .arg (count); 2531 2536 } 2532 2537 else 2533 item = QString (sSectionItemTpl )2534 .arg (tr ("None", "details report (shared folders)") , "");2538 item = QString (sSectionItemTpl1) 2539 .arg (tr ("None", "details report (shared folders)")); 2535 2540 2536 2541 detailsReport += sectionTpl … … 2549 2554 2550 2555 if (srv.GetEnabled()) 2551 item = QString (sSectionItemTpl) 2552 .arg (tr ("VRDP Server Port", "details report (VRDP)"), 2553 tr ("%1", "details report (VRDP)") 2554 .arg (srv.GetPort())); 2556 item = QString (sSectionItemTpl2) 2557 .arg (tr ("VRDP Server Port", "details report (VRDP)")) 2558 .arg (srv.GetPort()); 2555 2559 else 2556 item = QString (sSectionItemTpl )2557 .arg (tr ("Disabled", "details report (VRDP)") , "");2560 item = QString (sSectionItemTpl1) 2561 .arg (tr ("Disabled", "details report (VRDP)")); 2558 2562 2559 2563 detailsReport += sectionTpl
Note:
See TracChangeset
for help on using the changeset viewer.