This commit is contained in:
DavidXanatos 2024-11-13 14:38:01 +01:00
parent fc400020ad
commit 34c7ec7d90
8 changed files with 568 additions and 453 deletions

File diff suppressed because it is too large Load Diff

View File

@ -459,27 +459,30 @@
<item row="0" column="0"> <item row="0" column="0">
<widget class="QTabWidget" name="tabsShell"> <widget class="QTabWidget" name="tabsShell">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="tabWindows"> <widget class="QWidget" name="tabWindows">
<attribute name="title"> <attribute name="title">
<string>Windows Shell</string> <string>Windows Shell</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_13"> <layout class="QGridLayout" name="gridLayout_13">
<item row="6" column="2"> <item row="4" column="1" colspan="3">
<widget class="QCheckBox" name="chkShellMenu2"> <widget class="QCheckBox" name="chkShellMenu">
<property name="text"> <property name="text">
<string>Add 'Run Un-Sandboxed' to the context menu</string> <string>Add 'Run Sandboxed' to the explorer context menu</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="2"> <item row="0" column="0">
<widget class="QComboBox" name="cmbIntegrateMenu"/> <widget class="QLabel" name="lblStartUp">
</item> <property name="font">
<item row="5" column="2"> <font>
<widget class="QCheckBox" name="chkAlwaysDefault"> <bold>true</bold>
<kerning>true</kerning>
</font>
</property>
<property name="text"> <property name="text">
<string>Always use DefaultBox</string> <string>Start Sandbox Manager</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -496,48 +499,26 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="9" column="0"> <item row="16" column="3">
<widget class="QLabel" name="lblStartMenu"> <spacer name="horizontalSpacer_2">
<property name="font"> <property name="orientation">
<font> <enum>Qt::Horizontal</enum>
<weight>75</weight>
<bold>true</bold>
<kerning>true</kerning>
</font>
</property> </property>
<property name="text"> <property name="sizeHint" stdset="0">
<string>Start Menu Integration</string> <size>
<width>272</width>
<height>13</height>
</size>
</property> </property>
</widget> </spacer>
</item> </item>
<item row="2" column="1" colspan="2"> <item row="11" column="2">
<widget class="QCheckBox" name="chkSvcStart"> <widget class="QComboBox" name="cmbIntegrateMenu"/>
<property name="text">
<string>Start UI when a sandboxed process is started</string>
</property>
</widget>
</item> </item>
<item row="12" column="2"> <item row="5" column="2">
<widget class="QComboBox" name="cmbIntegrateDesk"/> <widget class="QCheckBox" name="chkAlwaysDefault">
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblRunBoxed">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
<kerning>true</kerning>
</font>
</property>
<property name="text"> <property name="text">
<string>Run Sandboxed - Actions</string> <string>Always use DefaultBox</string>
</property>
</widget>
</item>
<item row="10" column="1" colspan="2">
<widget class="QCheckBox" name="chkScanMenu">
<property name="text">
<string>Scan shell folders and offer links in run menu</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -554,47 +535,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="2" colspan="2">
<widget class="QCheckBox" name="chkShellMenu4">
<property name="text">
<string>Add 'Set Open Path in Sandbox' to context menu</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblStartUp">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
<kerning>true</kerning>
</font>
</property>
<property name="text">
<string>Start Sandbox Manager</string>
</property>
</widget>
</item>
<item row="13" column="3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>272</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="2" colspan="2">
<widget class="QCheckBox" name="chkShellMenu3">
<property name="text">
<string>Add 'Set Force in Sandbox' to the context menu</string>
</property>
</widget>
</item>
<item row="3" column="3"> <item row="3" column="3">
<spacer name="horizontalSpacer_6"> <spacer name="horizontalSpacer_6">
<property name="orientation"> <property name="orientation">
@ -624,17 +564,43 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1" colspan="3"> <item row="8" column="2" colspan="2">
<widget class="QCheckBox" name="chkShellMenu"> <widget class="QCheckBox" name="chkShellMenu4">
<property name="text"> <property name="text">
<string>Add 'Run Sandboxed' to the explorer context menu</string> <string>Add 'Set Open Path in Sandbox' to context menu</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" colspan="2"> <item row="10" column="1" colspan="2">
<widget class="QCheckBox" name="chkAutoStart"> <widget class="QCheckBox" name="chkScanMenu">
<property name="text"> <property name="text">
<string>Start UI with Windows</string> <string>Scan shell folders and offer links in run menu</string>
</property>
</widget>
</item>
<item row="16" column="1">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>154</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblRunBoxed">
<property name="font">
<font>
<bold>true</bold>
<kerning>true</kerning>
</font>
</property>
<property name="text">
<string>Run Sandboxed - Actions</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -654,18 +620,76 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="13" column="1"> <item row="2" column="1" colspan="2">
<spacer name="verticalSpacer_6"> <widget class="QCheckBox" name="chkSvcStart">
<property name="orientation"> <property name="text">
<enum>Qt::Vertical</enum> <string>Start UI when a sandboxed process is started</string>
</property> </property>
<property name="sizeHint" stdset="0"> </widget>
<size> </item>
<width>20</width> <item row="12" column="2">
<height>154</height> <widget class="QComboBox" name="cmbIntegrateDesk"/>
</size> </item>
<item row="1" column="1" colspan="2">
<widget class="QCheckBox" name="chkAutoStart">
<property name="text">
<string>Start UI with Windows</string>
</property> </property>
</spacer> </widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="lblStartMenu">
<property name="font">
<font>
<bold>true</bold>
<kerning>true</kerning>
</font>
</property>
<property name="text">
<string>Start Menu Integration</string>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QCheckBox" name="chkShellMenu2">
<property name="text">
<string>Add 'Run Un-Sandboxed' to the context menu</string>
</property>
</widget>
</item>
<item row="7" column="2" colspan="2">
<widget class="QCheckBox" name="chkShellMenu3">
<property name="text">
<string>Add 'Set Force in Sandbox' to the context menu</string>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="lblDesktop">
<property name="font">
<font>
<bold>true</bold>
<kerning>true</kerning>
</font>
</property>
<property name="text">
<string>Sandboxed Desktop</string>
</property>
</widget>
</item>
<item row="14" column="1" colspan="3">
<widget class="QCheckBox" name="chkDeskAutoSwitch">
<property name="text">
<string>Switch to sandboxed desktop when starting a process</string>
</property>
</widget>
</item>
<item row="15" column="1" colspan="3">
<widget class="QCheckBox" name="chkDeskQuickSwitch">
<property name="text">
<string>Switch to sandboxed desktop with double click</string>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>

