By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 985

Summary: tdesu: remove the "ignore" button
Product: TDE Reporter: Francois Andriot <albator78>
Component: tdebaseAssignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: enhancement CC: albator78, bugwatch, darrella, slavek.banko
Priority: P5    
Version: R14.0.0 [Trinity]   
Hardware: All   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: kdesu: removes "ignore" button from popup window
Updated patch for pre R14 GIT
Patch to cleanup ignore button remnants
Patch to remove Ignore button remnants
tdelibs patch to rename KDEsuClient/KDEsuDialog -> TDEsuClient/TDEsuDialog
tdebase patch to rename KDEsuClient/KDEsuDialog -> TDEsuClient/TDEsuDialog
Patch to restore the Ignore button but set the default to not showing the button
tdebase : Restore Ignore button in tdesu, but set default to not showing
tdebase : Restore Ignore button in tdesu, but set default to not showing (2)
tdebase: Restore Ignore button in tdesu, but set default to not showing (3)

Description Francois Andriot 2012-05-03 16:59:03 CDT
Created attachment 596 [details]
kdesu: removes "ignore" button from popup window

Hello, in kdebase is provided the "kdesu" utility.
This utility shows a graphical popup that prompts for root password, in order to execute a command as root.

What I would expect from such a popup is 2 actions buttons: OK and CANCEL.
But there is also a 3rd button which is labelled "IGNORE".

When using the button "IGNORE", the command you wanted to execute as root is then executed as normal user. In 99% of the case, this results in an error message displayed by the application itself. 
The problem is that this error message is application dependant and may be unclear.

I do not understand the point of having such "IGNORE" option. If I want to run a command as normal user, I run it as normal user. If I want to run it as root user, I run it with kdesu.

So I propose the attached patch to simply remove the 3rd button on the kdesu dialog box.
Comment 1 Darrell 2012-05-04 11:14:30 CDT
I too never understood the purpose of the Ignore button. I wonder whether there is some oddball corner case that button serves.

With that said, there is a command line option (noignorebutton) to not show the Ignore button. Perhaps another solution is to edit the global desktop files and add that option?

Or perhaps, we change the default "bool withIgnoreButton=false" -> "bool withIgnoreButton=true" and change the command line option noignorebutton -> showignorebutton?
Comment 2 Darrell 2013-04-11 13:37:59 CDT
Created attachment 1152 [details]
Updated patch for pre R14 GIT

I have a patch for pre R14 GIT.

Tim, Slavek,

Do you object to pushing this patch? The only thing changed is the Ignore button disappears along with appropriate text changes in the dialog. I tested here with GIT and saw no problems.

Speak now or forever hold your peace. :)
Comment 3 Darrell 2013-04-23 09:20:24 CDT
No adverse comments received. Patch for GIT pushed in commit da9d48c4.

I do not see this bug report in the 3.5.13.2 etherpad list. Therefore I am closing this report as resolved.
Comment 4 Darrell 2013-11-07 11:58:20 CST
I am reopening this bug report. We removed the button from the dialog, but further cleanup is required.

* The tdesu --help text should be updated.

* There remains code remnants referring to the Ignore button.

* In the code the class KDEsuDialog should be updated to TDEsuDialog. Seems to make sense considering the entire kdesu scheme was renamed to tdesu.
Comment 5 Darrell 2013-11-07 13:15:59 CST
Created attachment 1596 [details]
Patch to cleanup ignore button remnants

The attached patch works for me. Please test!
Comment 6 Darrell 2013-11-07 16:51:24 CST
Created attachment 1599 [details]
Patch to remove Ignore button remnants

I reworked my initial patch into three patches.

The first patch removes the Ignore button remnants.

The second two patches affect tdelibs and tdebase by renaming the KDEsuClient and KDEsuDialog classes to TDEsuClient and TDEsuDialog respectively. These patches add consistency with the overall kdesu->tdesu renaming.
Comment 7 Darrell 2013-11-07 16:52:33 CST
Created attachment 1600 [details]
tdelibs patch to rename KDEsuClient/KDEsuDialog -> TDEsuClient/TDEsuDialog
Comment 8 Darrell 2013-11-07 16:53:05 CST
Created attachment 1601 [details]
tdebase patch to rename KDEsuClient/KDEsuDialog -> TDEsuClient/TDEsuDialog
Comment 9 Slávek Banko 2013-11-09 09:30:22 CST
I have another suggestion. Leave option to show ignore button, but the reverse switch sense - instead noignorebutton give option ignorebutton. By default, the ignore button would be disabled and only applications that want to allow ignoring the switch to administrator mode, would request to show ignore button.

