qt: some important playlist dialog fixes
qt: when possible segregate playlists in playlist dialog
Currently the interface only provides "video" and "audio"
playlists. Mixed playlists don't seem to be presented.
This is something that can be handled trivially with drag
and drop case.
Adding to playlist action in context menu is more of a
problem, because in that case there is no specific open
playlist view that we can pick as the target.
I'm not sure what is the best behavior with regard to
the latter situation, but I assume we need to segregate
there too, because if the user can not make use of a
mixed playlist, there is no point creating them or
appending media.
I followed a naive approach, simply used `showPlayAsAudioAction`.
However, it could be possible to:
- If there is a single item, check if it is audio or video, and
pick the appropriate type playlist.
- If there are multiple items, always pick `PLAYLIST_TYPE_ALL`.
- If there are multiple items, iterate through all items, and
if all of them are the same, pick the appropriate playlist
(i.e. video, or audio playlist), if there are different type
of items, pick `PLAYLIST_TYPE_ALL`.
qt: make `PlaylistsDialog` no longer a singleton
Dialogs that carry the state of their initiators
should not be singleton. In this case, this dialog
always needs some sort of media to be functional.
This is already the case with the media info
dialog, for example, current media info dialog
is a singleton but media info dialog of a specific
media is not.
Since this dialog is always tied to some specific
media, I see no point of this being a singleton.
Its title suggests that this dialog is only meant
to be used for adding items to an existing or new
playlist.
Asynchronousity is also a problem when it is a
singleton, what happens if the user wants to add
items before the previous (asynchronous) addition
is not complete yet?
qt: derive `PlaylistsDialog` from `QVLCDialog` instead of `QVLCFrame`
Self-explanatory. It is not clear why this did not derive from `QVLCDialog` in the first place.
qt: remove `QVLCDialog::keyPressEvent()`
- `QDialog` already handles this.
- The implementation is not correct here,
enter key should accept the dialog. It is
also not clear why a dialog specific `reject()`
is not called when encountering escape key.
Request review @chub.