| Summary: | [Regression] Cannot change advanced permissions with tdesu konqueror | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Darrell <darrella> |
| Component: | tdebase | Assignee: | Michele Calgaro <michele.calgaro> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | bugwatch, darrella, kdevel, michele.calgaro, update |
| Priority: | P5 | ||
| Version: | R14.0.x [Trinity] | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Bug Depends on: | |||
| Bug Blocks: | 3180 | ||
|
Description
Darrell
2015-02-19 17:16:26 CST
I found this problem still in R14.0.8 for all users.
It is triggered, if you select only one file and than open the properties dialog.
In this case the dialog OK button is never enabled.
The root cause is in the file
tdeio/tdefile/kpropertiesdialog.cpp (R14.0.8)
In Line 2163 the button is disabled if "allDisable" is true.
This is only set to false in line 2100, if aPartialPermissions is true
I assume, this is never the case for only one file...
Changing the else tree to set allDisable to false, if we are allowed to change the permissions of one selected file gives the expected behaviour for me.
The output of diff -c for my change results in:
diff -c kpropertiesdialog.cpp.orig kpropertiesdialog.cpp
*** kpropertiesdialog.cpp.orig 2020-06-25 19:08:59.319937119 +0200
--- kpropertiesdialog.cpp 2020-04-30 18:08:21.340400763 +0200
***************
*** 2101,2109 ****
}
cb->setNoChange();
}
! else if (d->cbRecursive && d->cbRecursive->isChecked())
cb->setTristate();
!
cb->setEnabled( d->canChangePermissions );
gl->addWidget (cb, row+2, col+1);
switch(col) {
--- 2101,2113 ----
}
cb->setNoChange();
}
! else
! {
! if( d->canChangePermissions )
! allDisable = false;
! if (d->cbRecursive && d->cbRecursive->isChecked())
cb->setTristate();
! }
cb->setEnabled( d->canChangePermissions );
gl->addWidget (cb, row+2, col+1);
switch(col) {
Maybe this fix helps someone.
I found this problem still in R14.0.8 for all users.
It is triggered, if you select only one file and than open the properties dialog.
In this case the dialog OK button is never enabled.
The root cause is in the file
tdeio/tdefile/kpropertiesdialog.cpp (R14.0.8)
In Line 2163 the button is disabled if "allDisable" is true.
This is only set to false in line 2100, if aPartialPermissions is true
I assume, this is never the case for only one file...
Changing the else tree to set allDisable to false, if we are allowed to change the permissions of one selected file gives the expected behaviour for me.
The output of diff -c for my change results in:
diff -c kpropertiesdialog.cpp.orig kpropertiesdialog.cpp
*** kpropertiesdialog.cpp.orig 2020-06-25 19:08:59.319937119 +0200
--- kpropertiesdialog.cpp 2020-04-30 18:08:21.340400763 +0200
***************
*** 2101,2109 ****
}
cb->setNoChange();
}
! else if (d->cbRecursive && d->cbRecursive->isChecked())
cb->setTristate();
!
cb->setEnabled( d->canChangePermissions );
gl->addWidget (cb, row+2, col+1);
switch(col) {
--- 2101,2113 ----
}
cb->setNoChange();
}
! else
! {
! if( d->canChangePermissions )
! allDisable = false;
! if (d->cbRecursive && d->cbRecursive->isChecked())
cb->setTristate();
! }
cb->setEnabled( d->canChangePermissions );
gl->addWidget (cb, row+2, col+1);
switch(col) {
Maybe this fix helps someone.
Hi Steff, can you please try the solution proposed here: https://mirror.git.trinitydesktop.org/gitea/TDE/tdelibs/pulls/139 It is a slightly diffefernt version than the one you proposed but should have the same effect I believe. Hi Michele,
I have tested your patch and it worked as expected. Pulling out the
if( d->canChangePermissions ) clause from the enclosing if clause is the cleaner solution. Maybe you can remove the extra {} around cb->setTristate() in line 2107.
Thanks again for your attention.
Best
Steff
Merged into master code and backported into R14.0.x branch as well. Thanks for highlighting this bug Steff. > Maybe you can remove the extra {} around cb->setTristate() in line 2107. That was actually added on purpose. We are slowly working on a code format style for TDE, so that is in line with that. More info here is needed: https://mirror.git.trinitydesktop.org/gitea/TDE/tde/wiki/Code-formatting-style-discussion |