Changeset 55422 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 24, 2015 1:52:33 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 99765
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r55305 r55422 5 5 6 6 /* 7 * Copyright (C) 2006-201 4Oracle Corporation7 * Copyright (C) 2006-2015 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 73 73 # ifdef VBOX_WITH_DRAG_AND_DROP 74 74 # include "CGuest.h" 75 # include "CDnDTarget.h" 75 76 # endif /* VBOX_WITH_DRAG_AND_DROP */ 76 77 … … 2394 2395 { 2395 2396 error(pParent, MessageType_Error, 2396 tr(" Failed to drop data."),2397 tr("Drag and drop operation failed."), 2397 2398 formatErrorInfo(guest)); 2398 2399 } … … 2401 2402 { 2402 2403 error(pParent, MessageType_Error, 2403 tr("Failed to dropdata."),2404 tr("Failed while dropping data."), 2404 2405 formatErrorInfo(progress)); 2406 } 2407 2408 void UIMessageCenter::cannotCancelDrop(const CDnDTarget &dndTarget, QWidget *pParent /* = 0*/) const 2409 { 2410 error(pParent, MessageType_Error, 2411 tr("Unable to cancel drag and drop operation."), 2412 formatErrorInfo(dndTarget)); 2405 2413 } 2406 2414 #endif /* VBOX_WITH_DRAG_AND_DROP */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r55401 r55422 351 351 void cannotDropData(const CGuest &guest, QWidget *pParent = 0) const; 352 352 void cannotDropData(const CProgress &progress, QWidget *pParent = 0) const; 353 void cannotCancelDrop(const CDnDTarget &dndTarget, QWidget *pParent = 0) const; 353 354 #endif /* VBOX_WITH_DRAG_AND_DROP */ 354 355 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp
r52730 r55422 5 5 6 6 /* 7 * Copyright (C) 2011-201 4Oracle Corporation7 * Copyright (C) 2011-2015 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 43 43 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 44 44 45 #undef LOG_GROUP 45 #ifdef LOG_GROUP 46 #undef LOG_GROUP 47 #endif 46 48 #define LOG_GROUP LOG_GROUP_GUEST_DND 47 49 #include <VBox/log.h> 48 49 50 50 51 … … 127 128 && !format.isEmpty()) 128 129 { 129 /* Convert the actual MIME data to a vector (needed 130 * for the COM wrapper). */ 130 /* Convert the actual MIME data to a vector (needed for the COM wrapper). */ 131 131 QVector<uint8_t> dv(d.size()); 132 132 memcpy(dv.data(), d.constData(), d.size()); 133 133 134 134 CProgress progress = dndTarget.SendData(screenId, format, dv); 135 if (guest.isOk()) 135 136 if (progress.isOk()) 136 137 { 138 LogFlowFunc(("Transferring data to guest ...\n")); 139 137 140 msgCenter().showModalProgressDialog(progress, 138 141 tr("Dropping data ..."), ":/progress_dnd_hg_90px.png", 139 142 pParent); 140 if ( !progress.GetCanceled() 143 144 LogFlowFunc(("Transfer fCompleted=%RTbool, fCanceled=%RTbool, hr=%Rhrc\n", 145 progress.GetCompleted(), progress.GetCanceled(), progress.GetResultCode())); 146 147 BOOL fCanceled = progress.GetCanceled(); 148 149 /* Some error occurred? */ 150 if ( !fCanceled 141 151 && ( !progress.isOk() 142 152 || progress.GetResultCode() != 0)) … … 145 155 result = KDnDAction_Ignore; 146 156 } 157 #if 0 158 else if (fCanceled) /* Operation canceled by user? */ 159 { 160 Assert(progress.isOk()); 161 Assert(progress.GetResultCode() == 0); 162 163 /* Tell the guest. */ 164 BOOL fVeto = dndTarget.Cancel(); 165 if (fVeto) /* Cancelling vetoed by the target? Tell the user why. */ 166 msgCenter().cannotCancelDrop(dndTarget, pParent); 167 } 168 #endif 147 169 } 148 170 else
Note:
See TracChangeset
for help on using the changeset viewer.