View File

@ -332,7 +332,7 @@ void CFileView::OnFileMenu(const QPoint&)
{ {
auto pBoxPlus = m_pBox.objectCast<CSandBoxPlus>(); auto pBoxPlus = m_pBox.objectCast<CSandBoxPlus>();
if (FoundPin.isEmpty()) if (FoundPin.isEmpty())
pBoxPlus->InsertText("RunCommand", Split2(Files.first(), "\\", true).second + "|\"" + pBoxPlus->MakeBoxCommand(Files.first()) + "\""); pBoxPlus->AppendText("RunCommand", Split2(Files.first(), "\\", true).second + "|\"" + pBoxPlus->MakeBoxCommand(Files.first()) + "\"");
else else
pBoxPlus->DelValue("RunCommand", FoundPin); pBoxPlus->DelValue("RunCommand", FoundPin);
break; break;

View File

@ -1707,7 +1707,7 @@ void CSbieView::OnProcessAction(QAction* Action, const QList<CBoxedProcessPtr>&
Entry["Name"] = pProcess->GetProcessName(); Entry["Name"] = pProcess->GetProcessName();
Entry["WorkingDir"] = pProcess->GetWorkingDir(); Entry["WorkingDir"] = pProcess->GetWorkingDir();
Entry["Command"] = pBoxPlus->MakeBoxCommand(pProcess->GetFileName()); Entry["Command"] = pBoxPlus->MakeBoxCommand(pProcess->GetFileName());
pBoxPlus->InsertText("RunCommand", MakeRunEntry(Entry)); pBoxPlus->AppendText("RunCommand", MakeRunEntry(Entry));
} }
else if(!m_pMenuPinToRun->data().toString().isEmpty()) else if(!m_pMenuPinToRun->data().toString().isEmpty())
pBoxPlus->DelValue("RunCommand", m_pMenuPinToRun->data().toString()); pBoxPlus->DelValue("RunCommand", m_pMenuPinToRun->data().toString());
@ -1982,7 +1982,7 @@ void CSbieView::OnMenuContextAction()
QString Link = m_pCtxPinToRun->data().toString(); QString Link = m_pCtxPinToRun->data().toString();
if (!Link.isEmpty()) { if (!Link.isEmpty()) {
if (m_pCtxPinToRun->isChecked()) if (m_pCtxPinToRun->isChecked())
pBoxPlus->InsertText("RunCommand", Link); pBoxPlus->AppendText("RunCommand", Link);
else else
pBoxPlus->DelValue("RunCommand", Link); pBoxPlus->DelValue("RunCommand", Link);
} }

View File

@ -44,6 +44,13 @@ void COptionsWindow::CreateAdvanced()
connect(ui.chkNoSecurityIsolation, SIGNAL(clicked(bool)), this, SLOT(OnIsolationChanged())); connect(ui.chkNoSecurityIsolation, SIGNAL(clicked(bool)), this, SLOT(OnIsolationChanged()));
connect(ui.chkNoSecurityFiltering, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged())); connect(ui.chkNoSecurityFiltering, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged()));
#ifdef INSIDER_BUILD
connect(ui.chkSbieDesktop, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged()));
#else
ui.chkSbieDesktop->setVisible(false);
#endif
connect(ui.chkOpenWndStation, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged()));
connect(ui.chkOpenDevCMApi, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged())); connect(ui.chkOpenDevCMApi, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged()));
//connect(ui.chkOpenLsaSSPI, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged())); //connect(ui.chkOpenLsaSSPI, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged()));
connect(ui.chkOpenSamEndpoint, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged())); connect(ui.chkOpenSamEndpoint, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged()));
@ -187,6 +194,11 @@ void COptionsWindow::LoadAdvanced()
ui.chkNoSecurityIsolation->setChecked(m_pBox->GetBool("NoSecurityIsolation", false)); ui.chkNoSecurityIsolation->setChecked(m_pBox->GetBool("NoSecurityIsolation", false));
ui.chkNoSecurityFiltering->setChecked(m_pBox->GetBool("NoSecurityFiltering", false)); ui.chkNoSecurityFiltering->setChecked(m_pBox->GetBool("NoSecurityFiltering", false));
#ifdef INSIDER_BUILD
ui.chkSbieDesktop->setChecked(m_pBox->GetBool("UseSandboxDesktop", false));
#endif
ui.chkOpenWndStation->setChecked(m_pBox->GetBool("OpenWndStation", false));
ui.chkOpenDevCMApi->setChecked(m_pBox->GetBool("OpenDevCMApi", false)); ui.chkOpenDevCMApi->setChecked(m_pBox->GetBool("OpenDevCMApi", false));
//ui.chkOpenLsaSSPI->setChecked(!m_pBox->GetBool("BlockPassword", true)); // OpenLsaSSPI //ui.chkOpenLsaSSPI->setChecked(!m_pBox->GetBool("BlockPassword", true)); // OpenLsaSSPI
ui.chkOpenSamEndpoint->setChecked(m_pBox->GetBool("OpenSamEndpoint", false)); ui.chkOpenSamEndpoint->setChecked(m_pBox->GetBool("OpenSamEndpoint", false));
@ -442,6 +454,11 @@ void COptionsWindow::SaveAdvanced()
WriteAdvancedCheck(ui.chkNoSecurityIsolation, "NoSecurityIsolation", "y", ""); WriteAdvancedCheck(ui.chkNoSecurityIsolation, "NoSecurityIsolation", "y", "");
WriteAdvancedCheck(ui.chkNoSecurityFiltering, "NoSecurityFiltering", "y", ""); WriteAdvancedCheck(ui.chkNoSecurityFiltering, "NoSecurityFiltering", "y", "");
#ifdef INSIDER_BUILD
WriteAdvancedCheck(ui.chkSbieDesktop, "UseSandboxDesktop", "y", "");
#endif
WriteAdvancedCheck(ui.chkOpenWndStation, "OpenWndStation", "y", "");
WriteAdvancedCheck(ui.chkOpenDevCMApi, "OpenDevCMApi", "y", ""); WriteAdvancedCheck(ui.chkOpenDevCMApi, "OpenDevCMApi", "y", "");
//WriteAdvancedCheck(ui.chkOpenLsaSSPI, "BlockPassword", "n", ""); // OpenLsaSSPI //WriteAdvancedCheck(ui.chkOpenLsaSSPI, "BlockPassword", "n", ""); // OpenLsaSSPI
WriteAdvancedCheck(ui.chkOpenSamEndpoint, "OpenSamEndpoint", "y", ""); WriteAdvancedCheck(ui.chkOpenSamEndpoint, "OpenSamEndpoint", "y", "");

