VirtualBox

Changeset 75903 in vbox


Ignore:
Timestamp:
Dec 3, 2018 1:03:37 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
127107
Message:

FE/Qt: bugref:6699. Removing move actions. RIP

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc

    r75762 r75903  
    206206        <file alias="file_manager_log_disabled_16px.png">images/file_manager_log_disabled_16px.png</file>
    207207        <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>
    216208        <file alias="file_manager_new_directory_16px.png">images/file_manager_new_directory_16px.png</file>
    217209        <file alias="file_manager_new_directory_24px.png">images/file_manager_new_directory_24px.png</file>
     
    384376        <file alias="machine_warning_16px.png">images/machine_warning_16px.png</file>
    385377        <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>
    386382    </qresource>
    387383</RCC>
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox1_x2.qrc

    r75762 r75903  
    206206        <file alias="file_manager_log_disabled_16px_x2.png">images/x2/file_manager_log_disabled_16px_x2.png</file>
    207207        <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>
    216208        <file alias="file_manager_new_directory_16px_x2.png">images/x2/file_manager_new_directory_16px_x2.png</file>
    217209        <file alias="file_manager_new_directory_24px_x2.png">images/x2/file_manager_new_directory_24px_x2.png</file>
     
    378370        <file alias="machine_details_manager_disabled_16px_x2.png">images/x2/machine_details_manager_disabled_16px_x2.png</file>
    379371        <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>
    380376    </qresource>
    381377</RCC>
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc

    r75309 r75903  
    11<RCC>
    22    <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>
    73        <file alias="meditation_32px.png">images/meditation_32px.png</file>
    84        <file alias="menubar_16px.png">images/menubar_16px.png</file>
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox2_x2.qrc

    r75310 r75903  
    11<RCC>
    22    <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>
    73        <file alias="media_manager_disabled_16px_x2.png">images/x2/media_manager_disabled_16px_x2.png</file>
    84        <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  
    16071607};
    16081608
    1609 /** Simple action extension, used as 'Move to Guest' in guest control file manager action class. */
    1610 class UIActionMenuGuestControlFileManagerMoveToGuest : public UIActionSimple
    1611 {
    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 UIActionSimple
    1648 {
    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 
    16831609/** Toggle action extension, used to toggle 'File Manager Options' panel in guest control file manager. */
    16841610class UIActionMenuGuestControlFileManagerOptions : public UIActionToggle
     
    25102436    m_pool[UIActionIndex_M_GuestControlFileManager_S_CopyToGuest] = new  UIActionMenuGuestControlFileManagerCopyToGuest(this);
    25112437    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);
    25142438
    25152439    m_pool[UIActionIndex_M_GuestControlFileManager_T_Options] = new UIActionMenuGuestControlFileManagerOptions(this);
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h

    r75762 r75903  
    104104    UIActionIndex_M_GuestControlFileManager_S_CopyToGuest,
    105105    UIActionIndex_M_GuestControlFileManager_S_CopyToHost,
    106     UIActionIndex_M_GuestControlFileManager_S_MoveToGuest,
    107     UIActionIndex_M_GuestControlFileManager_S_MoveToHost,
    108106    UIActionIndex_M_GuestControlFileManager_T_Options,
    109107    UIActionIndex_M_GuestControlFileManager_T_Log,
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManager.cpp

    r75897 r75903  
    255255            connect(m_pGuestFileTable, &UIGuestFileTable::sigNewFileOperation,
    256256                    this, &UIGuestControlFileManager::sltReceieveNewFileOperation);
    257             connect(m_pGuestFileTable, &UIGuestFileTable::sigCacheHostFileObjectsForDeletion,
    258                     this, &UIGuestControlFileManager::sltCacheHostFileObjectsForDeletion);
    259257            connect(m_pGuestFileTable, &UIGuestFileTable::sigDeleteConfirmationOptionChanged,
    260258                    this, &UIGuestControlFileManager::sltHandleOptionsUpdated);
     
    336334    m_pVerticalToolBar->addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_CopyToHost));
    337335    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));
    340336    m_pVerticalToolBar->addWidget(bottomSpacerWidget);
    341337
     
    345341             this, &UIGuestControlFileManager::sltCopyHostToGuest);
    346342
    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);
    351343    layout ->addWidget(m_pVerticalToolBar);
    352344}
     
    495487void UIGuestControlFileManager::sltCopyGuestToHost()
    496488{
    497     copyMoveToHost(false);
     489    copyToHost();
    498490}
    499491
    500492void UIGuestControlFileManager::sltCopyHostToGuest()
    501493{
    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();
    513495}
    514496
     
    550532void UIGuestControlFileManager::sltFileOperationComplete(QUuid progressId)
    551533{
     534    Q_UNUSED(progressId);
    552535    if (!m_pGuestFileTable || !m_pHostFileTable)
    553536        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);
    558537
    559538    m_pHostFileTable->refresh();
     
    561540}
    562541
    563 void UIGuestControlFileManager::sltCacheHostFileObjectsForDeletion(const QUuid &moveProgessId,
    564                                                                    const QStringList &hostPathList)
    565 {
    566     if (m_pHostFileTable)
    567         m_pHostFileTable->updateDeleteAfterCopyCache(moveProgessId, hostPathList);
    568 }
    569 
    570542void UIGuestControlFileManager::sltHandleOptionsUpdated()
    571543{
     
    576548}
    577549
    578 void UIGuestControlFileManager::copyMoveToHost(bool fIsMove)
     550void UIGuestControlFileManager::copyToHost()
    579551{
    580552    if (!m_pGuestFileTable || !m_pHostFileTable)
    581553        return;
    582554    QString hostDestinationPath = m_pHostFileTable->currentDirectoryPath();
    583     m_pGuestFileTable->copyGuestToHost(hostDestinationPath, fIsMove);
     555    m_pGuestFileTable->copyGuestToHost(hostDestinationPath);
    584556    m_pHostFileTable->refresh();
    585557}
    586558
    587 void UIGuestControlFileManager::copyMoveToGuest(bool fIsMove)
     559void UIGuestControlFileManager::copyToGuest()
    588560{
    589561    if (!m_pGuestFileTable || !m_pHostFileTable)
    590562        return;
    591563    QStringList hostSourcePathList = m_pHostFileTable->selectedItemPathList();
    592     m_pGuestFileTable->copyHostToGuest(hostSourcePathList, fIsMove);
     564    m_pGuestFileTable->copyHostToGuest(hostSourcePathList);
    593565    m_pGuestFileTable->refresh();
    594566}
     
    834806    sources << "/home/serkan/misos/xenialpup-7.5-uefi.iso";
    835807    if ( m_pGuestFileTable)
    836         m_pGuestFileTable->copyHostToGuest(sources, false, "/home/vbox/test");
     808        m_pGuestFileTable->copyHostToGuest(sources, "/home/vbox/test");
    837809}
    838810
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManager.h

    r75897 r75903  
    115115    void sltCopyGuestToHost();
    116116    void sltCopyHostToGuest();
    117     void sltMoveGuestToHost();
    118     void sltMoveHostToGuest();
    119117    void sltPanelActionToggled(bool fChecked);
    120118    void sltListDirectoriesBeforeChanged();
    121119    void sltReceieveNewFileOperation(const CProgress &comProgress);
    122120    void sltFileOperationComplete(QUuid progressId);
    123     void sltCacheHostFileObjectsForDeletion(const QUuid &moveProgessId, const QStringList &hostPathList);
    124121    /** Performs whatever necessary when some signal about option change has been receieved. */
    125122    void sltHandleOptionsUpdated();
     
    168165        - assigned it to the most recently "unhidden" panel */
    169166    void manageEscapeShortCut();
    170     void copyMoveToGuest(bool fIsMove);
    171     void copyMoveToHost(bool fIsMove);
     167    void copyToGuest();
     168    void copyToHost();
    172169    template<typename T>
    173170    QStringList               getFsObjInfoStringList(const T &fsObjectInfo) const;
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.cpp

    r75818 r75903  
    14721472}
    14731473
    1474 void UIGuestControlFileTable::continueWithMove(const QUuid &progressId)
    1475 {
    1476     deleteByPath(m_deleteAfterCopyCache.value(progressId, QStringList()));
    1477 }
    1478 
    14791474void UIGuestControlFileTable::sltReceiveDirectoryStatistics(UIDirectoryStatistics statistics)
    14801475{
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.h

    r75760 r75903  
    263263    static const unsigned    m_iKiloByte;
    264264    static QString humanReadableSize(ULONG64 size);
    265     /** Deletes the file objects whose stored in the m_pDeleteAfterCopyCache */
    266     void continueWithMove(const QUuid &progressId);
    267265
    268266public slots:
     
    353351    /** The set of actions which need some selection to work on. Like cut, copy etc. */
    354352    QSet<QAction*>           m_selectionDependentActions;
    355     /** Paths of the source file objects are stored in this map to delete those
    356      * after the copy progress completed notification is receieved */
    357     QMap<QUuid, QStringList> m_deleteAfterCopyCache;
    358353    /** The absolue path list of the file objects which user has chosen to cut/copy. this
    359354     *  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  
    330330}
    331331
    332 void UIGuestFileTable::copyHostToGuest(const QStringList &hostSourcePathList, bool fDeleteAfterSuccessfulCopy /* = false */,
     332void UIGuestFileTable::copyHostToGuest(const QStringList &hostSourcePathList,
    333333                                        const QString &strDestination /* = QString() */)
    334334{
     
    357357        return;
    358358    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
     361void UIGuestFileTable::copyGuestToHost(const QString& hostDestinationPath)
    366362{
    367363    if (!checkGuestSession())
     
    386382        return;
    387383    emit sigNewFileOperation(progress);
    388     /* Cache the progress id and source file objects' path in case of move operation. we will delete
    389      * these when/if we receieve progress completed notification: */
    390     if (fDeleteAfterSuccessfulCopy)
    391         m_deleteAfterCopyCache[progress.GetId()] = sourcePaths.toList();
    392384}
    393385
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.h

    r75897 r75903  
    4242    UIGuestFileTable(UIActionPool *pActionPool, QWidget *pParent = 0);
    4343    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,
    4646                         const QString &strDestination = QString());
    4747
     
    4949
    5050    void sigNewFileOperation(const CProgress &comProgress);
    51     void sigCacheHostFileObjectsForDeletion(const QUuid &moveProgessId, const QStringList &hostPathList);
    5251
    5352protected:
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.cpp

    r75686 r75903  
    133133    prepareActionConnections();
    134134    retranslateUi();
    135 }
    136 
    137 void UIHostFileTable::updateDeleteAfterCopyCache(const QUuid &progressId, const QStringList &sourceObjectsList)
    138 {
    139     m_deleteAfterCopyCache[progressId] = sourceObjectsList;
    140135}
    141136
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.h

    r75760 r75903  
    3434
    3535    UIHostFileTable(UIActionPool *pActionPool, QWidget *pParent = 0);
    36     void updateDeleteAfterCopyCache(const QUuid &progressId, const QStringList &sourceObjectsList);
    3736
    3837protected:
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette