Changeset 72344 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 25, 2018 1:27:42 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 edited
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc
r71370 r72344 30 30 <file alias="cd_16px.png">images/cd_16px.png</file> 31 31 <file alias="cd_add_16px.png">images/cd_add_16px.png</file> 32 <file alias="cd_add_22px.png">images/cd_add_22px.png</file> 32 33 <file alias="cd_add_disabled_16px.png">images/cd_add_disabled_16px.png</file> 34 <file alias="cd_add_disabled_22px.png">images/cd_add_disabled_22px.png</file> 33 35 <file alias="cd_copy_16px.png">images/cd_copy_16px.png</file> 34 36 <file alias="cd_copy_22px.png">images/cd_copy_22px.png</file> … … 123 125 <file alias="fd_16px.png">images/fd_16px.png</file> 124 126 <file alias="fd_add_16px.png">images/fd_add_16px.png</file> 127 <file alias="fd_add_22px.png">images/fd_add_22px.png</file> 125 128 <file alias="fd_add_disabled_16px.png">images/fd_add_disabled_16px.png</file> 129 <file alias="fd_add_disabled_22px.png">images/fd_add_disabled_22px.png</file> 126 130 <file alias="fd_copy_16px.png">images/fd_copy_16px.png</file> 127 131 <file alias="fd_copy_22px.png">images/fd_copy_22px.png</file> … … 166 170 <file alias="hd_32px.png">images/hd_32px.png</file> 167 171 <file alias="hd_add_16px.png">images/hd_add_16px.png</file> 172 <file alias="hd_add_22px.png">images/hd_add_22px.png</file> 168 173 <file alias="hd_add_disabled_16px.png">images/hd_add_disabled_16px.png</file> 174 <file alias="hd_add_disabled_22px.png">images/hd_add_disabled_22px.png</file> 169 175 <file alias="hd_copy_16px.png">images/hd_copy_16px.png</file> 170 176 <file alias="hd_copy_22px.png">images/hd_copy_22px.png</file> … … 318 324 <file alias="os_mandriva.png">images/os_mandriva.png</file> 319 325 <file alias="os_netbsd_64.png">images/os_netbsd_64.png</file> 320 <file alias="os_netbsd.png">images/os_netbsd.png</file>321 <file alias="os_netware.png">images/os_netware.png</file>322 326 </qresource> 323 327 </RCC> -
trunk/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc
r72342 r72344 1 1 <RCC> 2 2 <qresource suffix="/"> 3 <file alias="os_netbsd.png">images/os_netbsd.png</file> 4 <file alias="os_netware.png">images/os_netware.png</file> 3 5 <file alias="os_openbsd_64.png">images/os_openbsd_64.png</file> 4 6 <file alias="os_openbsd.png">images/os_openbsd.png</file> … … 259 261 <file alias="vm_discard_disabled_16px.png">images/vm_discard_disabled_16px.png</file> 260 262 <file alias="vm_discard_disabled_32px.png">images/vm_discard_disabled_32px.png</file> 263 <file alias="vm_execution_engine_native_api_16px.png">images/vm_execution_engine_native_api_16px.png</file> 261 264 <file alias="vm_group_create_16px.png">images/vm_group_create_16px.png</file> 262 265 <file alias="vm_group_create_disabled_16px.png">images/vm_group_create_disabled_16px.png</file> … … 316 319 <file alias="vtx_amdv_16px.png">images/vtx_amdv_16px.png</file> 317 320 <file alias="vtx_amdv_disabled_16px.png">images/vtx_amdv_disabled_16px.png</file> 318 <file alias="vm_execution_engine_native_api_16px.png">images/vm_execution_engine_native_api_16px.png</file>319 321 <file alias="web_camera_16px.png">images/web_camera_16px.png</file> 320 322 <file alias="web_camera_disabled_16px.png">images/web_camera_disabled_16px.png</file> -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r71455 r72344 49 49 # include "COMEnums.h" 50 50 # include "CMachine.h" 51 # include "CMediumAttachment.h" 51 52 # include "CMediumFormat.h" 52 53 # include "CStorageController.h" 53 # include "C MediumAttachment.h"54 # include "CSystemProperties.h" 54 55 55 56 # ifdef VBOX_WS_MAC … … 825 826 , m_pContextMenu(0) 826 827 , m_pMenu(0) 827 , m_pAction Copy(0), m_pActionMove(0), m_pActionRemove(0)828 , m_pActionAdd(0), m_pActionCopy(0), m_pActionMove(0), m_pActionRemove(0) 828 829 , m_pActionRelease(0), m_pActionDetails(0) 829 830 , m_pActionRefresh(0) … … 850 851 851 852 /* Translate actions: */ 853 if (m_pActionAdd) 854 { 855 m_pActionAdd->setText(UIMediumManager::tr("&Add...")); 856 m_pActionAdd->setToolTip(UIMediumManager::tr("Add Disk Image File (%1)")); 857 m_pActionAdd->setStatusTip(UIMediumManager::tr("Add disk image file")); 858 } 852 859 if (m_pActionCopy) 853 860 { … … 1199 1206 } 1200 1207 1208 void UIMediumManagerWidget::sltAddMedium() 1209 { 1210 QString strDefaultMachineFolder = vboxGlobal().virtualBox().GetSystemProperties().GetDefaultMachineFolder(); 1211 vboxGlobal().openMediumWithFileOpenDialog(currentMediumType(), this, strDefaultMachineFolder); 1212 } 1213 1201 1214 void UIMediumManagerWidget::sltCopyMedium() 1202 1215 { … … 1398 1411 void UIMediumManagerWidget::prepareActions() 1399 1412 { 1413 /* Create 'Add' action: */ 1414 m_pActionAdd = new QAction(this); 1415 AssertPtrReturnVoid(m_pActionAdd); 1416 { 1417 /* Configure add-action: */ 1418 m_pActionAdd->setShortcut(QKeySequence("Ctrl+A")); 1419 connect(m_pActionAdd, &QAction::triggered, this, &UIMediumManagerWidget::sltAddMedium); 1420 } 1400 1421 /* Create 'Copy' action: */ 1401 1422 m_pActionCopy = new QAction(this); … … 1469 1490 { 1470 1491 /* Configure 'Medium' menu: */ 1492 if (m_pActionAdd) 1493 m_pMenu->addAction(m_pActionAdd); 1471 1494 if (m_pActionCopy) 1472 1495 m_pMenu->addAction(m_pActionCopy); … … 1497 1520 { 1498 1521 /* Configure contex-menu: */ 1522 if (m_pActionAdd) 1523 m_pContextMenu->addAction(m_pActionAdd); 1499 1524 if (m_pActionCopy) 1500 1525 m_pContextMenu->addAction(m_pActionCopy); … … 1547 1572 m_pToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 1548 1573 /* Add toolbar actions: */ 1574 if (m_pActionAdd) 1575 m_pToolBar->addAction(m_pActionAdd); 1549 1576 if (m_pActionCopy) 1550 1577 m_pToolBar->addAction(m_pActionCopy); … … 1827 1854 } 1828 1855 } 1856 1857 if (m_pActionAdd) 1858 m_pActionAdd->setIcon(UIIconPool::iconSetFull(QString(":/%1_add_22px.png").arg(strPrefix), 1859 QString(":/%1_add_16px.png").arg(strPrefix), 1860 QString(":/%1_add_disabled_22px.png").arg(strPrefix), 1861 QString(":/%1_add_disabled_16px.png").arg(strPrefix))); 1862 1829 1863 if (m_pActionCopy) 1830 1864 m_pActionCopy->setIcon(UIIconPool::iconSetFull(QString(":/%1_copy_22px.png").arg(strPrefix), -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.h
r71027 r72344 161 161 /** @name Menu/action stuff. 162 162 * @{ */ 163 /** Handles command to add medium. */ 164 void sltAddMedium(); 163 165 /** Handles command to copy medium. */ 164 166 void sltCopyMedium(); … … 344 346 /** Holds the menu object instance. */ 345 347 QMenu *m_pMenu; 348 /** Holds the Add action instance. */ 349 QAction *m_pActionAdd; 346 350 /** Holds the Copy action instance. */ 347 351 QAction *m_pActionCopy; … … 438 442 439 443 #endif /* !___UIMediumManager_h___ */ 440
Note:
See TracChangeset
for help on using the changeset viewer.