View File

@ -242,6 +242,8 @@ void COptionsWindow::CreateGeneral()
connect(ui.btnCmdDown, SIGNAL(clicked(bool)), this, SLOT(OnCommandDown())); connect(ui.btnCmdDown, SIGNAL(clicked(bool)), this, SLOT(OnCommandDown()));
connect(ui.btnDelCmd, SIGNAL(clicked(bool)), this, SLOT(OnDelCommand())); connect(ui.btnDelCmd, SIGNAL(clicked(bool)), this, SLOT(OnDelCommand()));
connect(ui.treeRun, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(OnRunChanged())); connect(ui.treeRun, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(OnRunChanged()));
connect(ui.txtNotes, SIGNAL(textChanged()), this, SLOT(OnGeneralChanged()));
} }
void COptionsWindow::LoadGeneral() void COptionsWindow::LoadGeneral()
@ -381,6 +383,8 @@ void COptionsWindow::LoadGeneral()
ui.chkAllowEfs->setChecked(m_pBox->GetBool("EnableEFS", false)); ui.chkAllowEfs->setChecked(m_pBox->GetBool("EnableEFS", false));
ui.txtNotes->setPlainText(m_pBox->GetTextList("Note", false).join("\n"));
OnGeneralChanged(); OnGeneralChanged();
m_GeneralChanged = false; m_GeneralChanged = false;
@ -452,7 +456,7 @@ void COptionsWindow::SaveGeneral()
//WriteTextList("RunCommand", RunCommands); //WriteTextList("RunCommand", RunCommands);
m_pBox->DelValue("RunCommand"); m_pBox->DelValue("RunCommand");
foreach(const QString& Value, RunCommands) foreach(const QString& Value, RunCommands)
m_pBox->InsertText("RunCommand", Value); m_pBox->AppendText("RunCommand", Value);
if (ui.cmbVersion->isEnabled()) if (ui.cmbVersion->isEnabled())
@ -514,6 +518,10 @@ void COptionsWindow::SaveGeneral()
WriteAdvancedCheck(ui.chkAllowEfs, "EnableEFS", "y", ""); WriteAdvancedCheck(ui.chkAllowEfs, "EnableEFS", "y", "");
m_pBox->DelValue("Note");
foreach(const QString& Value, ui.txtNotes->toPlainText().split("\n"))
m_pBox->AppendText("Note", Value);
m_GeneralChanged = false; m_GeneralChanged = false;
} }

