Changeset 75903 in vbox
- Timestamp:
- Dec 3, 2018 1:03:37 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 127107
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc
r75762 r75903 206 206 <file alias="file_manager_log_disabled_16px.png">images/file_manager_log_disabled_16px.png</file> 207 207 <file alias="file_manager_log_disabled_32px.png">images/file_manager_log_disabled_32px.png</file> 208 <file alias="file_manager_move_to_guest_16px.png">images/file_manager_move_to_guest_16px.png</file>209 <file alias="file_manager_move_to_guest_24px.png">images/file_manager_move_to_guest_24px.png</file>210 <file alias="file_manager_move_to_guest_disabled_16px.png">images/file_manager_move_to_guest_disabled_16px.png</file>211 <file alias="file_manager_move_to_guest_disabled_24px.png">images/file_manager_move_to_guest_disabled_24px.png</file>212 <file alias="file_manager_move_to_host_16px.png">images/file_manager_move_to_host_16px.png</file>213 <file alias="file_manager_move_to_host_24px.png">images/file_manager_move_to_host_24px.png</file>214 <file alias="file_manager_move_to_host_disabled_16px.png">images/file_manager_move_to_host_disabled_16px.png</file>215 <file alias="file_manager_move_to_host_disabled_24px.png">images/file_manager_move_to_host_disabled_24px.png</file>216 208 <file alias="file_manager_new_directory_16px.png">images/file_manager_new_directory_16px.png</file> 217 209 <file alias="file_manager_new_directory_24px.png">images/file_manager_new_directory_24px.png</file> … … 384 376 <file alias="machine_warning_16px.png">images/machine_warning_16px.png</file> 385 377 <file alias="media_manager_16px.png">images/media_manager_16px.png</file> 378 <file alias="media_manager_24px.png">images/media_manager_24px.png</file> 379 <file alias="media_manager_32px.png">images/media_manager_32px.png</file> 380 <file alias="media_manager_disabled_16px.png">images/media_manager_disabled_16px.png</file> 381 <file alias="media_manager_disabled_24px.png">images/media_manager_disabled_24px.png</file> 386 382 </qresource> 387 383 </RCC> -
trunk/src/VBox/Frontends/VirtualBox/VirtualBox1_x2.qrc
r75762 r75903 206 206 <file alias="file_manager_log_disabled_16px_x2.png">images/x2/file_manager_log_disabled_16px_x2.png</file> 207 207 <file alias="file_manager_log_disabled_32px_x2.png">images/x2/file_manager_log_disabled_32px_x2.png</file> 208 <file alias="file_manager_move_to_guest_16px_x2.png">images/x2/file_manager_move_to_guest_16px_x2.png</file>209 <file alias="file_manager_move_to_guest_24px_x2.png">images/x2/file_manager_move_to_guest_24px_x2.png</file>210 <file alias="file_manager_move_to_guest_disabled_16px_x2.png">images/x2/file_manager_move_to_guest_disabled_16px_x2.png</file>211 <file alias="file_manager_move_to_guest_disabled_24px_x2.png">images/x2/file_manager_move_to_guest_disabled_24px_x2.png</file>212 <file alias="file_manager_move_to_host_16px_x2.png">images/x2/file_manager_move_to_host_16px_x2.png</file>213 <file alias="file_manager_move_to_host_24px_x2.png">images/x2/file_manager_move_to_host_24px_x2.png</file>214 <file alias="file_manager_move_to_host_disabled_16px_x2.png">images/x2/file_manager_move_to_host_disabled_16px_x2.png</file>215 <file alias="file_manager_move_to_host_disabled_24px_x2.png">images/x2/file_manager_move_to_host_disabled_24px_x2.png</file>216 208 <file alias="file_manager_new_directory_16px_x2.png">images/x2/file_manager_new_directory_16px_x2.png</file> 217 209 <file alias="file_manager_new_directory_24px_x2.png">images/x2/file_manager_new_directory_24px_x2.png</file> … … 378 370 <file alias="machine_details_manager_disabled_16px_x2.png">images/x2/machine_details_manager_disabled_16px_x2.png</file> 379 371 <file alias="machine_details_manager_disabled_24px_x2.png">images/x2/machine_details_manager_disabled_24px_x2.png</file> 372 <file alias="machine_warning_16px_x2.png">images/x2/machine_warning_16px_x2.png</file> 373 <file alias="media_manager_16px_x2.png">images/x2/media_manager_16px_x2.png</file> 374 <file alias="media_manager_24px_x2.png">images/x2/media_manager_24px_x2.png</file> 375 <file alias="media_manager_32px_x2.png">images/x2/media_manager_32px_x2.png</file> 380 376 </qresource> 381 377 </RCC> -
trunk/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc
r75309 r75903 1 1 <RCC> 2 2 <qresource suffix="/"> 3 <file alias="media_manager_24px.png">images/media_manager_24px.png</file>4 <file alias="media_manager_32px.png">images/media_manager_32px.png</file>5 <file alias="media_manager_disabled_16px.png">images/media_manager_disabled_16px.png</file>6 <file alias="media_manager_disabled_24px.png">images/media_manager_disabled_24px.png</file>7 3 <file alias="meditation_32px.png">images/meditation_32px.png</file> 8 4 <file alias="menubar_16px.png">images/menubar_16px.png</file> -
trunk/src/VBox/Frontends/VirtualBox/VirtualBox2_x2.qrc
r75310 r75903 1 1 <RCC> 2 2 <qresource suffix="/"> 3 <file alias="machine_warning_16px_x2.png">images/x2/machine_warning_16px_x2.png</file>4 <file alias="media_manager_16px_x2.png">images/x2/media_manager_16px_x2.png</file>5 <file alias="media_manager_24px_x2.png">images/x2/media_manager_24px_x2.png</file>6 <file alias="media_manager_32px_x2.png">images/x2/media_manager_32px_x2.png</file>7 3 <file alias="media_manager_disabled_16px_x2.png">images/x2/media_manager_disabled_16px_x2.png</file> 8 4 <file alias="media_manager_disabled_24px_x2.png">images/x2/media_manager_disabled_24px_x2.png</file> -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r75762 r75903 1607 1607 }; 1608 1608 1609 /** Simple action extension, used as 'Move to Guest' in guest control file manager action class. */1610 class UIActionMenuGuestControlFileManagerMoveToGuest : public UIActionSimple1611 {1612 Q_OBJECT;1613 1614 public:1615 1616 /** Constructs action passing @a pParent to the base-class. */1617 UIActionMenuGuestControlFileManagerMoveToGuest(UIActionPool *pParent)1618 : UIActionSimple(pParent,1619 ":/file_manager_move_to_guest_24px.png", ":/file_manager_move_to_guest_16px.png",1620 ":/file_manager_move_to_guest_disabled_24px.png", ":/file_manager_move_to_guest_disabled_16px.png"){}1621 1622 protected:1623 1624 /** Returns shortcut extra-data ID. */1625 virtual QString shortcutExtraDataID() const /* override */1626 {1627 return QString("FileManagerMoveToGuest");1628 }1629 1630 /** Returns default shortcut. */1631 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */1632 {1633 return QKeySequence();1634 }1635 1636 /** Handles translation event. */1637 virtual void retranslateUi() /* override */1638 {1639 setName(QApplication::translate("UIActionPool", "Move to guest"));1640 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager"));1641 setToolTip(QApplication::translate("UIActionPool", "Move the Selected Object(s) from Host to Guest"));1642 setStatusTip(QApplication::translate("UIActionPool", "Move the selected object(s) from host to guest"));1643 }1644 };1645 1646 /** Simple action extension, used as 'Move to Host' in guest control file manager action class. */1647 class UIActionMenuGuestControlFileManagerMoveToHost : public UIActionSimple1648 {1649 Q_OBJECT;1650 1651 public:1652 1653 /** Constructs action passing @a pParent to the base-class. */1654 UIActionMenuGuestControlFileManagerMoveToHost(UIActionPool *pParent)1655 : UIActionSimple(pParent,1656 ":/file_manager_move_to_host_24px.png", ":/file_manager_move_to_host_16px.png",1657 ":/file_manager_move_to_host_disabled_24px.png", ":/file_manager_move_to_host_disabled_16px.png"){}1658 1659 protected:1660 1661 /** Returns shortcut extra-data ID. */1662 virtual QString shortcutExtraDataID() const /* override */1663 {1664 return QString("FileManagerMoveToHost");1665 }1666 1667 /** Returns default shortcut. */1668 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */1669 {1670 return QKeySequence();1671 }1672 1673 /** Handles translation event. */1674 virtual void retranslateUi() /* override */1675 {1676 setName(QApplication::translate("UIActionPool", "Move to host"));1677 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager"));1678 setToolTip(QApplication::translate("UIActionPool", "Move the Selected Object(s) from Guest to Host"));1679 setStatusTip(QApplication::translate("UIActionPool", "Move the selected object(s) from guest to host"));1680 }1681 };1682 1683 1609 /** Toggle action extension, used to toggle 'File Manager Options' panel in guest control file manager. */ 1684 1610 class UIActionMenuGuestControlFileManagerOptions : public UIActionToggle … … 2510 2436 m_pool[UIActionIndex_M_GuestControlFileManager_S_CopyToGuest] = new UIActionMenuGuestControlFileManagerCopyToGuest(this); 2511 2437 m_pool[UIActionIndex_M_GuestControlFileManager_S_CopyToHost] = new UIActionMenuGuestControlFileManagerCopyToHost(this); 2512 m_pool[UIActionIndex_M_GuestControlFileManager_S_MoveToGuest] = new UIActionMenuGuestControlFileManagerMoveToGuest(this);2513 m_pool[UIActionIndex_M_GuestControlFileManager_S_MoveToHost] = new UIActionMenuGuestControlFileManagerMoveToHost(this);2514 2438 2515 2439 m_pool[UIActionIndex_M_GuestControlFileManager_T_Options] = new UIActionMenuGuestControlFileManagerOptions(this); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r75762 r75903 104 104 UIActionIndex_M_GuestControlFileManager_S_CopyToGuest, 105 105 UIActionIndex_M_GuestControlFileManager_S_CopyToHost, 106 UIActionIndex_M_GuestControlFileManager_S_MoveToGuest,107 UIActionIndex_M_GuestControlFileManager_S_MoveToHost,108 106 UIActionIndex_M_GuestControlFileManager_T_Options, 109 107 UIActionIndex_M_GuestControlFileManager_T_Log, -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManager.cpp
r75897 r75903 255 255 connect(m_pGuestFileTable, &UIGuestFileTable::sigNewFileOperation, 256 256 this, &UIGuestControlFileManager::sltReceieveNewFileOperation); 257 connect(m_pGuestFileTable, &UIGuestFileTable::sigCacheHostFileObjectsForDeletion,258 this, &UIGuestControlFileManager::sltCacheHostFileObjectsForDeletion);259 257 connect(m_pGuestFileTable, &UIGuestFileTable::sigDeleteConfirmationOptionChanged, 260 258 this, &UIGuestControlFileManager::sltHandleOptionsUpdated); … … 336 334 m_pVerticalToolBar->addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_CopyToHost)); 337 335 m_pVerticalToolBar->addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_CopyToGuest)); 338 m_pVerticalToolBar->addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_MoveToHost));339 m_pVerticalToolBar->addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_MoveToGuest));340 336 m_pVerticalToolBar->addWidget(bottomSpacerWidget); 341 337 … … 345 341 this, &UIGuestControlFileManager::sltCopyHostToGuest); 346 342 347 connect(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_MoveToHost), &QAction::triggered,348 this, &UIGuestControlFileManager::sltMoveGuestToHost);349 connect(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_MoveToGuest), &QAction::triggered,350 this, &UIGuestControlFileManager::sltMoveHostToGuest);351 343 layout ->addWidget(m_pVerticalToolBar); 352 344 } … … 495 487 void UIGuestControlFileManager::sltCopyGuestToHost() 496 488 { 497 copy MoveToHost(false);489 copyToHost(); 498 490 } 499 491 500 492 void UIGuestControlFileManager::sltCopyHostToGuest() 501 493 { 502 copyMoveToGuest(false); 503 } 504 505 void UIGuestControlFileManager::sltMoveGuestToHost() 506 { 507 copyMoveToHost(true); 508 } 509 510 void UIGuestControlFileManager::sltMoveHostToGuest() 511 { 512 copyMoveToGuest(true); 494 copyToGuest(); 513 495 } 514 496 … … 550 532 void UIGuestControlFileManager::sltFileOperationComplete(QUuid progressId) 551 533 { 534 Q_UNUSED(progressId); 552 535 if (!m_pGuestFileTable || !m_pHostFileTable) 553 536 return; 554 555 /* The following call deletes file objects whose paths have been cached for later deletion: */556 m_pGuestFileTable->continueWithMove(progressId);557 m_pHostFileTable->continueWithMove(progressId);558 537 559 538 m_pHostFileTable->refresh(); … … 561 540 } 562 541 563 void UIGuestControlFileManager::sltCacheHostFileObjectsForDeletion(const QUuid &moveProgessId,564 const QStringList &hostPathList)565 {566 if (m_pHostFileTable)567 m_pHostFileTable->updateDeleteAfterCopyCache(moveProgessId, hostPathList);568 }569 570 542 void UIGuestControlFileManager::sltHandleOptionsUpdated() 571 543 { … … 576 548 } 577 549 578 void UIGuestControlFileManager::copy MoveToHost(bool fIsMove)550 void UIGuestControlFileManager::copyToHost() 579 551 { 580 552 if (!m_pGuestFileTable || !m_pHostFileTable) 581 553 return; 582 554 QString hostDestinationPath = m_pHostFileTable->currentDirectoryPath(); 583 m_pGuestFileTable->copyGuestToHost(hostDestinationPath , fIsMove);555 m_pGuestFileTable->copyGuestToHost(hostDestinationPath); 584 556 m_pHostFileTable->refresh(); 585 557 } 586 558 587 void UIGuestControlFileManager::copy MoveToGuest(bool fIsMove)559 void UIGuestControlFileManager::copyToGuest() 588 560 { 589 561 if (!m_pGuestFileTable || !m_pHostFileTable) 590 562 return; 591 563 QStringList hostSourcePathList = m_pHostFileTable->selectedItemPathList(); 592 m_pGuestFileTable->copyHostToGuest(hostSourcePathList , fIsMove);564 m_pGuestFileTable->copyHostToGuest(hostSourcePathList); 593 565 m_pGuestFileTable->refresh(); 594 566 } … … 834 806 sources << "/home/serkan/misos/xenialpup-7.5-uefi.iso"; 835 807 if ( m_pGuestFileTable) 836 m_pGuestFileTable->copyHostToGuest(sources, false,"/home/vbox/test");808 m_pGuestFileTable->copyHostToGuest(sources, "/home/vbox/test"); 837 809 } 838 810 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManager.h
r75897 r75903 115 115 void sltCopyGuestToHost(); 116 116 void sltCopyHostToGuest(); 117 void sltMoveGuestToHost();118 void sltMoveHostToGuest();119 117 void sltPanelActionToggled(bool fChecked); 120 118 void sltListDirectoriesBeforeChanged(); 121 119 void sltReceieveNewFileOperation(const CProgress &comProgress); 122 120 void sltFileOperationComplete(QUuid progressId); 123 void sltCacheHostFileObjectsForDeletion(const QUuid &moveProgessId, const QStringList &hostPathList);124 121 /** Performs whatever necessary when some signal about option change has been receieved. */ 125 122 void sltHandleOptionsUpdated(); … … 168 165 - assigned it to the most recently "unhidden" panel */ 169 166 void manageEscapeShortCut(); 170 void copy MoveToGuest(bool fIsMove);171 void copy MoveToHost(bool fIsMove);167 void copyToGuest(); 168 void copyToHost(); 172 169 template<typename T> 173 170 QStringList getFsObjInfoStringList(const T &fsObjectInfo) const; -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.cpp
r75818 r75903 1472 1472 } 1473 1473 1474 void UIGuestControlFileTable::continueWithMove(const QUuid &progressId)1475 {1476 deleteByPath(m_deleteAfterCopyCache.value(progressId, QStringList()));1477 }1478 1479 1474 void UIGuestControlFileTable::sltReceiveDirectoryStatistics(UIDirectoryStatistics statistics) 1480 1475 { -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.h
r75760 r75903 263 263 static const unsigned m_iKiloByte; 264 264 static QString humanReadableSize(ULONG64 size); 265 /** Deletes the file objects whose stored in the m_pDeleteAfterCopyCache */266 void continueWithMove(const QUuid &progressId);267 265 268 266 public slots: … … 353 351 /** The set of actions which need some selection to work on. Like cut, copy etc. */ 354 352 QSet<QAction*> m_selectionDependentActions; 355 /** Paths of the source file objects are stored in this map to delete those356 * after the copy progress completed notification is receieved */357 QMap<QUuid, QStringList> m_deleteAfterCopyCache;358 353 /** The absolue path list of the file objects which user has chosen to cut/copy. this 359 354 * list will be cleaned after a paste operation or overwritten by a subsequent cut/copy. -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.cpp
r75897 r75903 330 330 } 331 331 332 void UIGuestFileTable::copyHostToGuest(const QStringList &hostSourcePathList, bool fDeleteAfterSuccessfulCopy /* = false */,332 void UIGuestFileTable::copyHostToGuest(const QStringList &hostSourcePathList, 333 333 const QString &strDestination /* = QString() */) 334 334 { … … 357 357 return; 358 358 emit sigNewFileOperation(progress); 359 /* Cache the progress id and host source file objects' path in case of move operation. we will delete 360 * these when/if we receieve progress completed notification: */ 361 if (fDeleteAfterSuccessfulCopy) 362 emit sigCacheHostFileObjectsForDeletion(progress.GetId(), sourcePaths.toList()); 363 } 364 365 void UIGuestFileTable::copyGuestToHost(const QString& hostDestinationPath, bool fDeleteAfterSuccessfulCopy /* = false */) 359 } 360 361 void UIGuestFileTable::copyGuestToHost(const QString& hostDestinationPath) 366 362 { 367 363 if (!checkGuestSession()) … … 386 382 return; 387 383 emit sigNewFileOperation(progress); 388 /* Cache the progress id and source file objects' path in case of move operation. we will delete389 * these when/if we receieve progress completed notification: */390 if (fDeleteAfterSuccessfulCopy)391 m_deleteAfterCopyCache[progress.GetId()] = sourcePaths.toList();392 384 } 393 385 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.h
r75897 r75903 42 42 UIGuestFileTable(UIActionPool *pActionPool, QWidget *pParent = 0); 43 43 void initGuestFileTable(const CGuestSession &session); 44 void copyGuestToHost(const QString& hostDestinationPath , bool fDeleteAfterSuccessfulCopy = false);45 void copyHostToGuest(const QStringList &hostSourcePathList, bool fDeleteAfterSuccessfulCopy = false,44 void copyGuestToHost(const QString& hostDestinationPath); 45 void copyHostToGuest(const QStringList &hostSourcePathList, 46 46 const QString &strDestination = QString()); 47 47 … … 49 49 50 50 void sigNewFileOperation(const CProgress &comProgress); 51 void sigCacheHostFileObjectsForDeletion(const QUuid &moveProgessId, const QStringList &hostPathList);52 51 53 52 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.cpp
r75686 r75903 133 133 prepareActionConnections(); 134 134 retranslateUi(); 135 }136 137 void UIHostFileTable::updateDeleteAfterCopyCache(const QUuid &progressId, const QStringList &sourceObjectsList)138 {139 m_deleteAfterCopyCache[progressId] = sourceObjectsList;140 135 } 141 136 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.h
r75760 r75903 34 34 35 35 UIHostFileTable(UIActionPool *pActionPool, QWidget *pParent = 0); 36 void updateDeleteAfterCopyCache(const QUuid &progressId, const QStringList &sourceObjectsList);37 36 38 37 protected:
Note:
See TracChangeset
for help on using the changeset viewer.