When a clear action is performed on the playlist, the user might lose valuable work. Add the possibility to undo this operation via passive notification. Keep it simple by allowing only one undo and no redo.
Description
Details
- Differential Revisions
- D19610: Allow to undo the clear actions on the playlist
Related Objects
Hi !
I am new here and I am very motivated to invest !
I am quite a beginner on this technology, but this task looks good to discover the code ?
Thank you
Hello
I am new here and I am very motivated to invest !
Welcome to the Elisa project !
I am quite a beginner on this technology, but this task looks good to discover the code ?
Yes, feel free to ask if you have questions.
Thank you
Best regards
Hi !
Thank you, I have indeed a few questions after a first look at the code :
- to open a qml file with qt creator (if you use this editor), the qml module for elisa is not found : "import org.kde.elisa 1.0" . Do you know how to configure this module in qt creator ?
- In the description, what does "passive notification" means ? Does it mean the system notification with a question and a choice ? In this case do you have an example of implementation in another project ?
- I did a first try where I could restore the playlist and the song in the player. Do I need to restore the position of the player as well ?
All the best
Hi,
Finally, I could use KNotification to generate on the clear action a system notification with an undo choice (the file elisa.notifyrc may be particular for the packaging, KNotificationGlobalConfigFile).
I pushed my changes on my forked repo, branch T5376 : jeje42_T5376 .
I tried to be as generic as possible on the function MediaPlayList::undoClearPlayList .
Best,
Jerome
Hello,
Sorry, I had missed your questions,
Yes, the problem comes from the fact that this qml module is done in c++. This page has information about:
https://doc.qt.io/qt-5/qtqml-modules-qmldir.html#writing-a-qmltypes-file
I do not remember if it would be possible to have it generated by cmake always.
- In the description, what does "passive notification" means ? Does it mean the system notification with a question and a choice ? In this case do you have an example of implementation in another project ?
By that, I mean a notification shown inside Elisa main window and that do not block the user from doing its task.
- I did a first try where I could restore the playlist and the song in the player. Do I need to restore the position of the player as well ?
This is indeed a good question. I would say probably not except if it is easily done. At least, we have to help an user mistakenly clearing a playlist. If we can be even better, this is good.
All the best
Hello,
Sorry to have missed your first questions.
I am not sure we want a notification done with KNotification outside of the main Elisa window. That would somehow cut the link between the application the user is interacting with and the action to perform.
Could you try to push a review using phabricator ?
I believe this page explains how to do it: https://community.kde.org/Infrastructure/Phabricator
I tried to be as generic as possible on the function MediaPlayList::undoClearPlayList .
Best,
Jerome
Best regards and thanks for your work
Hi,
Thank you for your replies, I could push a diff: https://phabricator.kde.org/D19610 . I tried to follow the instructions as much as possible :)
I could finally restore the player position, like it is done when the persistent state is restored when the application starts up.
Best regards