What do you think?
Comment 10 Darrell 2013-11-09 11:55:05 CST
>What do you think?

I'm fine with that. The new patch needs to revert commit da9d48c4 that removed the button from the dialog. We don't need to revert the commit manually, just revert the code in the new patch.

Side note: For naming consistency, can we push the two patches that rename KDEsuClient/KDEsuDialog -> TDEsuClient/TDEsuDialog. Those patches do not affect how we handle the Ignore button.
Comment 11 Darrell 2013-11-09 17:46:45 CST
>Side note: For naming consistency, can we push the two patches that rename
>KDEsuClient/KDEsuDialog -> TDEsuClient/TDEsuDialog. Those patches do not affect
>how we handle the Ignore button.
I moved those patches to bug 1707. Less confusing. :-)
Comment 12 Darrell 2013-11-19 21:33:10 CST
Created attachment 1646 [details]
Patch to restore the Ignore button but set the default to not showing the button

This latest patch restores the Ignore button removed previously in commit da9d48c4.

The previous option of --noignorebutton is changed to --ignorebutton. To display the Ignore button in the tdesu dialog requires explicitly using the renamed --ignorebutton option.

'tdesu kate' opens the tdesu dialog with no Ignore button
'tdesu --ignorebutton kate' opens the tdesu dialog with an Ignore button

That said, I still have no idea what purpose the Ignore button actually serves, as opposed to just using the Cancel button.
Comment 13 Darrell 2013-11-20 12:56:49 CST
Francois, as originator of this report, would you please test the latest patch and confirm the patch satisfies your original intent? Thank you. :-)
Comment 14 Slávek Banko 2013-11-20 13:17:01 CST
Created attachment 1652 [details]
tdebase : Restore Ignore button in tdesu, but set default to not showing

Darrell, thank you for preparing the patch.

I believe that the change from noignorebutton to ignorebutton in the media / halbackend is not desirable - removed from updated patch. Next to this I made a adjustment for "prompt" to reflect the presence of Ignore button.

Updated patch attached.
Comment 15 Francois Andriot 2013-11-20 14:25:21 CST
Created attachment 1653 [details]
tdebase : Restore Ignore button in tdesu, but set default to not showing (2)

Missing } causing FTBFS.
Modified patch is attached.
Not yet tested.
Comment 16 Darrell 2013-11-20 14:29:18 CST
Created attachment 1654 [details]
tdebase: Restore Ignore button in tdesu, but set default to not showing (3)

Slavek,

Thank you for updating the patch. I had noticed the prompt problem too. I was in the middle of fixing the prompt when you uploaded your patch. :-)

I added a missing "}" to the latest patch. Otherwise the package would not build. Updated patch attached.

With the latest patch everything functions as expected.
Comment 17 Francois Andriot 2013-11-20 14:33:33 CST
Yes I confirm it is working correctly now.
Comment 18 Slávek Banko 2013-11-20 14:34:03 CST
Guys, great collaboration! I myself am not test a patch => went straight "out of the pen". Thank you both for your quick fix.

I assume that the patch I can include in my queue to commit?
Comment 19 Darrell 2013-11-20 14:34:36 CST
Sigh. :-(

Francois, I'm sorry. You updated the patch a second or two before me. I had just loaded this web page and did not see your comment. I then proceeded to attach my updated patch. When the web page updated I saw your comment.

The patches are the same. I removed my updated patch. :-)

Anyway, please test. All looks well here.
Comment 20 Darrell 2013-11-20 14:35:10 CST
Man, bugzilla really sucks at times. Looks like we crossed posts again!
Comment 21 Darrell 2013-11-20 14:35:45 CST
>I assume that the patch I can include in my queue to commit?
Please! Let's get this out of the way! :-)
Comment 22 Slávek Banko 2013-11-20 20:58:20 CST
Pushed to GIT in hash 266a2501.