Changeset 90300 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 23, 2021 11:26:26 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r90290 r90300 846 846 src/notificationcenter/UINotificationObject.h \ 847 847 src/notificationcenter/UINotificationObjectItem.h \ 848 src/notificationcenter/UINotificationObjects.h \ 848 849 src/notificationcenter/UINotificationProgressTask.h \ 849 850 src/settings/UISettingsDialog.h \ … … 1396 1397 src/notificationcenter/UINotificationObject.cpp \ 1397 1398 src/notificationcenter/UINotificationObjectItem.cpp \ 1399 src/notificationcenter/UINotificationObjects.cpp \ 1398 1400 src/notificationcenter/UINotificationProgressTask.cpp \ 1399 1401 src/objects/UIRichTextString.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumItem.cpp
r90270 r90300 28 28 #include "UIMediumItem.h" 29 29 #include "UIMessageCenter.h" 30 #include "UINotificationCenter.h" 30 31 31 32 /* COM includes: */ … … 78 79 return false; 79 80 80 /* Try to assign new medium location: */ 81 if ( comMedium.isOk() 82 && strFileName != location()) 83 { 84 /* Prepare move storage progress: */ 85 CProgress comProgress = comMedium.MoveTo(strFileName); 86 87 /* Show error message if necessary: */ 88 if (!comMedium.isOk()) 89 { 90 msgCenter().cannotMoveMediumStorage(comMedium, location(), 91 strFileName, treeWidget()); 92 /* Negative if failed: */ 93 return false; 94 } 95 else 96 { 97 /* Show move storage progress: */ 98 msgCenter().showModalProgressDialog(comProgress, tr("Moving medium ..."), 99 ":/progress_media_move_90px.png", treeWidget()); 100 101 /* Show error message if necessary: */ 102 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 103 { 104 msgCenter().cannotMoveMediumStorage(comProgress, location(), 105 strFileName, treeWidget()); 106 /* Negative if failed: */ 107 return false; 108 } 109 } 110 } 111 112 /* Recache item: */ 113 refreshAll(); 81 /* Assign new medium location: */ 82 UINotificationProgressMediumMove *pNotification = new UINotificationProgressMediumMove(comMedium, 83 location(), 84 strFileName); 85 connect(pNotification, &UINotificationProgressMediumMove::sigProgressFinished, 86 this, &UIMediumItem::sltHandleMoveProgressFinished); 87 notificationCenter().append(pNotification); 114 88 115 89 /* Positive: */ … … 262 236 } 263 237 238 void UIMediumItem::sltHandleMoveProgressFinished() 239 { 240 /* Recache item: */ 241 refreshAll(); 242 } 243 264 244 void UIMediumItem::refresh() 265 245 { -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumItem.h
r90270 r90300 119 119 /** Returns default text. */ 120 120 virtual QString defaultText() const /* override */; 121 122 protected slots: 123 124 /** Handles medium move progress result. */ 125 void sltHandleMoveProgressFinished(); 121 126 122 127 private: -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.h
r90288 r90300 28 28 /* GUI includes: */ 29 29 #include "UILibraryDefs.h" 30 #include "UINotificationObjects.h" 30 31 31 32 /* Forward declarations: */
Note:
See TracChangeset
for help on using the changeset viewer.