VirtualBox

Ignore:
Timestamp:
Jun 5, 2014 2:38:31 PM (11 years ago)
Author:
vboxsync
Message:

DnD: Added support for dynamically managing formats on the host.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp

    r51529 r51556  
    7575{
    7676    RT_ZERO(startupInfo);
     77
     78    const RTCString arrEntries[] = { VBOX_DND_FORMATS_DEFAULT };
     79    for (size_t i = 0; i < RT_ELEMENTS(arrEntries); i++)
     80        this->lstAllowedFormats.append(arrEntries[i]);
    7781}
    7882
     
    667671
    668672    /*
    669      * Install our allowed MIME types.
    670      ** @todo Also see GuestDnDPrivate.cpp.
     673     * Check if requested formats are compatible with this client.
    671674     */
    672     const RTCList<RTCString> lstAllowedMimeTypes = RTCList<RTCString>()
    673         /* URI's */
    674         << "text/uri-list"
    675         /* Text */
    676         << "text/plain;charset=utf-8"
    677         << "UTF8_STRING"
    678         << "text/plain"
    679         << "TEXT"
    680         << "STRING"
    681         /* OpenOffice formats */
    682         << "application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source (XML)\""
    683         << "application/x-openoffice-drawing;windows_formatname=\"Drawing Format\"";
    684     this->lstAllowedFormats = lstAllowedMimeTypes;
    685 
    686     /*
    687      * Check MIME compatibility with this client.
    688      */
    689     LogFlowThisFunc(("Supported MIME types:\n"));
     675    LogFlowThisFunc(("Supported formats:\n"));
    690676    for (size_t i = 0; i < lstFormats.size(); i++)
    691677    {
    692         bool fSupported = lstAllowedFormats.contains(lstFormats.at(i));
     678        bool fSupported = this->lstAllowedFormats.contains(lstFormats.at(i));
    693679        if (fSupported)
    694680            this->lstFormats.append(lstFormats.at(i));
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