VirtualBox

Changeset 42261 in vbox for trunk/src/VBox/Main/xml


Ignore:
Timestamp:
Jul 20, 2012 1:27:47 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
79316
Message:

enabled shared clipboard support for Linux hosts (guest=>host only)

Location:
trunk/src/VBox/Main/xml
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/Settings.cpp

    r42179 r42261  
    16151615          chipsetType(ChipsetType_PIIX3),
    16161616          fEmulatedUSBCardReader(false),
    1617           clipboardMode(ClipboardMode_Bidirectional),
     1617          clipboardMode(ClipboardMode_Disabled),
     1618          dragAndDropMode(DragAndDropMode_Disabled),
    16181619          ulMemoryBalloonSize(0),
    16191620          fPageFusionEnabled(false)
     
    16871688                  && (llSharedFolders           == h.llSharedFolders)
    16881689                  && (clipboardMode             == h.clipboardMode)
     1690                  && (dragAndDropMode           == h.dragAndDropMode)
    16891691                  && (ulMemoryBalloonSize       == h.ulMemoryBalloonSize)
    16901692                  && (fPageFusionEnabled        == h.fPageFusionEnabled)
     
    27622764                else
    27632765                    throw ConfigFileError(this, pelmHwChild, N_("Invalid value '%s' in Clipboard/@mode attribute"), strTemp.c_str());
     2766            }
     2767        }
     2768        else if (pelmHwChild->nameEquals("DragAndDrop"))
     2769        {
     2770            Utf8Str strTemp;
     2771            if (pelmHwChild->getAttributeValue("mode", strTemp))
     2772            {
     2773                if (strTemp == "Disabled")
     2774                    hw.dragAndDropMode = DragAndDropMode_Disabled;
     2775                else if (strTemp == "HostToGuest")
     2776                    hw.dragAndDropMode = DragAndDropMode_HostToGuest;
     2777                else if (strTemp == "GuestToHost")
     2778                    hw.dragAndDropMode = DragAndDropMode_GuestToHost;
     2779                else if (strTemp == "Bidirectional")
     2780                    hw.dragAndDropMode = DragAndDropMode_Bidirectional;
     2781                else
     2782                    throw ConfigFileError(this, pelmHwChild, N_("Invalid value '%s' in DragAndDrop/@mode attribute"), strTemp.c_str());
    27642783            }
    27652784        }
     
    40664085    switch (hw.clipboardMode)
    40674086    {
    4068         case ClipboardMode_Disabled: pcszClip = "Disabled"; break;
     4087        default: /*case ClipboardMode_Disabled:*/ pcszClip = "Disabled"; break;
    40694088        case ClipboardMode_HostToGuest: pcszClip = "HostToGuest"; break;
    40704089        case ClipboardMode_GuestToHost: pcszClip = "GuestToHost"; break;
    4071         default: /*case ClipboardMode_Bidirectional:*/ pcszClip = "Bidirectional"; break;
     4090        case ClipboardMode_Bidirectional: pcszClip = "Bidirectional"; break;
    40724091    }
    40734092    pelmClip->setAttribute("mode", pcszClip);
     4093
     4094    xml::ElementNode *pelmDragAndDrop = pelmHardware->createChild("DragAndDrop");
     4095    const char *pcszDragAndDrop;
     4096    switch (hw.dragAndDropMode)
     4097    {
     4098        default: /*case DragAndDropMode_Disabled:*/ pcszDragAndDrop = "Disabled"; break;
     4099        case DragAndDropMode_HostToGuest: pcszDragAndDrop = "HostToGuest"; break;
     4100        case DragAndDropMode_GuestToHost: pcszDragAndDrop = "GuestToHost"; break;
     4101        case DragAndDropMode_Bidirectional: pcszDragAndDrop = "Bidirectional"; break;
     4102    }
     4103    pelmDragAndDrop->setAttribute("mode", pcszDragAndDrop);
    40744104
    40754105    if (m->sv >= SettingsVersion_v1_10)
  • trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd

    r40652 r42261  
    77 *  Common definitions
    88
    9      Copyright (C) 2004-2011 Oracle Corporation
     9     Copyright (C) 2004-2012 Oracle Corporation
    1010
    1111     This file is part of VirtualBox Open Source Edition (OSE), as
     
    172172
    173173<xsd:simpleType name="TClipboardMode">
     174  <xsd:restriction base="xsd:string">
     175    <xsd:enumeration value="Disabled"/>
     176    <xsd:enumeration value="HostToGuest"/>
     177    <xsd:enumeration value="GuestToHost"/>
     178    <xsd:enumeration value="Bidirectional"/>
     179  </xsd:restriction>
     180</xsd:simpleType>
     181
     182<xsd:simpleType name="TDragAndDropMode">
    174183  <xsd:restriction base="xsd:string">
    175184    <xsd:enumeration value="Disabled"/>
     
    793802</xsd:complexType>
    794803
     804<xsd:complexType name="TDragAndDrop">
     805  <xsd:attribute name="mode" type="TDragAndDropMode" use="required"/>
     806</xsd:complexType>
     807
    795808<xsd:complexType name="TGuest">
    796809  <xsd:attribute name="memoryBalloonSize"        type="xsd:unsignedInt" default="0"/>
     
    865878    </xsd:element>
    866879    <xsd:element name="Clipboard" type="TClipboard"/>
     880    <xsd:element name="DragAndDrop" type="TDragAndDrop"/>
    867881    <xsd:element name="Guest" type="TGuest"/>
    868882    <xsd:element name="GuestProperties" type="TGuestProperties" minOccurs="0">
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