• Development
  • [Feature Request] Drag&Drop import for songs into service list (Windows)

OpenLP is great - but it should be easier to import new songs.<br><br>I don't know about other operating systems but in the Windows version it is not possible to simply drop a song.txt oder song.usr into the service list.<br><br>Is this feature hard to accomplish?<br>

Are you saying you want to skip the Media Manager entirely and put the song right into the Service Manager? As for importing new songs into the Media Manager's Song tab it is very easy using File&gt;Import&gt;Song.

Tomlikesfree, yes you got it! :-)<br><br>It would be great if the import dialog would pop up if I Drag&amp;Drop something into the service list. If I do so now it looks like there is such a function (plus sign on cursor) available - but nothing happens. That's confusing.<br>

I think it's common for someone adding songs, to add a group of songs, in other words go to Sing Select, grab say the 5 songs for the service, then add them as a group.&nbsp; Drag and drop into the media manager's song list would be nice.&nbsp; I don't know how well the GUI tool that OpenLP uses (IIRC it's wxWidgets, produces a common interface to Drag and Drop, across platforms.&nbsp; I know that MS Windows, Gnome, KDE, and Motif all use different mechanisms to Implement drag and drop,&nbsp; I'm not even sure Motif offers Drag and Drop, and some of the light weight windowing tool kits may not do it either. <br><br>

  1. question to answer: Which GUI tool OpenLP uses in windows version?

A quick answer.... OpenLP uses Qt4 on all platforms.

Answer to the question "How do I add support for this feature in my own Qt application?" - http://stackoverflow.com/questions/14895302/qt-drag-drop-add-support-for-dragging-files-to-the-applications-main-window<br><br>"<b>Qt supports native drag and drop on all platforms</b> via an extensible MIME-based system that enables applications to send data to each other in the most appropriate formats." http://qt-project.org/doc/qt-4.8/examples-draganddrop.html<br><br>Drag and Drop in PyQt4 - http://zetcode.com/gui/pyqt4/dragdrop/<br><h1><font size="2"><br></font></h1><br>

There's a lot more behind the scenes than just a toolkit's support for drag and drop. Besides, how must OpenLP know what file you're importing? Is it an EasyWorship database? An OpenLyrics file?<br><br>The "drop" indicator you are seeing is because you can drag and drop songs and Bible verses and things from the media manager into the service as an alternative to clicking on the "add" button.<br>

Raoul, I was hoping that OpenLP knows if a drag&amp;drop comes from inside or outside the application.<br><br>It is misleading that there's a "drop" indicator but no action if I drag&amp;drop something into OpenLP from another application.<br><br>You are right. OpenLP can't easily "know" which file type is droped - but I would be nice if the OpenLP would open an that drop action.<br><br>Use case: I want to add a new song to the service list that's not in my database.<br><br>Now: I have to add it to the database first and the search the database and add the song to the service list.<br><br>Wish: I drop that song onto the service list and the import dialog opens. The dropped file is preselected and I only have to choose the correct file type. After that the song is not only added to my database but also added to the service list! :-)<br>