Changeset 8490 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 30, 2008 7:15:52 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMInformationDlg.ui.h
r8155 r8490 105 105 // QString::null); 106 106 107 /* applying language settings */108 languageChangeImp();109 110 107 /* show statistics page and make it focused */ 111 108 connect (mInfoStack, SIGNAL (currentChanged (QWidget*)), … … 174 171 void VBoxVMInformationDlg::languageChangeImp() 175 172 { 173 AssertReturnVoid (!mSession.isNull()); 174 175 CMachine machine = mSession.GetMachine(); 176 AssertReturnVoid (!machine.isNull()); 177 176 178 /* Setup a dialog caption. */ 177 if (!mSession.isNull() && !mSession.GetMachine().isNull()) 178 setCaption (tr ("%1 - Session Information") 179 .arg (mSession.GetMachine().GetName())); 179 setCaption (tr ("%1 - Session Information").arg (machine.GetName())); 180 180 181 181 /* Setup a tabwidget page names. */ … … 208 208 mNamesMap ["/Devices/ATA1/Unit1/WrittenBytes"] = tr ("Data Written"); 209 209 210 mNamesMap ["/Devices/PCNet0/TransmitBytes"] = tr ("Data Transmitted"); 211 mNamesMap ["/Devices/PCNet0/ReceiveBytes"] = tr ("Data Received"); 212 213 mNamesMap ["/Devices/PCNet1/TransmitBytes"] = tr ("Data Transmitted"); 214 mNamesMap ["/Devices/PCNet1/ReceiveBytes"] = tr ("Data Received"); 215 216 mNamesMap ["/Devices/PCNet2/TransmitBytes"] = tr ("Data Transmitted"); 217 mNamesMap ["/Devices/PCNet2/ReceiveBytes"] = tr ("Data Received"); 218 219 mNamesMap ["/Devices/PCNet3/TransmitBytes"] = tr ("Data Transmitted"); 220 mNamesMap ["/Devices/PCNet3/ReceiveBytes"] = tr ("Data Received"); 210 for (int i = 0; i < 4; i++) 211 { 212 CNetworkAdapter na = machine.GetNetworkAdapter (i); 213 KNetworkAdapterType ty = na.GetAdapterType(); 214 const char *name; 215 216 switch (ty) 217 { 218 case KNetworkAdapterType_I82540EM: 219 name = "E1k"; 220 break; 221 default: 222 name = "PCNet"; 223 break; 224 } 225 mNamesMap [QString("/Devices/%1%2/TransmitBytes") 226 .arg(name) .arg(i)] = tr ("Data Transmitted"); 227 mNamesMap [QString("/Devices/%1%2/ReceiveBytes") 228 .arg(name) .arg(i)] = tr ("Data Received"); 229 } 221 230 222 231 /* Statistics page update. */ … … 282 291 case QEvent::LanguageChange: 283 292 { 284 languageChangeImp(); 293 if (!mSession.isNull()) 294 languageChangeImp(); 285 295 break; 286 296 }
Note:
See TracChangeset
for help on using the changeset viewer.