Summary: | Dialog window "create new fodler-file" don't have "clear name" button | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Anthony Renoux <anthony.renoux> |
Component: | general | Assignee: | Peter Penz <peter.penz19> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | faure, frank78ac |
Priority: | NOR | Keywords: | investigated |
Version: | 16.12.2 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.6.2 | |
Sentry Crash Report: | |||
Attachments: | Dialog box when you create a new folder |
Thanks for the bug report! It seems that the clear button got lost in commit 036763641a1669c2673cbc929aef6a82a41ef843 (the old code used KInputDialog::getText(), which enables the clear button). To bring it back, something like lineEdit->setClearButtonShown(true); needs to be added to KNewFileMenu::createDirectory(). @David: is it OK if I do that in master and 4.6? Sure, that's a no-brainer. *** Bug 266720 has been marked as a duplicate of this bug. *** Git commit 85878a6acfb5f03ec06f58340296582ba9aab7e3 by Frank Reininghaus. Committed on 18/03/2011 at 13:17. Pushed by freininghaus into branch 'KDE/4.6'. KNewFileMenu: Add clear buttons to dialogs asking for a name This commit adds a clear button to the KLineEdits in the dialogs that ask the user for a file or folder name when a file or folder is to be created. Note that the KLineEdit text is set after the clear button is enabled. If it is done the other way around, the clear button is not shown initially. BUG: 267581 FIXED-IN: 4.6.2 M +16 -2 kfile/knewfilemenu.cpp http://commits.kde.org/kdelibs/85878a6acfb5f03ec06f58340296582ba9aab7e3 Git commit 8342a2e206c65885015164da59538212f093bedf by Frank Reininghaus. Committed on 18/03/2011 at 13:17. Pushed by freininghaus into branch 'master'. KNewFileMenu: Add clear buttons to dialogs asking for a name This commit adds a clear button to the KLineEdits in the dialogs that ask the user for a file or folder name when a file or folder is to be created. Note that the KLineEdit text is set after the clear button is enabled. If it is done the other way around, the clear button is not shown initially. CCBUG: 267581 FIXED-IN: 4.6.2 (cherry picked from commit 85878a6acfb5f03ec06f58340296582ba9aab7e3) M +16 -2 kfile/knewfilemenu.cpp http://commits.kde.org/kdelibs/8342a2e206c65885015164da59538212f093bedf It turned out that just adding "lineEdit->setClearButtonShown(true);" wasn't enough - the clear button was not shown initially in that case, but only after clearing the line edit and then entering some new text (clicking the invisible clear button was possible though). It seems that KLineEdit's clear button only works if the text is set *after* the button is enabled, which means that the text cannot be set in the constructor. I've worked around this and added a comment about that, but I promise to either look at KLineEdit's code and try to find a fix for that within the next week or file a new bug report and add a reference to that report to the TODO comment in KNewFileMenu. Just for the record: The KLineEdit issue is a regression since KDE 4.5 (actually, Anthony already noted that in the original report). Thanks to git bisect, it was quite easy to find out the bad commit: https://projects.kde.org/projects/kde/kdelibs/repository/revisions/ab3b5ed72c27ed83bffdfa753a84938df63dde4c I've filed a new report about the KLineEdit issue: bug 268898. Ups, I just noticed that I reopened the report accidentally with one of my comments. |
Created attachment 57654 [details] Dialog box when you create a new folder Version: unspecified (using KDE 4.6.0) OS: Linux When you create a new folder or file in dolphin, there no "clear button" to remove text in the dialog box.In KDE SC 4.5, the button is not show but work when you click on the rigth of the dialog box. Dialog box should be like in the attachment. Reproducible: Always