VirtualBox

Changeset 368 in vbox for trunk


Ignore:
Timestamp:
Jan 26, 2007 5:17:55 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
17933
Message:

FE/Qt: USB filters from templates: use the device name as the initial filter name.

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

Legend:

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

    r364 r368  
    19311931                                                </property>
    19321932                                                <property name="textLabel">
    1933                                                     <string>Add</string>
     1933                                                    <string>Add Empty (Ins)</string>
    19341934                                                </property>
    19351935                                                <property name="autoRaise">
     
    19371937                                                </property>
    19381938                                                <property name="whatsThis" stdset="0">
    1939                                                     <string>Adds a new USB filter.</string>
     1939                                                    <string>Adds a new USB filter with
     1940all fields initially set to empty strings. Note that such a filter will match any attached
     1941USB device.</string>
    19401942                                                </property>
    19411943                                            </widget>
     
    19511953                                                </property>
    19521954                                                <property name="accel">
    1953                                                     <string>Ins</string>
     1955                                                    <string>Alt+Ins</string>
    19541956                                                </property>
    19551957                                                <property name="iconSet">
     
    19571959                                                </property>
    19581960                                                <property name="textLabel">
    1959                                                     <string>Add existing</string>
     1961                                                    <string>Add From (Alt+Ins)</string>
    19601962                                                </property>
    19611963                                                <property name="autoRaise">
     
    19631965                                                </property>
    19641966                                                <property name="whatsThis" stdset="0">
    1965                                                     <string>Adds a new USB filter from an existing USB device.</string>
     1967                                                    <string>Adds a new USB filter
     1968with all fields set to the values of the selected USB device attached to a host PC.</string>
    19661969                                                </property>
    19671970                                            </widget>
     
    19831986                                                </property>
    19841987                                                <property name="textLabel">
    1985                                                     <string>Remove</string>
     1988                                                    <string>Remove (Del)</string>
    19861989                                                </property>
    19871990                                                <property name="autoRaise">
     
    20092012                                                </property>
    20102013                                                <property name="textLabel">
    2011                                                     <string>Up</string>
     2014                                                    <string>Move Up (Ctrl+Up)</string>
    20122015                                                </property>
    20132016                                                <property name="autoRaise">
     
    20352038                                                </property>
    20362039                                                <property name="textLabel">
    2037                                                     <string>Down</string>
     2040                                                    <string>Move Down (Ctrl+Down)</string>
    20382041                                                </property>
    20392042                                                <property name="autoRaise">
     
    26922695    <variable access="private">QPopupMenu *usbDevicesMenu;</variable>
    26932696    <variable access="private">QMap&lt;int, CUSBDevice&gt; usbDevicesMap;</variable>
    2694     <variable access="private">int mUsbDevicesMenuNoDevicesId;</variable>
     2697    <variable access="private">enum { USBDevicesMenuNoDevicesId = 1 };</variable>
    26952698</variables>
    26962699<slots>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h

    r365 r368  
    445445
    446446    /* setup iconsets -- qdesigner is not capable... */
    447     tbAddUSBFilter->setIconSet (VBoxGlobal::iconSet ("usb_add_16px.png",
    448                                                      "usb_add_disabled_16px.png"));
    449     tbAddUSBFilterFrom->setIconSet (VBoxGlobal::iconSet ("usb_read_16px.png",
    450                                                          "usb_read_16px.png"));
     447    tbAddUSBFilter->setIconSet (VBoxGlobal::iconSet ("usb_16px.png",
     448                                                     "usb_disabled_16px.png"));
     449    tbAddUSBFilterFrom->setIconSet (VBoxGlobal::iconSet ("usb_add_16px.png",
     450                                                         "usb_add_disabled_16px.png"));
    451451    tbRemoveUSBFilter->setIconSet (VBoxGlobal::iconSet ("usb_remove_16px.png",
    452452                                                        "usb_remove_disabled_16px.png"));
     
    460460    mLastUSBFilterNum = 0;
    461461    mUSBFilterListModified = false;
    462     mUsbDevicesMenuNoDevicesId = -1;
    463462
    464463    /* VRDP Page */
     
    17251724    if (isUSBEmpty)
    17261725    {
    1727         mUsbDevicesMenuNoDevicesId = usbDevicesMenu->insertItem (
    1728             tr ("<no available devices>", "USB devices"));
    1729         usbDevicesMenu->setItemEnabled (mUsbDevicesMenuNoDevicesId, false);
     1726        usbDevicesMenu->insertItem (
     1727            tr ("<no available devices>", "USB devices"),
     1728            USBDevicesMenuNoDevicesId);
     1729        usbDevicesMenu->setItemEnabled (USBDevicesMenuNoDevicesId, false);
    17301730    }
    17311731    else
    17321732    {
    1733         mUsbDevicesMenuNoDevicesId = -1;
    17341733        CHostUSBDeviceEnumerator en = host.GetUSBDevices().Enumerate();
    17351734        while (en.HasMore())
     
    17411740        }
    17421741    }
     1742
    17431743    usbDevicesMenu->exec (QCursor::pos());
    17441744}
     
    17471747{
    17481748    /* the <no available devices> item is highlighted */
    1749     if (aIndex == mUsbDevicesMenuNoDevicesId)
     1749    if (aIndex == USBDevicesMenuNoDevicesId)
    17501750    {
    17511751        QToolTip::add (usbDevicesMenu,
     
    17751775
    17761776    CUSBDeviceFilter filter = cmachine.GetUSBController()
    1777         .CreateDeviceFilter (tr ("New Filter %1", "usb")
    1778                                  .arg (++ mLastUSBFilterNum));
     1777        .CreateDeviceFilter (vboxGlobal().details (usb));
    17791778
    17801779    filter.SetVendorId (QString().sprintf ("%04hX", usb.GetVendorId()));
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