Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Drag-and-Drop within Queue #34

Closed
dayfuaim opened this issue Mar 2, 2021 · 7 comments
Closed

[Feature Request] Drag-and-Drop within Queue #34

dayfuaim opened this issue Mar 2, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@dayfuaim
Copy link

dayfuaim commented Mar 2, 2021

It will be very helpful if this feature will be implemented. :)

Currently if I want to insert some Tracks/Albums in the middle of the Queue, I have to

  1. remove everything after SOME point
  2. insert what I want
  3. then add the removed ones back

It IS not usable/comfortable.

Thanks for your work. :)

@yktoo
Copy link
Owner

yktoo commented Mar 3, 2021

Yes, this is already on my TODO list.

@yktoo yktoo added the enhancement New feature or request label Mar 10, 2021
@imsamuka
Copy link

I tried to do it, how hard could it be? After 8 hours, i couldn't get not even close.
I don't have sufficient experience with GTK yet. Hope someone better can get it done...

@yktoo
Copy link
Owner

yktoo commented Jul 15, 2022

GTK is fairly well documented nowadays, but its Go bindings are a bit of trial-and-error. I had a quick go at the item and immediately stumbled upon the fact the selection gets reset as soon as you press the mouse button.

This behaviour gets circumvented for a right click by simply preventing event propagation, but that might not work for drag-n-drop as it's probably to be initiated during propagation. So I stopped there for now, waiting for the moment the time permits.

@gvegidy
Copy link

gvegidy commented Sep 11, 2022

Having Drag&Drop in the queue would be really nice.

Would it be easier to implement when it is initiated not with a left click&hold, but when you have to hold a modifier key like for example the Alt key and then do your left click, hold and drag?

@yktoo
Copy link
Owner

yktoo commented Sep 15, 2022

@gvegidy This won't change much in terms of complexity of the task. Moreover, click + modifier key is commonly mapped to various actions in DEs (like drag window or extend selection). The standard UX pattern for moving items is a simple click-and-drag.

@michaelmrose
Copy link

Have you considered adding simple cut and paste on the selection? It would presumably be easier to implement presumably. Alternatively one could in linux at least dump the current queue to a playlist and evaluate $EDITOR playlistfile and update when it returns

@yktoo
Copy link
Owner

yktoo commented Aug 6, 2023

Alternatively one could in linux at least dump the current queue to a playlist and evaluate $EDITOR playlistfile and update when it returns

Well this can basically be achieved with a script containing a couple of mpc calls and $EDITOR in between 😁

14mRh4X0r added a commit to 14mRh4X0r/ymuse that referenced this issue Sep 21, 2023
14mRh4X0r added a commit to 14mRh4X0r/ymuse that referenced this issue Sep 21, 2023
14mRh4X0r added a commit to 14mRh4X0r/ymuse that referenced this issue Sep 21, 2023
The easiest way to implement this is to harness GtkTreeView's
reorderable property. However, this doesn't work with
GtkTreeModelFilter, so the TreeView's model gets switched based on
whether filtering is active.

To facilitate reordering, I added playlist position as a column, so when
the row data gets inserted in the new position, I can use the TreePath
(row index) and pos column as move target and source, respectively.
14mRh4X0r added a commit to 14mRh4X0r/ymuse that referenced this issue Sep 21, 2023
The easiest way to implement this is to harness GtkTreeView's
reorderable property. However, this doesn't work with
GtkTreeModelFilter, so the TreeView's model gets switched based on
whether filtering is active.

To facilitate reordering, I added playlist position as a column, so when
the row data gets inserted in the new position, the TreePath (row index)
and pos column can be used as move target and source, respectively.

After issuing the move command, the playlist status will change and
update the queue with the new positions.
@yktoo yktoo closed this as completed in f9d9ab2 Oct 3, 2023
yktoo added a commit that referenced this issue Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants