This commit is contained in:
DavidXanatos 2023-04-09 12:26:16 +02:00
parent 9f2464f7d1
commit a92ebf56d9
2 changed files with 21 additions and 3 deletions

View File

@ -12,6 +12,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [1.8.5 / 5.63.5] - 2023-04-??
### Fixed
- fixed issue with group renaming in the sandman UI [#2804](https://github.com/sandboxie-plus/Sandboxie/issues/2804)
## [1.8.4 / 5.63.4] - 2023-04-07 ## [1.8.4 / 5.63.4] - 2023-04-07
### Added ### Added
@ -185,6 +191,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
-- Note: these can only be changed when the box is empty -- Note: these can only be changed when the box is empty
- added new file migration option page with additional settings - added new file migration option page with additional settings
- added SBIE2113/SBIE2114/SBIE2115 message to indicate when files are not migrated due to presets - added SBIE2113/SBIE2114/SBIE2115 message to indicate when files are not migrated due to presets
- added 'NoParallelLoading=y' to disable parallel loading of dlls to debug loader issues
### changed ### changed
- moved SeparateUserFolders checkbox from global settings to per box options - moved SeparateUserFolders checkbox from global settings to per box options

View File

@ -33,13 +33,20 @@ public:
class ProgramsDelegate : public QStyledItemDelegate { class ProgramsDelegate : public QStyledItemDelegate {
public: public:
ProgramsDelegate(COptionsWindow* pOptions, QTreeWidget* pTree, int Column, QObject* parent = 0) : QStyledItemDelegate(parent) { m_pOptions = pOptions; m_pTree = pTree; m_Column = Column; } ProgramsDelegate(COptionsWindow* pOptions, QTreeWidget* pTree, int Column, QObject* parent = 0) : QStyledItemDelegate(parent) {
m_pOptions = pOptions;
m_pTree = pTree;
m_Column = (m_Group = (Column == -2)) ? -1 : Column;
}
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const { virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const {
QTreeWidgetItem* pItem = ((QTreeWidgetHacker*)m_pTree)->itemFromIndex(index); QTreeWidgetItem* pItem = ((QTreeWidgetHacker*)m_pTree)->itemFromIndex(index);
if (!pItem->data(index.column(), Qt::UserRole).isValid()) if (!pItem->data(index.column(), Qt::UserRole).isValid())
return NULL; return NULL;
if(m_Group && !pItem->parent()) // for groups use simple edit
return QStyledItemDelegate::createEditor(parent, option, index);
if (m_Column == -1 || pItem->data(m_Column, Qt::UserRole).toInt() == COptionsWindow::eProcess) { if (m_Column == -1 || pItem->data(m_Column, Qt::UserRole).toInt() == COptionsWindow::eProcess) {
QComboBox* pBox = new QComboBox(parent); QComboBox* pBox = new QComboBox(parent);
pBox->setEditable(true); pBox->setEditable(true);
@ -115,7 +122,9 @@ public:
if (pEdit) { if (pEdit) {
QTreeWidgetItem* pItem = ((QTreeWidgetHacker*)m_pTree)->itemFromIndex(index); QTreeWidgetItem* pItem = ((QTreeWidgetHacker*)m_pTree)->itemFromIndex(index);
pItem->setText(index.column(), pEdit->text()); pItem->setText(index.column(), pEdit->text());
pItem->setData(index.column(), Qt::UserRole, pEdit->text()); QString Value = pEdit->text();
if (m_Group) Value = "<" + Value + ">";
pItem->setData(index.column(), Qt::UserRole, Value);
} }
} }
@ -123,8 +132,10 @@ protected:
COptionsWindow* m_pOptions; COptionsWindow* m_pOptions;
QTreeWidget* m_pTree; QTreeWidget* m_pTree;
int m_Column; int m_Column;
bool m_Group;
}; };
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// COptionsWindow // COptionsWindow
@ -411,7 +422,7 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& pBox, const QStri
connect(ui.btnAddProg, SIGNAL(clicked(bool)), this, SLOT(OnAddProg())); connect(ui.btnAddProg, SIGNAL(clicked(bool)), this, SLOT(OnAddProg()));
connect(ui.btnDelProg, SIGNAL(clicked(bool)), this, SLOT(OnDelProg())); connect(ui.btnDelProg, SIGNAL(clicked(bool)), this, SLOT(OnDelProg()));
connect(ui.chkShowGroupTmpl, SIGNAL(clicked(bool)), this, SLOT(OnShowGroupTmpl())); connect(ui.chkShowGroupTmpl, SIGNAL(clicked(bool)), this, SLOT(OnShowGroupTmpl()));
ui.treeGroups->setItemDelegateForColumn(0, new ProgramsDelegate(this, ui.treeGroups, -1, this)); ui.treeGroups->setItemDelegateForColumn(0, new ProgramsDelegate(this, ui.treeGroups, -2, this));
connect(ui.treeGroups, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(OnGroupsChanged(QTreeWidgetItem *, int))); connect(ui.treeGroups, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(OnGroupsChanged(QTreeWidgetItem *, int)));
// //