VirtualBox

Ignore:
Timestamp:
Dec 9, 2022 11:51:14 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154837
Message:

DnD/VBoxTray: Made the Enter desktop notification (verbose mode only) a bit better to read.

File:
1 edited

Legend:

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

    r97764 r97770  
    5555
    5656#include <VBox/err.h>
     57#include <VBox/version.h>
    5758
    5859
     
    6566/** @todo Merge this with messages from VBoxTray.h. */
    6667#define WM_VBOXTRAY_DND_MESSAGE       WM_APP + 401
     68
     69/** The notification header text for hlpShowBalloonTip(). */
     70#define VBOX_DND_SHOWBALLOON_HEADER   VBOX_PRODUCT " Drag'n Drop"
    6771
    6872
     
    840844        return rc;
    841845
    842     if (g_cVerbosity)
    843     {
    844         RTCString strMsg("Enter: Host -> Guest\n\n");
    845         strMsg += RTCStringFmt("Allowed actions: %#x\n", a_fDndLstActionsAllowed);
    846         strMsg += "Formats:\n";
    847         for (size_t i = 0; i < this->m_lstFmtSup.size(); i++)
    848         {
    849             if (i > 0)
    850                 strMsg += "\n";
    851             strMsg += this->m_lstFmtSup.at(i);
    852         }
    853 
    854         hlpShowBalloonTip(g_hInstance, g_hwndToolWindow, ID_TRAYICON,
    855                           strMsg.c_str(), "VirtualBox Drag'n Drop",
    856                           15 * 1000 /* Time to display in msec */, NIIF_INFO);
    857     }
    858 
    859846    /* Save all allowed actions. */
    860847    this->m_lstActionsAllowed = a_fDndLstActionsAllowed;
     
    924911    }
    925912
     913    if (g_cVerbosity)
     914    {
     915        RTCString strMsg("Enter: Host -> Guest\n");
     916        strMsg += RTCStringFmt("Allowed actions: ");
     917        char *pszActions = DnDActionListToStrA(a_fDndLstActionsAllowed);
     918        AssertPtrReturn(pszActions, VERR_NO_STR_MEMORY);
     919        strMsg += pszActions;
     920        RTStrFree(pszActions);
     921        strMsg += "\nFormats: ";
     922        for (size_t i = 0; i < this->m_lstFmtActive.size(); i++)
     923        {
     924            if (i > 0)
     925                strMsg += ", ";
     926            strMsg += this->m_lstFmtActive[i];
     927        }
     928
     929        hlpShowBalloonTip(g_hInstance, g_hwndToolWindow, ID_TRAYICON,
     930                          strMsg.c_str(), VBOX_DND_SHOWBALLOON_HEADER,
     931                          15 * 1000 /* Time to display in msec */, NIIF_INFO);
     932    }
     933
    926934    /*
    927935     * Warn in the log if this guest does not accept anything.
     
    10451053    if (g_cVerbosity)
    10461054        hlpShowBalloonTip(g_hInstance, g_hwndToolWindow, ID_TRAYICON,
    1047                           "Leave: Host -> Guest", "VirtualBox Drag'n Drop",
     1055                          "Leave: Host -> Guest", VBOX_DND_SHOWBALLOON_HEADER,
    10481056                          15 * 1000 /* Time to display in msec */, NIIF_INFO);
    10491057
     
    10721080        if (g_cVerbosity)
    10731081            hlpShowBalloonTip(g_hInstance, g_hwndToolWindow, ID_TRAYICON,
    1074                               "Drop: Host -> Guest", "VirtualBox Drag'n Drop",
     1082                              "Drop: Host -> Guest", VBOX_DND_SHOWBALLOON_HEADER,
    10751083                              15 * 1000 /* Time to display in msec */, NIIF_INFO);
    10761084
     
    13741382
    13751383            hlpShowBalloonTip(g_hInstance, g_hwndToolWindow, ID_TRAYICON,
    1376                               strMsg.c_str(), "VirtualBox Drag'n Drop",
     1384                              strMsg.c_str(), VBOX_DND_SHOWBALLOON_HEADER,
    13771385                              15 * 1000 /* Time to display in msec */, NIIF_INFO);
    13781386        }
     
    19121920        hlpShowBalloonTip(g_hInstance, g_hwndToolWindow, ID_TRAYICON,
    19131921                          RTCStringFmt("Running (worker client ID %RU32)", pCtx->cmdCtx.uClientID).c_str(),
    1914                           "VirtualBox Drag'n Drop",
     1922                          VBOX_DND_SHOWBALLOON_HEADER,
    19151923                          15 * 1000 /* Time to display in msec */, NIIF_INFO);
    19161924
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