View File

@ -254,16 +254,18 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& pBox, const QStri
ui.tabsAdvanced->setCurrentIndex(0); ui.tabsAdvanced->setCurrentIndex(0);
ui.tabsAdvanced->setTabIcon(0, CSandMan::GetIcon("Presets")); ui.tabsAdvanced->setTabIcon(0, CSandMan::GetIcon("Presets"));
ui.tabsAdvanced->setTabIcon(1, CSandMan::GetIcon("Trigger")); ui.tabsAdvanced->setTabIcon(1, CSandMan::GetIcon("Trigger"));
ui.tabsAdvanced->setTabIcon(2, CSandMan::GetIcon("Anon")); ui.tabsAdvanced->setTabIcon(2, CSandMan::GetIcon("Shield2"));
ui.tabsAdvanced->setTabIcon(3, CSandMan::GetIcon("Users")); ui.tabsAdvanced->setTabIcon(3, CSandMan::GetIcon("Anon"));
ui.tabsAdvanced->setTabIcon(4, CSandMan::GetIcon("SetLogging")); ui.tabsAdvanced->setTabIcon(4, CSandMan::GetIcon("Users"));
ui.tabsAdvanced->setTabIcon(5, CSandMan::GetIcon("Bug")); ui.tabsAdvanced->setTabIcon(5, CSandMan::GetIcon("SetLogging"));
ui.tabsAdvanced->setTabIcon(6, CSandMan::GetIcon("Bug"));
ui.tabsTemplates->setCurrentIndex(0); ui.tabsTemplates->setCurrentIndex(0);
ui.tabsTemplates->setTabIcon(0, CSandMan::GetIcon("Template")); ui.tabsTemplates->setTabIcon(0, CSandMan::GetIcon("Template"));
ui.tabsTemplates->setTabIcon(1, CSandMan::GetIcon("Explore")); ui.tabsTemplates->setTabIcon(1, CSandMan::GetIcon("Explore"));
ui.tabsTemplates->setTabIcon(2, CSandMan::GetIcon("Accessibility")); ui.tabsTemplates->setTabIcon(2, CSandMan::GetIcon("Accessibility"));
int iViewMode = theConf->GetInt("Options/ViewMode", 1); int iViewMode = theConf->GetInt("Options/ViewMode", 1);
int iOptionLayout = theConf->GetInt("Options/NewConfigLayout", 2); int iOptionLayout = theConf->GetInt("Options/NewConfigLayout", 2);
if (iOptionLayout == 2) if (iOptionLayout == 2)
@ -367,6 +369,7 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& pBox, const QStri
#endif #endif
AddIconToLabel(ui.lblAppearance, CSandMan::GetIcon("Design").pixmap(size,size)); AddIconToLabel(ui.lblAppearance, CSandMan::GetIcon("Design").pixmap(size,size));
AddIconToLabel(ui.lblBoxType, CSandMan::GetIcon("Maintenance").pixmap(size,size)); AddIconToLabel(ui.lblBoxType, CSandMan::GetIcon("Maintenance").pixmap(size,size));
AddIconToLabel(ui.lblNotes, CSandMan::GetIcon("EditIni").pixmap(size,size));
AddIconToLabel(ui.lblStructure, CSandMan::GetIcon("Structure").pixmap(size,size)); AddIconToLabel(ui.lblStructure, CSandMan::GetIcon("Structure").pixmap(size,size));
AddIconToLabel(ui.lblMigration, CSandMan::GetIcon("Move").pixmap(size,size)); AddIconToLabel(ui.lblMigration, CSandMan::GetIcon("Move").pixmap(size,size));
AddIconToLabel(ui.lblDelete, CSandMan::GetIcon("Erase").pixmap(size,size)); AddIconToLabel(ui.lblDelete, CSandMan::GetIcon("Erase").pixmap(size,size));
@ -394,6 +397,7 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& pBox, const QStri
AddIconToLabel(ui.lblPrivilege, CSandMan::GetIcon("Token").pixmap(size,size)); AddIconToLabel(ui.lblPrivilege, CSandMan::GetIcon("Token").pixmap(size,size));
AddIconToLabel(ui.lblToken, CSandMan::GetIcon("Sandbox").pixmap(size,size)); AddIconToLabel(ui.lblToken, CSandMan::GetIcon("Sandbox").pixmap(size,size));
AddIconToLabel(ui.lblIsolation, CSandMan::GetIcon("Fence").pixmap(size,size)); AddIconToLabel(ui.lblIsolation, CSandMan::GetIcon("Fence").pixmap(size,size));
AddIconToLabel(ui.lblDesktop, CSandMan::GetIcon("Monitor").pixmap(size,size));
AddIconToLabel(ui.lblAccess, CSandMan::GetIcon("NoAccess").pixmap(size,size)); AddIconToLabel(ui.lblAccess, CSandMan::GetIcon("NoAccess").pixmap(size,size));
AddIconToLabel(ui.lblProtection, CSandMan::GetIcon("EFence").pixmap(size,size)); AddIconToLabel(ui.lblProtection, CSandMan::GetIcon("EFence").pixmap(size,size));
@ -911,7 +915,7 @@ void COptionsWindow::WriteAdvancedCheck(QCheckBox* pCheck, const QString& Name,
} }
if (!StrValue.isEmpty()) { if (!StrValue.isEmpty()) {
SB_STATUS Status = m_pBox->InsertText(Name, StrValue); SB_STATUS Status = m_pBox->AppendText(Name, StrValue);
if (!Status) if (!Status)
throw Status; throw Status;
} }
@ -1325,14 +1329,14 @@ void COptionsWindow::SaveIniSection()
//if (!OldSettings.removeOne(Settings)) //if (!OldSettings.removeOne(Settings))
// NewSettings.append(Settings); // NewSettings.append(Settings);
m_pBox->InsertText(Settings.first, Settings.second); m_pBox->AppendText(Settings.first, Settings.second);
} }
//for (QList<QPair<QString, QString>>::const_iterator I = OldSettings.begin(); I != OldSettings.end(); ++I) //for (QList<QPair<QString, QString>>::const_iterator I = OldSettings.begin(); I != OldSettings.end(); ++I)
// m_pBox->DelValue(I->first, I->second); // m_pBox->DelValue(I->first, I->second);
// //
//for (QList<QPair<QString, QString>>::const_iterator I = NewSettings.begin(); I != NewSettings.end(); ++I) //for (QList<QPair<QString, QString>>::const_iterator I = NewSettings.begin(); I != NewSettings.end(); ++I)
// m_pBox->InsertText(I->first, I->second); // m_pBox->AppendText(I->first, I->second);
m_pBox->SetRefreshOnChange(true); m_pBox->SetRefreshOnChange(true);
m_pBox->GetAPI()->CommitIniChanges();*/ m_pBox->GetAPI()->CommitIniChanges();*/

