VirtualBox

Changeset 63577 in vbox


Ignore:
Timestamp:
Aug 17, 2016 12:12:37 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8090: UIMessageCenter: UIUpdateManager: Implementing dialog to propose to delete the downloaded extension-packs automatically.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r63567 r63577  
    22482248                          0 /* auto-confirm id */,
    22492249                          tr("Install", "extension pack"));
     2250}
     2251
     2252bool UIMessageCenter::proposeDeleteExtentionPack(const QString &strTo) const
     2253{
     2254    return questionBinary(windowManager().networkManagerOrMainWindowShown(), MessageType_Question,
     2255                          tr("Do you want to delete the downloaded file <nobr><b>%1</b>.</nobr></p>")
     2256                             .arg(strTo),
     2257                          0 /* auto-confirm id */,
     2258                          tr("Delete", "extension pack"));
    22502259}
    22512260#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r62493 r63577  
    338338    void cannotSaveExtensionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const;
    339339    bool proposeInstallExtentionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const;
     340    bool proposeDeleteExtentionPack(const QString &strTo) const;
    340341#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
    341342
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp

    r62493 r63577  
    418418        if (msgCenter().proposeInstallExtentionPack(GUI_ExtPackName, strSource, QDir::toNativeSeparators(strTarget)))
    419419            UIGlobalSettingsExtension::doInstallation(strTarget, strDigest, windowManager().networkManagerOrMainWindowShown(), NULL);
     420        /* Propose to delete the downloaded extension pack: */
     421        if (msgCenter().proposeDeleteExtentionPack(QDir::toNativeSeparators(strTarget)))
     422            QFile::remove(QDir::toNativeSeparators(strTarget));
    420423    }
    421424};
Note: See TracChangeset for help on using the changeset viewer.

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