VirtualBox

Changeset 6372 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jan 17, 2008 5:51:53 PM (17 years ago)
Author:
vboxsync
Message:

1905: Add GUI support for internal network name:

Network setup error enumeration (int->enum).

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMNetworkSettings.ui

    r6364 r6372  
    672672</includes>
    673673<variables>
     674    <variable access="public">enum CheckPageResult { NoErrors, IncorrectInterface, MissedNetworkName };</variable>
    674675    <variable access="private">CNetworkAdapter cadapter;</variable>
    675676    <variable access="private">QIWidgetValidator *mWalidator;</variable>
     
    684685<functions>
    685686    <function access="private" specifier="non virtual">init()</function>
    686     <function returnType="int">checkPage( const QStringList &amp; )</function>
     687    <function returnType="CheckPageResult">checkPage( const QStringList &amp; )</function>
    687688    <function>loadInterfaceList( const QStringList &amp;, const QString &amp; )</function>
    688689    <function>loadNetworksList( const QStringList &amp; )</function>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMNetworkSettings.ui.h

    r6364 r6372  
    7676}
    7777
    78 int VBoxVMNetworkSettings::checkPage (const QStringList &aList)
     78VBoxVMNetworkSettings::CheckPageResult VBoxVMNetworkSettings::checkPage (const QStringList &aList)
    7979{
    8080    CEnums::NetworkAttachmentType type =
     
    8383    if (type == CEnums::HostInterfaceNetworkAttachment &&
    8484        isInterfaceInvalid (aList, cbHostInterfaceName->currentText()))
    85         return 1;
     85        return IncorrectInterface;
    8686    else if (type == CEnums::InternalNetworkAttachment &&
    8787             cbInternalNetworkName_WIN->currentText().isEmpty())
    88         return 2;
     88        return MissedNetworkName;
    8989    else
    90         return 0;
     90        return NoErrors;
    9191#else
    9292    NOREF (aList);
    9393    if (type == CEnums::InternalNetworkAttachment &&
    9494        cbInternalNetworkName_X11->currentText().isEmpty())
    95         return 2;
     95        return MissedNetworkName;
    9696    else
    97         return 0;
     97        return NoErrors;
    9898#endif
    9999}
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h

    r6368 r6372  
    15301530        {
    15311531            Assert (tab);
    1532             warningText = error == 1 ?
    1533                 tr ("Incorrect host network interface is selected") : error == 2 ?
     1532            warningText = error == VBoxVMNetworkSettings::IncorrectInterface ?
     1533                tr ("Incorrect host network interface is selected") :
     1534                error == VBoxVMNetworkSettings::MissedNetworkName ?
    15341535                tr ("Internal network name is not set") : QString::null;
    15351536            pageTitle += ": " + tbwNetwork->tabLabel (tab);
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