VirtualBox

Changeset 37027 in vbox for trunk


Ignore:
Timestamp:
May 10, 2011 1:12:48 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
71642
Message:

FE/Qt: 5668: Refine USB warning. That warning will now only be shown if some issue happens while accessing USB controller but the controller accessible and enabled. Also, that warning will now be using text from Main (duplicated in GUI source code for translation reasons).

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

Legend:

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

    r36558 r37027  
    626626        return;
    627627
    628 #ifdef RT_OS_LINUX
    629     /* xxx There is no macro to turn an error into a warning, but we need
    630      *     to do that here. */
    631     if (res.rc() == (VBOX_E_HOST_ERROR & ~0x80000000))
    632     {
    633         message (mainWindowShown(), VBoxProblemReporter::Warning,
    634                  tr ("Could not access USB on the host system, because "
    635                      "neither the USB file system (usbfs) nor the DBus "
    636                      "and hal services are currently available. If you "
    637                      "wish to use host USB devices inside guest systems, "
    638                      "you must correct this and restart VirtualBox."),
    639                  formatErrorInfo (res),
    640                  "cannotAccessUSB" /* aAutoConfirmId */);
    641         return;
    642     }
    643 #endif
    644628    message (mainWindowShown(), res.isWarning() ? Warning : Error,
    645629             tr ("Failed to access the USB subsystem."),
     
    29562940    connect(this, SIGNAL(sigRemindAboutUnsupportedUSB2(const QString&, QWidget*)),
    29572941            this, SLOT(sltRemindAboutUnsupportedUSB2(const QString&, QWidget*)), Qt::QueuedConnection);
     2942
     2943    /* Translations for Main.
     2944     * Please make sure they corresponds to the strings coming from Main one-by-one symbol! */
     2945    tr("Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). The service might not be installed on the host computer");
     2946    tr("VirtualBox is not currently allowed to access USB devices.  You can change this by adding your user to the 'vboxusers' group.  Please see the user manual for a more detailed explanation");
     2947    tr("VirtualBox is not currently allowed to access USB devices.  You can change this by allowing your user to access the 'usbfs' folder and files.  Please see the user manual for a more detailed explanation");
     2948    tr("The USB Proxy Service has not yet been ported to this host");
     2949    tr("Could not load the Host USB Proxy service");
    29582950}
    29592951
     
    29732965    QString formatted;
    29742966
    2975     if (!aInfo.text().isEmpty())
    2976         formatted += QString ("<p>%1.</p>").arg (vboxGlobal().emphasize (aInfo.text()));
     2967    /* Check if details text is NOT empty: */
     2968    QString strDetailsInfo = aInfo.text();
     2969    if (!strDetailsInfo.isEmpty())
     2970    {
     2971        /* Check if details text written in English (latin1) and translated: */
     2972        if (strDetailsInfo == QString::fromLatin1(strDetailsInfo.toLatin1()) &&
     2973            strDetailsInfo != tr(strDetailsInfo.toLatin1().constData()))
     2974            formatted += QString("<p>%1.</p>").arg(vboxGlobal().emphasize(tr(strDetailsInfo.toLatin1().constData())));
     2975        else
     2976            formatted += QString("<p>%1.</p>").arg(vboxGlobal().emphasize(strDetailsInfo));
     2977    }
    29772978
    29782979    formatted += "<!--EOM--><table bgcolor=#EEEEEE border=0 cellspacing=0 "
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp

    r36594 r37027  
    10221022            CUSBController controller = m_machine.GetUSBController();
    10231023            /* Show the machine error message if any: */
    1024             if (!m_machine.isReallyOk())
     1024            if (!m_machine.isReallyOk() && !controller.isNull() && controller.GetEnabled())
    10251025                vboxProblem().cannotAccessUSB(m_machine);
    10261026            /* Check if USB is implemented: */
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