Changeset 3045 in vbox
- Timestamp:
- Jun 5, 2007 10:41:33 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 21818
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h
r2981 r3045 133 133 SessionStateChangeEventType, 134 134 SnapshotEventType, 135 USBDeviceStateChangeEventType, 135 136 RuntimeErrorEventType, 136 137 ModifierKeyChangeEventType, -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r2981 r3045 189 189 190 190 void cannotAttachUSBDevice (const CConsole &console, const QString &device); 191 void cannotAttachUSBDevice (const CConsole &console, const QString &device, 192 const CVirtualBoxErrorInfo &error); 191 193 void cannotDetachUSBDevice (const CConsole &console, const QString &device); 194 void cannotDetachUSBDevice (const CConsole &console, const QString &device, 195 const CVirtualBoxErrorInfo &error); 192 196 193 197 void cannotCreateSharedFolder (QWidget *, const CMachine &, -
trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ru.ts
r3017 r3045 77 77 <message> 78 78 <source>Left Shift</source> 79 <translation type="unfinished"></translation>79 <translation>Левый Shift</translation> 80 80 </message> 81 81 <message> 82 82 <source>Right Shift</source> 83 <translation type="unfinished"></translation>83 <translation>Правый Shift</translation> 84 84 </message> 85 85 <message> 86 86 <source>Left Ctrl</source> 87 <translation type="unfinished"></translation>87 <translation>Левый Ctrl</translation> 88 88 </message> 89 89 <message> 90 90 <source>Right Ctrl</source> 91 <translation type="unfinished"></translation>91 <translation>Правый Ctrl</translation> 92 92 </message> 93 93 <message> 94 94 <source>Left Alt</source> 95 <translation type="unfinished"></translation>95 <translation>Левый Alt</translation> 96 96 </message> 97 97 <message> 98 98 <source>Right Alt</source> 99 <translation type="unfinished"></translation>99 <translation>Правый Alt</translation> 100 100 </message> 101 101 <message> 102 102 <source>Left WinKey</source> 103 <translation type="unfinished"></translation>103 <translation>Левая Win-клавиша</translation> 104 104 </message> 105 105 <message> 106 106 <source>Right WinKey</source> 107 <translation type="unfinished"></translation>107 <translation>Правая Win-клавиша</translation> 108 108 </message> 109 109 <message> 110 110 <source>Menu key</source> 111 <translation type="unfinished"></translation>111 <translation>Клавиша Menu</translation> 112 112 </message> 113 113 <message> 114 114 <source>Alt Gr</source> 115 <translation type="unfinished"></translation>115 <translation>Alt Gr</translation> 116 116 </message> 117 117 <message> 118 118 <source>Caps Lock</source> 119 <translation type="unfinished"></translation>119 <translation>Caps Lock</translation> 120 120 </message> 121 121 <message> 122 122 <source>Scroll Lock</source> 123 <translation type="unfinished"></translation>123 <translation>Scroll Lock</translation> 124 124 </message> 125 125 <message> 126 126 <source><key_%1></source> 127 <translation type="unfinished"></translation>127 <translation><клавиша_%1></translation> 128 128 </message> 129 129 </context> … … 961 961 <message> 962 962 <source>CD/DVD-ROM images (*.iso);;All files (*)</source> 963 <translation type="unfinished"></translation>963 <translation>Образы CD/DVD-ROM (*.iso);;Все файлы (*)</translation> 964 964 </message> 965 965 <message> 966 966 <source>Floppy images (*.img);;All files (*)</source> 967 <translation type="unfinished"></translation>967 <translation>Образы дискет (*.img);;Все файлы (*)</translation> 968 968 </message> 969 969 </context> … … 2421 2421 <message> 2422 2422 <source><p>VirtualBox Guest Additions installed in the Guest OS are too old: the installed version is %1, the expected version is %2. Some features that require Guest Additions (mouse integration, guest display auto-resize) will most likely stop working properly.</p><p>Please update Guest Additions to the current version by choosing <b>Install Guest Additions</b> from the <b>Devices</b> menu.</p></source> 2423 <translation type="unfinished"> </translation>2423 <translation type="unfinished"><p>В гостевой ОС обнаружен слишком старый пакет Дополнений гостевой ОС: установлена версия %1, ожидается версия %2. Некоторые возможности, требующие Дополнений гостевой ОС (интеграция мыши, авто-размер экрана гостевой ОС), скорее всего, перестанут функционировать.</p><p>Пожалуйста, обновите Дополнения гостевой ОС до текущей версии, выбрав пункт <b>Установить Дополнения гостевой ОС</b> в меню <b>Устройства</b>.</p></translation> 2424 2424 </message> 2425 2425 <message> 2426 2426 <source><p>VirtualBox Guest Additions installed in the Guest OS are outdated: the installed version is %1, the expected version is %2. Some features that require Guest Additions (mouse integration, guest display auto-resize) may not work as expected.</p><p>It is recommended to update Guest Additions to the current version by choosing <b>Install Guest Additions</b> from the <b>Devices</b> menu.</p></source> 2427 <translation type="unfinished"> </translation>2427 <translation type="unfinished"><p>В гостевой ОС обнаружен устаревший пакет Дополнений гостевой ОС: установлена версия %1, ожидается версия %2. Некоторые возможности, требующие Дополнений гостевой ОС (интеграция мыши, авто-размер экрана гостевой ОС) могут перестать функционировать.</p><p>Рекомендуется обновить Дополнения гостевой ОС до текущей версии, выбрав пункт <b>Установить Дополнения гостевой ОС</b> в меню <b>Устройства</b>.</p></translation> 2428 2428 </message> 2429 2429 <message> 2430 2430 <source><p>VirtualBox Guest Additions installed in the Guest OS are too recent for this version of VirtualBox: the installed version is %1, the expected version is %2.</p><p>Using a newer version of Additions with an older version of VirtualBox is not supported. Please install the current version of Guest Additions by choosing <b>Install Guest Additions</b> from the <b>Devices</b> menu.</p></source> 2431 <translation type="unfinished"> </translation>2431 <translation type="unfinished"><p>В гостевой ОС обнаружен слишком новый пакет Дополнений гостевой ОС: установлена версия %1, ожидается версия %2.</p><p>Использованее более новой версии Дополнений с более старой версией VirtualBox не поддерживается. Пожалуйста, установите подходящую версию Дополнений гостевой ОС, выбрав пункт <b>Установить Дополнения гостевой ОС</b> в меню <b>Устройства</b>.</p></translation> 2432 2432 </message> 2433 2433 </context> … … 2660 2660 <message> 2661 2661 <source>Show &Log...</source> 2662 <translation type="unfinished"> </translation>2662 <translation type="unfinished">Показать &лог...</translation> 2663 2663 </message> 2664 2664 <message> 2665 2665 <source>Show Log...</source> 2666 <translation type="unfinished"> </translation>2666 <translation type="unfinished">Показать лог...</translation> 2667 2667 </message> 2668 2668 <message> … … 2672 2672 <message> 2673 2673 <source>Show the log files of the selected virtual machine</source> 2674 <translation type="unfinished"> </translation>2674 <translation type="unfinished">Показать лог-файлы выбранной виртуальной машины</translation> 2675 2675 </message> 2676 2676 </context> -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r3001 r3045 278 278 { 279 279 public: 280 ModifierKeyChangeEvent (bool fNumLock, bool fCapsLock, bool fScrollLock) :280 ModifierKeyChangeEvent (bool fNumLock, bool fCapsLock, bool fScrollLock) : 281 281 QEvent ((QEvent::Type) VBoxDefs::ModifierKeyChangeEventType), 282 282 mfNumLock (fNumLock), mfCapsLock (fCapsLock), mfScrollLock (fScrollLock) {} … … 286 286 private: 287 287 bool mfNumLock, mfCapsLock, mfScrollLock; 288 }; 289 290 /** USB device state change event */ 291 class USBDeviceStateChangeEvent : public QEvent 292 { 293 public: 294 USBDeviceStateChangeEvent (const CUSBDevice &aDevice, bool aAttached, 295 const CVirtualBoxErrorInfo &aError) : 296 QEvent ((QEvent::Type) VBoxDefs::USBDeviceStateChangeEventType), 297 mDevice (aDevice), mAttached (aAttached), mError (aError) {} 298 CUSBDevice device() const { return mDevice; } 299 bool attached() const { return mAttached; } 300 CVirtualBoxErrorInfo error() const { return mError; } 301 private: 302 CUSBDevice mDevice; 303 bool mAttached; 304 CVirtualBoxErrorInfo mError; 288 305 }; 289 306 … … 389 406 IVirtualBoxErrorInfo *error) 390 407 { 391 Q_UNUSED (device); 392 Q_UNUSED (attached); 393 Q_UNUSED (error); 394 395 /// @todo update menu entries 396 408 QApplication::postEvent (mView, 409 new USBDeviceStateChangeEvent ( 410 CUSBDevice (device), 411 bool (attached), 412 CVirtualBoxErrorInfo (error))); 397 413 return S_OK; 398 414 } … … 992 1008 if (!destroyed && mainwnd->statusBar()) 993 1009 mainwnd->statusBar()->clear(); 1010 1011 return true; 1012 } 1013 1014 case VBoxDefs::USBDeviceStateChangeEventType: 1015 { 1016 USBDeviceStateChangeEvent *ue = (USBDeviceStateChangeEvent *)e; 1017 1018 if (ue->attached()) 1019 vboxProblem().cannotAttachUSBDevice ( 1020 cconsole, 1021 vboxGlobal().details (ue->device()), ue->error()); 1022 else 1023 vboxProblem().cannotDetachUSBDevice ( 1024 cconsole, 1025 vboxGlobal().details (ue->device()), ue->error()); 1026 1027 /// @todo update menu entries 994 1028 995 1029 return true; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
r2981 r3045 1152 1152 } 1153 1153 1154 void VBoxProblemReporter::cannotAttachUSBDevice (const CConsole &console, 1155 const QString &device, 1156 const CVirtualBoxErrorInfo &error) 1157 { 1158 message (&vboxGlobal().consoleWnd(), Error, 1159 tr ("Failed to attach the USB device <b>%1</b> " 1160 "to the virtual machine <b>%2</b>.") 1161 .arg (device) 1162 .arg (console.GetMachine().GetName()), 1163 formatErrorInfo (error)); 1164 } 1165 1154 1166 void VBoxProblemReporter::cannotDetachUSBDevice (const CConsole &console, 1155 1167 const QString &device) … … 1164 1176 .arg (console.GetMachine().GetName()), 1165 1177 formatErrorInfo (res)); 1178 } 1179 1180 void VBoxProblemReporter::cannotDetachUSBDevice (const CConsole &console, 1181 const QString &device, 1182 const CVirtualBoxErrorInfo &error) 1183 { 1184 message (&vboxGlobal().consoleWnd(), Error, 1185 tr ("Failed to detach the USB device <b>%1</b> " 1186 "from the virtual machine <b>%2</b>.") 1187 .arg (device) 1188 .arg (console.GetMachine().GetName()), 1189 formatErrorInfo (error)); 1166 1190 } 1167 1191 -
trunk/src/VBox/Main/ConsoleImpl.cpp
r3037 r3045 3200 3200 3201 3201 /* VM might have been stopped when this message arrives */ 3202 if (mMachineState < MachineState_Running) 3202 if (mMachineState < MachineState_Running || 3203 mMachineState == MachineState_Stopping) 3203 3204 { 3204 3205 LogFlowThisFunc (("Attach request ignored (mMachineState=%d).\n", … … 3209 3210 if (aError != NULL) 3210 3211 { 3211 /* notify callback about anerror */3212 /* notify callbacks about the error */ 3212 3213 onUSBDeviceStateChange (aDevice, true /* aAttached */, aError); 3213 3214 return S_OK; … … 3233 3234 HRESULT rc = attachUSBDevice (aDevice, pRhConfig); 3234 3235 3235 /// @todo notify listeners of IConsoleCallback in case of error 3236 if (FAILED (rc)) 3237 { 3238 /* take the current error info */ 3239 com::ErrorInfoKeeper eik; 3240 /* the error must be a VirtualBoxErrorInfo instance */ 3241 ComPtr <IVirtualBoxErrorInfo> error = eik.takeError(); 3242 Assert (!error.isNull()); 3243 if (!error.isNull()) 3244 { 3245 /* notify callbacks about the error */ 3246 onUSBDeviceStateChange (aDevice, true /* aAttached */, error); 3247 } 3248 } 3249 3236 3250 return rc; 3237 3251 } … … 3292 3306 HRESULT rc = detachUSBDevice (it); 3293 3307 3294 /// @todo notify listeners of IConsoleCallback in case of error 3308 if (FAILED (rc)) 3309 { 3310 /* take the current error info */ 3311 com::ErrorInfoKeeper eik; 3312 /* the error must be a VirtualBoxErrorInfo instance */ 3313 ComPtr <IVirtualBoxErrorInfo> error = eik.takeError(); 3314 Assert (!error.isNull()); 3315 if (!error.isNull()) 3316 { 3317 /* notify callbacks about the error */ 3318 onUSBDeviceStateChange (device, false /* aAttached */, error); 3319 } 3320 } 3321 3295 3322 return rc; 3296 3323 }
Note:
See TracChangeset
for help on using the changeset viewer.