Added a UI option to clean up at startup.Fixed known uncommitted issues.
This commit is contained in:
parent
f8bdf6d3e0
commit
cafd0d7a19
|
@ -65,43 +65,6 @@
|
||||||
<string>General Options</string>
|
<string>General Options</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_8">
|
<layout class="QGridLayout" name="gridLayout_8">
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="lblGeneral">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
<kerning>true</kerning>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>SandMan Options</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_19">
|
|
||||||
<property name="text">
|
|
||||||
<string>UI Language:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="uiLang"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QCheckBox" name="chkSandboxUrls">
|
|
||||||
<property name="text">
|
|
||||||
<string>Open urls from this ui sandboxed</string>
|
|
||||||
</property>
|
|
||||||
<property name="tristate">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1" colspan="2">
|
<item row="3" column="1" colspan="2">
|
||||||
<widget class="QCheckBox" name="chkMonitorSize">
|
<widget class="QCheckBox" name="chkMonitorSize">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -109,48 +72,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1" colspan="2">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="chkPanic">
|
|
||||||
<property name="text">
|
|
||||||
<string>Hotkey for terminating all boxed processes:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QKeySequenceEdit" name="keyPanic"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1" colspan="2">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="chkTop">
|
|
||||||
<property name="text">
|
|
||||||
<string>Hotkey for bringing sandman to the top:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QKeySequenceEdit" name="keyTop"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="1" colspan="2">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="chkPauseForce">
|
|
||||||
<property name="text">
|
|
||||||
<string>Hotkey for suspending process/folder forcing:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QKeySequenceEdit" name="keyPauseForce"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="1" colspan="2">
|
<item row="7" column="1" colspan="2">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
|
@ -165,13 +86,90 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="1" colspan="2">
|
<item row="13" column="1">
|
||||||
<widget class="QCheckBox" name="chkAsyncBoxOps">
|
<spacer name="verticalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>84</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="2">
|
||||||
|
<spacer name="horizontalSpacer_8">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>195</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="3" rowspan="2">
|
||||||
|
<spacer name="horizontalSpacer_14">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1" colspan="2">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chkPanic">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Run box operations asynchronously whenever possible (like content deletion)</string>
|
<string>Hotkey for terminating all boxed processes:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QKeySequenceEdit" name="keyPanic"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="uiLang"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="lblGeneral">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
<kerning>true</kerning>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>SandMan Options</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1" colspan="2">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chkTop">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hotkey for bringing sandman to the top:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QKeySequenceEdit" name="keyTop"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item row="9" column="0">
|
<item row="9" column="0">
|
||||||
<widget class="QLabel" name="lblRecovery">
|
<widget class="QLabel" name="lblRecovery">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
|
@ -186,58 +184,74 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="1" colspan="2">
|
<item row="2" column="1">
|
||||||
|
<widget class="QCheckBox" name="chkSandboxUrls">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open urls from this ui sandboxed</string>
|
||||||
|
</property>
|
||||||
|
<property name="tristate">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_19">
|
||||||
|
<property name="text">
|
||||||
|
<string>UI Language:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1" colspan="2">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chkPauseForce">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hotkey for suspending process/folder forcing:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QKeySequenceEdit" name="keyPauseForce"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="1">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
<widget class="QCheckBox" name="chkShowRecovery">
|
<widget class="QCheckBox" name="chkShowRecovery">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Show file recovery window when emptying sandboxes</string>
|
<string>Show file recovery window when emptying sandboxes</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="1">
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chkCheckDelete">
|
||||||
|
<property name="text">
|
||||||
|
<string>Don't check sandboxes' auto-delete status when Sandman starts.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
<widget class="QCheckBox" name="chkRecoveryTop">
|
<widget class="QCheckBox" name="chkRecoveryTop">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Show the Recovery Window as Always on Top</string>
|
<string>Show the Recovery Window as Always on Top</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="3" rowspan="2">
|
</layout>
|
||||||
<spacer name="horizontalSpacer_14">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="1">
|
<item row="8" column="1" colspan="2">
|
||||||
<spacer name="verticalSpacer_4">
|
<widget class="QCheckBox" name="chkAsyncBoxOps">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Vertical</enum>
|
<string>Run box operations asynchronously whenever possible (like content deletion)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
</widget>
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>84</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="2">
|
|
||||||
<spacer name="horizontalSpacer_8">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>195</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -282,6 +282,29 @@ CSandMan::CSandMan(QWidget *parent)
|
||||||
|
|
||||||
connect(qApp, &QGuiApplication::commitDataRequest, this, &CSandMan::commitData);
|
connect(qApp, &QGuiApplication::commitDataRequest, this, &CSandMan::commitData);
|
||||||
|
|
||||||
|
/*if (theConf->GetBool("Options/CheckAutoDelete", false)) {
|
||||||
|
for (auto& box : theAPI->GetAllBoxes().toStdMap()) {
|
||||||
|
CSandBoxPtr pBox = box.second;
|
||||||
|
if (box.second->GetActiveProcessCount() == 0) {
|
||||||
|
if (!pBox->GetBool("NeverDelete", false))
|
||||||
|
{
|
||||||
|
if (pBox->GetBool("AutoDelete", false))
|
||||||
|
{
|
||||||
|
bool DeleteSnapshots = false;
|
||||||
|
// if this box auto deletes first show the recovry dialog with the option to abort deletion
|
||||||
|
//if (!theGUI->OpenRecovery(pBox, DeleteSnapshots, true)) // unless no files are found than continue silently
|
||||||
|
// return;
|
||||||
|
|
||||||
|
if (theConf->GetBool("Options/AutoBoxOpsNotify", false))
|
||||||
|
OnLogMessage(tr("Auto deleting content of %1").arg(pBox->GetName()), true);
|
||||||
|
|
||||||
|
DeleteBoxContent(pBox, eAuto, DeleteSnapshots);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
m_uTimerID = startTimer(1000);
|
m_uTimerID = startTimer(1000);
|
||||||
|
|
||||||
bool bAutoRun = QApplication::arguments().contains("-autorun");
|
bool bAutoRun = QApplication::arguments().contains("-autorun");
|
||||||
|
@ -2676,8 +2699,8 @@ void CSandMan::OnHotKey(size_t id)
|
||||||
case HK_SUSPEND:
|
case HK_SUSPEND:
|
||||||
{
|
{
|
||||||
|
|
||||||
for (auto each : theAPI->GetAllBoxes()) {
|
for (auto each : theAPI->GetAllBoxes().toStdMap()) {
|
||||||
each->SetSuspendedAll(TRUE);
|
each.second->SetSuspendedAll(TRUE);
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -313,6 +313,7 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
|
||||||
|
|
||||||
connect(ui.chkNotifyRecovery, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
connect(ui.chkNotifyRecovery, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
||||||
connect(ui.chkShowRecovery, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
connect(ui.chkShowRecovery, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
||||||
|
connect(ui.chkCheckDelete, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
||||||
connect(ui.chkRecoveryTop, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
connect(ui.chkRecoveryTop, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
||||||
//
|
//
|
||||||
|
|
||||||
|
@ -924,6 +925,8 @@ void CSettingsWindow::LoadSettings()
|
||||||
ui.chkSuspend->setChecked(theConf->GetBool("Options/EnableSuspendKey", false));
|
ui.chkSuspend->setChecked(theConf->GetBool("Options/EnableSuspendKey", false));
|
||||||
ui.keySuspend->setKeySequence(QKeySequence(theConf->GetString("Options/SuspendKeySequence", "Ctrl+Pause")));
|
ui.keySuspend->setKeySequence(QKeySequence(theConf->GetString("Options/SuspendKeySequence", "Ctrl+Pause")));
|
||||||
|
|
||||||
|
ui.chkCheckDelete->setChecked(!theConf->GetBool("Options/CleanUpOnStart", false));
|
||||||
|
|
||||||
ui.chkMonitorSize->setChecked(theConf->GetBool("Options/WatchBoxSize", false));
|
ui.chkMonitorSize->setChecked(theConf->GetBool("Options/WatchBoxSize", false));
|
||||||
|
|
||||||
ui.chkWatchConfig->setChecked(theConf->GetBool("Options/WatchIni", true));
|
ui.chkWatchConfig->setChecked(theConf->GetBool("Options/WatchIni", true));
|
||||||
|
@ -1558,6 +1561,8 @@ void CSettingsWindow::SaveSettings()
|
||||||
theConf->SetValue("Options/EnableSuspendKey", ui.chkSuspend->isChecked());
|
theConf->SetValue("Options/EnableSuspendKey", ui.chkSuspend->isChecked());
|
||||||
theConf->SetValue("Options/SuspendKeySequence", ui.keySuspend->keySequence().toString());
|
theConf->SetValue("Options/SuspendKeySequence", ui.keySuspend->keySequence().toString());
|
||||||
|
|
||||||
|
theConf->SetValue("Options/CleanUpOnStart", !ui.chkCheckDelete->isChecked());
|
||||||
|
|
||||||
theConf->SetValue("Options/WatchBoxSize", ui.chkMonitorSize->isChecked());
|
theConf->SetValue("Options/WatchBoxSize", ui.chkMonitorSize->isChecked());
|
||||||
|
|
||||||
theConf->SetValue("Options/WatchIni", ui.chkWatchConfig->isChecked());
|
theConf->SetValue("Options/WatchIni", ui.chkWatchConfig->isChecked());
|
||||||
|
|
Loading…
Reference in New Issue