VirtualBox

Changeset 34806 in vbox


Ignore:
Timestamp:
Dec 7, 2010 5:11:51 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt: 5386: Extension pack GUI: ExtPack version updated with revision number. Package intallation procedure goes with message-box explaining this routine.

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

Legend:

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

    r34787 r34806  
    21422142}
    21432143
    2144 bool VBoxProblemReporter::confirmRemovingPackage(const QString &strPackName, QWidget *pParent /* = 0 */)
     2144bool VBoxProblemReporter::confirmInstallingPackage(const QString &strPackName, const QString &strPackVersion,
     2145                                                   const QString &strPackDescription, QWidget *pParent /* = 0 */)
    21452146{
    21462147    return messageOkCancel (pParent ? pParent : mainWindowShown(),
    21472148                            Question,
    2148                             tr("You are about to remove the Extension Pack <b>%1</b>. Are you sure you want to do that?").arg(strPackName),
     2149                            tr("<p>You are about to install a VirtualBox extension pack. "
     2150                               "Extension packs complement the functionality of VirtualBox and can contain system level software "
     2151                               "that could be potentially harmful to your system. Please review the description below and only proceed "
     2152                               "if you have obtained the extension pack from a trusted source.</p>"
     2153                               "<p><table cellpadding=0 cellspacing=0>"
     2154                               "<tr><td><b>Name:&nbsp;&nbsp;</b></td><td>%1</td></tr>"
     2155                               "<tr><td><b>Version:&nbsp;&nbsp;</b></td><td>%2</td></tr>"
     2156                               "<tr><td><b>Description:&nbsp;&nbsp;</b></td><td>%3</td></tr>"
     2157                               "</table></p>")
     2158                               .arg(strPackName).arg(strPackVersion).arg(strPackDescription),
     2159                            0,
     2160                            tr("&Install"));
     2161}
     2162
     2163bool VBoxProblemReporter::confirmRemovingPackage(const QString &strPackName, QWidget *pParent /* = 0 */)
     2164{
     2165    return messageOkCancel (pParent ? pParent : mainWindowShown(),
     2166                            Question,
     2167                            tr("<p>You are about to remove the VirtualBox extension pack <b>%1</b>.</p>"
     2168                               "<p>Are you sure you want to do that?</p>").arg(strPackName),
    21492169                            0,
    21502170                            tr("&Remove"));
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.h

    r34787 r34806  
    342342    void cannotInstallExtPack(const QString &strFilename, const CExtPackFile &extPackFile, QWidget *pParent = 0);
    343343    void cannotUninstallExtPack(const QString &strPackName, const CExtPackManager &extPackManager, QWidget *pParent = 0);
     344    bool confirmInstallingPackage(const QString &strPackName, const QString &strPackVersion, const QString &strPackDescription, QWidget *pParent = 0);
    344345    bool confirmRemovingPackage(const QString &strPackName, QWidget *pParent = 0);
    345346
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp

    r34787 r34806  
    5050
    5151        /* Version: */
    52         setText(2, m_data.m_strVersion);
     52        setText(2, QString("%1.%2").arg(m_data.m_strVersion).arg(m_data.m_strRevision));
    5353
    5454        /* Tool-tip: */
     
    120120    bool fInstalled = false;
    121121
    122     /*
    123      * Open the extpack tarball via IExtPackManager.
    124      */
     122    /* Open the extpack tarball via IExtPackManager: */
    125123    CExtPackManager manager = vboxGlobal().virtualBox().GetExtensionPackManager();
    126124    CExtPackFile extPackFile = manager.OpenExtPackFile(strFilePath);
     
    131129        if (extPackFile.GetUsable())
    132130        {
    133             bool fAck = true;
    134             /** @todo display big fat warning message. */
     131            bool fAck = vboxProblem().confirmInstallingPackage(extPackFile.GetName(),
     132                                                               QString("%1.%2").arg(extPackFile.GetVersion()).arg(extPackFile.GetRevision()),
     133                                                               extPackFile.GetDescription());
    135134
    136135            if (fAck)
    137136            {
    138                 /** @todo display licenses.  */
    139             }
    140 
    141             /*
    142              * Install it if everything was ACKed by the user.
    143              */
    144             if (fAck)
    145             {
     137                /* TODO: Display license! */
     138
     139                /* Install package: */
    146140                extPackFile.Install();
    147141                if (extPackFile.isOk())
     
    278272        if (doInstallation(strFilePath, this, &strExtPackName))
    279273        {
    280             /*
    281              * Insert the fresly installed extension pack, mark it as
    282              * current in the tree and sort by name (col 1).
    283              */
     274            /* Insert the fresly installed extension pack, mark it as
     275             * current in the tree and sort by name (col 1): */
    284276            CExtPackManager manager = vboxGlobal().virtualBox().GetExtensionPackManager();
    285277            const CExtPack &package = manager.Find(strExtPackName);
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