This commit is contained in:
DavidXanatos 2022-07-11 21:12:42 +02:00
parent c8fd7af92a
commit e7e36bfdfe
4 changed files with 23 additions and 17 deletions

View File

@ -405,13 +405,6 @@ void CSandMan::CreateMenus(bool bAdvanced)
CreateViewBaseMenu(); CreateViewBaseMenu();
m_pMenuView->addSeparator();
m_pMenuBrowse = m_pMenuView->addAction(CSandMan::GetIcon("Tree"), tr("Show File Panel"), this, SLOT(OnProcView()));
m_pMenuBrowse->setCheckable(true);
m_pMenuBrowse->setShortcut(QKeySequence("Ctrl+D"));
m_pMenuBrowse->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(m_pMenuBrowse);
if(bAdvanced) { if(bAdvanced) {
m_pMenuView->addSeparator(); m_pMenuView->addSeparator();
@ -425,6 +418,13 @@ void CSandMan::CreateMenus(bool bAdvanced)
m_pShowAllSessions = NULL; m_pShowAllSessions = NULL;
} }
m_pMenuView->addSeparator();
m_pMenuBrowse = m_pMenuView->addAction(/*CSandMan::GetIcon("Tree"),*/ tr("Show File Panel"), this, SLOT(OnProcView()));
m_pMenuBrowse->setCheckable(true);
m_pMenuBrowse->setShortcut(QKeySequence("Ctrl+D"));
m_pMenuBrowse->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(m_pMenuBrowse);
m_pMenuView->addSeparator(); m_pMenuView->addSeparator();
m_pRefreshAll = m_pMenuView->addAction(CSandMan::GetIcon("Refresh"), tr("Refresh View"), this, SLOT(OnRefresh())); m_pRefreshAll = m_pMenuView->addAction(CSandMan::GetIcon("Refresh"), tr("Refresh View"), this, SLOT(OnRefresh()));
@ -1682,15 +1682,6 @@ void CSandMan::OnSandBoxAction()
GetBoxView()->AddNewBox(); GetBoxView()->AddNewBox();
else if(pAction == m_pNewGroup) else if(pAction == m_pNewGroup)
GetBoxView()->AddNewGroup(); GetBoxView()->AddNewGroup();
// for old menu
else
{
CSettingsWindow* pSettingsWindow = new CSettingsWindow(this);
connect(pSettingsWindow, SIGNAL(OptionsChanged(bool)), this, SLOT(UpdateSettings(bool)));
int Tab = pAction->data().toInt();
pSettingsWindow->showTab(Tab);
}
} }
void CSandMan::OnEmptyAll() void CSandMan::OnEmptyAll()
@ -1964,6 +1955,16 @@ void CSandMan::OnProcView()
if (m_pMenuBrowse) { if (m_pMenuBrowse) {
theConf->SetValue("Options/ShowFilePanel", m_pMenuBrowse->isChecked()); theConf->SetValue("Options/ShowFilePanel", m_pMenuBrowse->isChecked());
m_pFileView->setVisible(m_pMenuBrowse->isChecked()); m_pFileView->setVisible(m_pMenuBrowse->isChecked());
if (m_pMenuBrowse->isChecked()) {
QTimer::singleShot(10, [&] {
auto Sizes = m_pPanelSplitter->sizes();
if (Sizes.at(1) == 0) {
Sizes[1] = 100;
m_pPanelSplitter->setSizes(Sizes);
}
});
}
} }
} }

View File

@ -213,6 +213,7 @@ DWORD WINAPI FinderThreadFunc(LPVOID lpParam)
return (int)msg.wParam; return (int)msg.wParam;
} }
void CSandMan::OnWndFinder() void CSandMan::OnWndFinder()
{ {
m_pWndFinder->setEnabled(false); m_pWndFinder->setEnabled(false);

View File

@ -286,7 +286,7 @@ void CSbieView::CreateOldMenu()
m_pMenuSnapshots = m_pMenuTools->addAction(CSandMan::GetIcon("Snapshots"), tr("Snapshots Manager"), this, SLOT(OnSandBoxAction())); m_pMenuSnapshots = m_pMenuTools->addAction(CSandMan::GetIcon("Snapshots"), tr("Snapshots Manager"), this, SLOT(OnSandBoxAction()));
m_pMenuTools->addSeparator(); m_pMenuTools->addSeparator();
m_pMenuDuplicate = m_pMenuTools->addAction(CSandMan::GetIcon("Duplicate"), tr("Duplicate Box Config"), this, SLOT(OnSandBoxAction())); m_pMenuDuplicate = m_pMenuTools->addAction(CSandMan::GetIcon("Duplicate"), tr("Duplicate Sandbox Config"), this, SLOT(OnSandBoxAction()));
m_pMenuTools->addSeparator(); m_pMenuTools->addSeparator();
m_pMenuRefresh = m_pMenuTools->addAction(CSandMan::GetIcon("Refresh"), tr("Refresh Info"), this, SLOT(OnSandBoxAction())); m_pMenuRefresh = m_pMenuTools->addAction(CSandMan::GetIcon("Refresh"), tr("Refresh Info"), this, SLOT(OnSandBoxAction()));

View File

@ -114,6 +114,10 @@ protected:
QStackedLayout* m_pLayout; QStackedLayout* m_pLayout;
}; };
////////////////////////////////////////////////////////////////////////////////////////
// CTraceWindow
class CTraceWindow : public QDialog class CTraceWindow : public QDialog
{ {
Q_OBJECT Q_OBJECT