Version: 4.2.1 (using KDE 4.6.0) OS: Linux Snippet names can, for good reasons, not have spaces or other characters in it. That said, if you don't know that, you enter a name with a space, say "loop over all cells" into the field for the name and what happens is that the "OK" button get grayed out and becomes inactive. That's confusing because there is no indication *why* I can't hit OK. A better solution would be to either - allow the user to hit OK but then give an error message that says what the problem is, or - as the user types the name of the snippet and enters a disallowed character, have some text in red pop up and say that you can't do that; that shouldn't be too hard since apparently there is a function that monitors the text anyway and disables the "OK" button as soon as I enter a wrong character. Thanks W. Reproducible: Always
true
Please add the 'junior-jobs' keyword to JJs, in addition to (or instead of) editing the subject.
Created attachment 64121 [details] Patch for bug 274299 Hello, This is my first submission to any FOSS project. Please let me know if it meets the standards. Thank You!
Sorry for the delay Sudeep. I'd like to prevent using yet another dialog here to show that error message. Could you try to use KMessageWidget instead? See: http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKMessageWidget.html Also please use git.reviewboard.kde.org to upload the patch for review. Thanks!
Hi, I just submitted a patch using a KMessageWidget for review: https://git.reviewboard.kde.org/r/103904/
Git commit a414f42a9d1f2b08fcd08d8c39a7759657eeb684 by Milian Wolff, on behalf of Ghislain MARY. Committed on 09/02/2012 at 17:40. Pushed by mwolff into branch 'master'. show explanation on failed snippet name validation Show a warning message in a KMessageWidget if a space character is entered in the snippet name line edit. REVIEW: 103904 M +7 -0 plugins/snippet/editsnippet.cpp M +13 -0 plugins/snippet/editsnippet.ui http://commits.kde.org/kdevplatform/a414f42a9d1f2b08fcd08d8c39a7759657eeb684
Re-Open since the commit was reverted as it broke compilation on KDE 4.6 and older which is still a supported platform for KdevPlatform.
Git commit c85f3a550ce03a1068a55743f1c8a78e03b0de3c by Kevin Funk, on behalf of Ghislain Mary. Committed on 17/05/2013 at 08:38. Pushed by kfunk into branch 'master'. Explanation on failed snippet name validation Show a warning message in a KMessageWidget if a space character is entered in the snippet name line edit. TODO: Apply to kate/part/snippets as well REVIEW: 103904 M +7 -0 plugins/snippet/legacy/editsnippet.cpp M +13 -0 plugins/snippet/legacy/editsnippet.ui http://commits.kde.org/kdevplatform/c85f3a550ce03a1068a55743f1c8a78e03b0de3c
Git commit 15420d6c16b81e6792074d56b7443c68774cf85a by Kevin Funk. Committed on 17/05/2013 at 08:42. Pushed by kfunk into branch 'master'. Explanation on failed snippet validation Forward port of: https://git.reviewboard.kde.org/r/103904. REVIEW: 110481 M +7 -0 part/snippet/editsnippet.cpp M +13 -0 part/snippet/editsnippet.ui http://commits.kde.org/kate/15420d6c16b81e6792074d56b7443c68774cf85a