New comment posted

noreply at kde.org noreply at kde.org
Fri Sep 9 09:08:10 UTC 2016


# A new comment has been posted on "KDE Frameworks 5"

Topic     : KWidgetsAddons - KMessageWidget Class Reference (https://commenting.kde.org/admin/topics/13)
Name      : René Bertin
Email     : rjvbertin at gmail.com
IP        : 86.192.231.202
User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.101 Safari/537.36
Referer   : https://api.kde.org/frameworks/kwidgetsaddons/html/classKMessageWidget.html

This widget will be used (from 5.27.0 onward) in KTextEditor to replace the modal dialog that popped up to warn the user when a file has changed on disk. I'm apparently not the only one to have some doubts about that (https://kate-editor.org/2016/09/07/embedded-notifications-for-externally-modified-files/#comment-2255)

I had a quick glance at this API documentation, I didn't see if

- the widget can "steal" focus without risking to dismiss it by accident (e.g. with the Space bar). You'd want such a feature if a document with unsaved changes changes on disk. I think it's good to force the user to take action ASAP in that case; continuing to introduce changes isn't so productive, but ongoing typing shouldn't cause the message to be accepted or cancelled.

- the widget can easily be dismissed programmatically. For instance, if a file without unsaved edits also changes on disk, an application might simply reload it and put up a notice. That notice could then be dismissed automatically when the user saves the file (because it would no longer be valid). In that case there's no need to force the user to remove the widget.

- the widget can be put up for a given duration.

Not that those 3 features cannot be implemented in a subclass, of course.


More information about the Api-comments mailing list