View File

@ -176,6 +176,7 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
AddIconToLabel(ui.lblStartUp, CSandMan::GetIcon("Start").pixmap(size,size)); AddIconToLabel(ui.lblStartUp, CSandMan::GetIcon("Start").pixmap(size,size));
AddIconToLabel(ui.lblRunBoxed, CSandMan::GetIcon("Run").pixmap(size,size)); AddIconToLabel(ui.lblRunBoxed, CSandMan::GetIcon("Run").pixmap(size,size));
AddIconToLabel(ui.lblStartMenu, CSandMan::GetIcon("StartMenu").pixmap(size,size)); AddIconToLabel(ui.lblStartMenu, CSandMan::GetIcon("StartMenu").pixmap(size,size));
AddIconToLabel(ui.lblDesktop, CSandMan::GetIcon("Monitor").pixmap(size,size));
AddIconToLabel(ui.lblSysTray, CSandMan::GetIcon("Maintenance").pixmap(size,size)); AddIconToLabel(ui.lblSysTray, CSandMan::GetIcon("Maintenance").pixmap(size,size));
AddIconToLabel(ui.lblInterface, CSandMan::GetIcon("GUI").pixmap(size,size)); AddIconToLabel(ui.lblInterface, CSandMan::GetIcon("GUI").pixmap(size,size));
@ -348,6 +349,15 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
connect(ui.chkScanMenu, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged())); connect(ui.chkScanMenu, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
connect(ui.cmbIntegrateMenu, SIGNAL(currentIndexChanged(int)), this, SLOT(OnOptChanged())); connect(ui.cmbIntegrateMenu, SIGNAL(currentIndexChanged(int)), this, SLOT(OnOptChanged()));
connect(ui.cmbIntegrateDesk, SIGNAL(currentIndexChanged(int)), this, SLOT(OnOptChanged())); connect(ui.cmbIntegrateDesk, SIGNAL(currentIndexChanged(int)), this, SLOT(OnOptChanged()));
#ifdef INSIDER_BUILD
connect(ui.chkDeskAutoSwitch, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
connect(ui.chkDeskQuickSwitch, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
#else
ui.lblDesktop->setVisible(false);
ui.chkDeskAutoSwitch->setVisible(false);
ui.chkDeskQuickSwitch->setVisible(false);
#endif
connect(ui.cmbSysTray, SIGNAL(currentIndexChanged(int)), this, SLOT(OnOptChanged())); connect(ui.cmbSysTray, SIGNAL(currentIndexChanged(int)), this, SLOT(OnOptChanged()));
connect(ui.cmbTrayBoxes, SIGNAL(currentIndexChanged(int)), this, SLOT(OnOptChanged())); connect(ui.cmbTrayBoxes, SIGNAL(currentIndexChanged(int)), this, SLOT(OnOptChanged()));
@ -434,7 +444,6 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
connect(ui.chkObjCb, SIGNAL(stateChanged(int)), this, SLOT(OnFeaturesChanged())); connect(ui.chkObjCb, SIGNAL(stateChanged(int)), this, SLOT(OnFeaturesChanged()));
if (CurrentVersion.value("CurrentBuild").toInt() < 14393) // Windows 10 RS1 and later if (CurrentVersion.value("CurrentBuild").toInt() < 14393) // Windows 10 RS1 and later
ui.chkWin32k->setEnabled(false); ui.chkWin32k->setEnabled(false);
//connect(ui.chkForceExplorerChild, SIGNAL(stateChanged(int)), this, SLOT(OnFeaturesChanged()));
//connect(ui.chkWin32k, SIGNAL(stateChanged(int)), this, SLOT(OnFeaturesChanged())); //connect(ui.chkWin32k, SIGNAL(stateChanged(int)), this, SLOT(OnFeaturesChanged()));
m_FeaturesChanged = false; m_FeaturesChanged = false;
connect(ui.chkWin32k, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged())); connect(ui.chkWin32k, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged()));
@ -987,7 +996,12 @@ void CSettingsWindow::LoadSettings()
ui.chkScanMenu->setChecked(theConf->GetBool("Options/ScanStartMenu", true)); ui.chkScanMenu->setChecked(theConf->GetBool("Options/ScanStartMenu", true));
ui.cmbIntegrateMenu->setCurrentIndex(theConf->GetInt("Options/IntegrateStartMenu", 0)); ui.cmbIntegrateMenu->setCurrentIndex(theConf->GetInt("Options/IntegrateStartMenu", 0));
ui.cmbIntegrateDesk->setCurrentIndex(theConf->GetInt("Options/IntegrateDesktop", 0)); ui.cmbIntegrateDesk->setCurrentIndex(theConf->GetInt("Options/IntegrateDesktop", 0));
#ifdef INSIDER_BUILD
ui.chkDeskAutoSwitch->setChecked(theConf->GetBool("Options/AutoDesktopSwitch", true));
ui.chkDeskQuickSwitch->setChecked(theConf->GetBool("Options/QuickDesktopSwitch", true));
#endif
ui.cmbSysTray->setCurrentIndex(theConf->GetInt("Options/SysTrayIcon", 1)); ui.cmbSysTray->setCurrentIndex(theConf->GetInt("Options/SysTrayIcon", 1));
ui.cmbTrayBoxes->setCurrentIndex(theConf->GetInt("Options/SysTrayFilter", 0)); ui.cmbTrayBoxes->setCurrentIndex(theConf->GetInt("Options/SysTrayFilter", 0));
ui.chkCompactTray->setChecked(theConf->GetBool("Options/CompactTray", false)); ui.chkCompactTray->setChecked(theConf->GetBool("Options/CompactTray", false));
@ -996,7 +1010,6 @@ void CSettingsWindow::LoadSettings()
ui.chkMinimize->setChecked(theConf->GetBool("Options/MinimizeToTray", false)); ui.chkMinimize->setChecked(theConf->GetBool("Options/MinimizeToTray", false));
ui.chkSingleShow->setChecked(theConf->GetBool("Options/TraySingleClick", false)); ui.chkSingleShow->setChecked(theConf->GetBool("Options/TraySingleClick", false));
//ui.chkForceExplorerChild->setChecked(strcmp(theAPI->GetGlobalSettings()->GetText("ForceExplorerChild").toStdString().c_str(), theAPI->GetGlobalSettings()->GetText("DefaultBox").toStdString().c_str())==0);
OnLoadAddon(); OnLoadAddon();
bool bImDiskReady = theGUI->IsImDiskReady(); bool bImDiskReady = theGUI->IsImDiskReady();
@ -1773,6 +1786,11 @@ void CSettingsWindow::SaveSettings()
theGUI->SyncStartMenu(); theGUI->SyncStartMenu();
} }
#ifdef INSIDER_BUILD
theConf->SetValue("Options/AutoDesktopSwitch", ui.chkDeskAutoSwitch->isChecked());
theConf->SetValue("Options/QuickDesktopSwitch", ui.chkDeskQuickSwitch->isChecked());
#endif
theConf->SetValue("Options/SysTrayIcon", ui.cmbSysTray->currentIndex()); theConf->SetValue("Options/SysTrayIcon", ui.cmbSysTray->currentIndex());
theConf->SetValue("Options/SysTrayFilter", ui.cmbTrayBoxes->currentIndex()); theConf->SetValue("Options/SysTrayFilter", ui.cmbTrayBoxes->currentIndex());
theConf->SetValue("Options/CompactTray", ui.chkCompactTray->isChecked()); theConf->SetValue("Options/CompactTray", ui.chkCompactTray->isChecked());
@ -1811,7 +1829,7 @@ void CSettingsWindow::SaveSettings()
//WriteTextList("RunCommand", RunCommands); //WriteTextList("RunCommand", RunCommands);
theAPI->GetGlobalSettings()->DelValue("RunCommand"); theAPI->GetGlobalSettings()->DelValue("RunCommand");
foreach(const QString & Value, RunCommands) foreach(const QString & Value, RunCommands)
theAPI->GetGlobalSettings()->InsertText("RunCommand", Value); theAPI->GetGlobalSettings()->AppendText("RunCommand", Value);
} }
if (m_GeneralChanged) if (m_GeneralChanged)