- Timestamp:
- Jun 27, 2023 5:27:44 PM (23 months ago)
- svn:sync-xref-src-repo-rev:
- 158017
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp ¶
r100301 r100302 43 43 #include "UIFileManagerHostTable.h" 44 44 #include "UIFileManagerGuestTable.h" 45 #include "UIFileTableNavigationWidget.h" 45 46 #include "UIIconPool.h" 46 47 #include "UIMessageCenter.h" … … 1050 1051 if (m_pToolBar && m_pActionPool) 1051 1052 { 1053 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoBackward)); 1054 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoForward)); 1052 1055 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoUp)); 1053 1056 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoHome)); … … 1091 1094 1092 1095 QMenu menu; 1096 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoBackward)); 1097 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoForward)); 1093 1098 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoUp)); 1094 1099 … … 1153 1158 manageConnection(m_fIsCurrent, m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_ShowProperties), &UIFileManagerTable::sltShowProperties); 1154 1159 manageConnection(m_fIsCurrent, m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_CreateNewDirectory), &UIFileManagerTable::sltCreateNewDirectory); 1160 1161 /* Also disable/enable go forward/backward actions: */ 1162 toggleForwardBackwardActions(); 1155 1163 } 1156 1164 … … 1478 1486 void UIFileManagerGuestTable::toggleForwardBackwardActions() 1479 1487 { 1488 int iCount = m_pNavigationWidget->historyItemCount(); 1489 int iCurrent = m_pNavigationWidget->currentHistoryIndex(); 1490 if (m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoForward)) 1491 m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoForward)->setEnabled(iCurrent < iCount - 1); 1492 if (m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoBackward)) 1493 m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoBackward)->setEnabled(iCurrent > 0); 1480 1494 } 1481 1495 … … 1646 1660 } 1647 1661 1648 1649 1662 #include "UIFileManagerGuestTable.moc" -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.cpp ¶
r100301 r100302 35 35 #include "UIActionPool.h" 36 36 #include "UIFileManager.h" 37 #include "UIFileTableNavigationWidget.h" 37 38 #include "UICustomFileSystemModel.h" 38 39 #include "UIFileManagerHostTable.h" … … 191 192 if (m_pToolBar && m_pActionPool) 192 193 { 194 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoBackward)); 195 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoForward)); 193 196 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoUp)); 194 197 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoHome)); … … 249 252 void UIFileManagerHostTable::toggleForwardBackwardActions() 250 253 { 254 int iCount = m_pNavigationWidget->historyItemCount(); 255 int iCurrent = m_pNavigationWidget->currentHistoryIndex(); 256 if (m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoForward)) 257 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoForward)->setEnabled(iCurrent < iCount - 1); 258 if (m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoBackward)) 259 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoBackward)->setEnabled(iCurrent > 0); 251 260 } 252 261 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.h ¶
r100301 r100302 268 268 /** This name is appended to the log messages which are shown in the log panel. */ 269 269 QString m_strTableName; 270 /** Contains m_pBreadCrumbsWidget and m_pLocationComboBox. */ 271 UIFileTableNavigationWidget *m_pNavigationWidget; 270 272 271 273 private slots: … … 311 313 UIGuestControlFileView *m_pView; 312 314 UICustomFileSystemProxyModel *m_pProxyModel; 313 /** Contains m_pBreadCrumbsWidget and m_pLocationComboBox. */314 UIFileTableNavigationWidget *m_pNavigationWidget;315 315 316 316 QILineEdit *m_pSearchLineEdit; -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFileTableNavigationWidget.cpp ¶
r100300 r100302 268 268 int UIFileTableNavigationWidget::historyItemCount() const 269 269 { 270 if ( m_pHistoryComboBox)270 if (!m_pHistoryComboBox) 271 271 return 0; 272 272 return m_pHistoryComboBox->count(); … … 275 275 int UIFileTableNavigationWidget::currentHistoryIndex() const 276 276 { 277 if ( m_pHistoryComboBox)277 if (!m_pHistoryComboBox) 278 278 return 0; 279 279 return m_pHistoryComboBox->currentIndex();
Note:
See TracChangeset
for help on using the changeset viewer.