Pages *previousPage, *nextPage;
Console *previousConsole, *nextConsole;
+ /* remove all actions before adding actions appropriate for new page */
+ foreach(QAction* pageAction, treeWidget->actions()) {
+ treeWidget->removeAction(pageAction);
+ }
+
/* first determine the next item */
/* knowing the treeWidgetItem, get the page from the hash */
QBrush greyBrush(Qt::lightGray);
dirItem->setBackground(0, greyBrush);
}
- /* make sure the close window and toggle dock options are removed */
- treeWidget->removeAction(actionClosePage);
- treeWidget->removeAction(actionToggleDock);
- /* Is this a page that has been inserted into the hash */
- if (previousPage) {
- foreach(QAction* pageaction, previousPage->m_contextActions) {
- treeWidget->removeAction(pageaction);
- }
- }
}
}
foreach(QAction* mediaAction, mp_treeWidget->actions()) {
mp_treeWidget->removeAction(mediaAction);
}
- /*mp_treeWidget->removeAction(actionEditVolume);
- mp_treeWidget->removeAction(actionListJobsOnVolume);
- mp_treeWidget->removeAction(actionDeleteVolume);
- mp_treeWidget->removeAction(actionPruneVolume);
- mp_treeWidget->removeAction(actionPurgeVolume);
- mp_treeWidget->removeAction(actionRelabelVolume);
- mp_treeWidget->removeAction(actionAllVolumesFromPool);
- mp_treeWidget->removeAction(actionVolumeFromPool);*/
}
int treedepth = currentwidgetitem->data(0, Qt::UserRole).toInt();