Changeset 89111 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- May 17, 2021 4:19:16 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp
r89109 r89111 127 127 , m_pSessionPanel(0) 128 128 , m_pOperationsPanel(0) 129 , m_fDialogBeingClosed(false) 129 130 { 130 131 loadOptions(); … … 141 142 UIFileManager::~UIFileManager() 142 143 { 143 saveOptions();144 144 UIFileManagerOptions::destroy(); 145 } 146 147 void UIFileManager::setDialogBeingClosed(bool fFlag) 148 { 149 m_fDialogBeingClosed = fFlag; 145 150 } 146 151 … … 523 528 if (m_pHostFileTable) 524 529 m_pHostFileTable->optionsUpdated(); 530 saveOptions(); 525 531 } 526 532 … … 679 685 void UIFileManager::saveOptions() 680 686 { 681 /* Save a list of currently visible panels: */682 QStringList strNameList;683 foreach(UIDialogPanel* pPanel, m_visiblePanelsList)684 strNameList.append(pPanel->panelName());685 gEDataManager->setFileManagerVisiblePanels(strNameList);686 687 /* Save the options: */ 687 688 UIFileManagerOptions *pOptions = UIFileManagerOptions::instance(); … … 751 752 m_visiblePanelsList.removeAll(panel); 752 753 manageEscapeShortCut(); 754 savePanelVisibility(); 753 755 } 754 756 … … 766 768 m_visiblePanelsList.push_back(panel); 767 769 manageEscapeShortCut(); 770 savePanelVisibility(); 768 771 } 769 772 … … 794 797 } 795 798 799 void UIFileManager::savePanelVisibility() 800 { 801 if (m_fDialogBeingClosed) 802 return; 803 /* Save a list of currently visible panels: */ 804 QStringList strNameList; 805 foreach(UIDialogPanel* pPanel, m_visiblePanelsList) 806 strNameList.append(pPanel->panelName()); 807 gEDataManager->setFileManagerVisiblePanels(strNameList); 808 } 809 796 810 #include "UIFileManager.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.h
r89109 r89111 95 95 ~UIFileManager(); 96 96 QMenu *menu() const; 97 98 void setDialogBeingClosed(bool fFlag); 97 99 98 100 #ifdef VBOX_WS_MAC … … 167 169 QStringList getFsObjInfoStringList(const T &fsObjectInfo) const; 168 170 void appendLog(const QString &strLog, FileManagerLogType eLogType); 171 void savePanelVisibility(); 169 172 CGuest m_comGuest; 170 173 CGuestSession m_comGuestSession; … … 190 193 UIFileManagerSessionPanel *m_pSessionPanel; 191 194 UIFileManagerOperationsPanel *m_pOperationsPanel; 195 bool m_fDialogBeingClosed; 192 196 friend class UIFileManagerOptionsPanel; 193 197 friend class UIFileManagerDialog; -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.cpp
r88873 r89111 64 64 , m_strMachineName(strMachineName) 65 65 { 66 } 67 68 UIFileManagerDialog::~UIFileManagerDialog() 69 { 70 UIFileManager *pWidget = qobject_cast<UIFileManager*>(widget()); 71 if (pWidget) 72 pWidget->setDialogBeingClosed(true); 66 73 } 67 74 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.h
r86986 r89111 71 71 * @param comGuest Passes the com-guest reference. */ 72 72 UIFileManagerDialog(QWidget *pCenterWidget, UIActionPool *pActionPool, const CGuest &comGuest, const QString &strMachineName = QString()); 73 ~UIFileManagerDialog(); 73 74 74 75 protected:
Note:
See TracChangeset
for help on using the changeset viewer.