Re: [jokosher-devel] [PATCH] for ticket #26 (Moving instruments)
- From: Laszlo Pandy <laszlok2 gmail com>
- To: Jens Geiregat <jens geiregat gmail com>
- Cc: jokosher-devel-list gnome org
- Subject: Re: [jokosher-devel] [PATCH] for ticket #26 (Moving instruments)
- Date: Sun, 06 Aug 2006 23:17:03 -0400
Jens Geiregat a écrit :
On 8/5/06, Jono Bacon <jonobacon gmail com> wrote:
On 8/5/06, Jens Geiregat <jens geiregat gmail com> wrote:
> Thx! I'll look into URI dnd as soon as I can. :-)
Awesome. The patch you gave us is fantastic! Keep up the great work!! :)
Jono
Some questions about uri-dnd:
- When importing an audio file (through the menu), the user can choose
to copy the file to the project audio directory. Should Jokosher
display a yes/no (or 'Copy', 'Use original') dialog when dropping?
I agree with Aq. Default should be to copy it to the audio directory.
- I wrote support for dragging multiple files at once to Jokosher.
Atm, it just imports them right after eachother (import the first one,
"start += duration", import the seconde one, ...). Is this the 'right'
way to handle multiple files?
I have already implemented a method that does this in event. It is
currently used for moving events (to make sure they never overlap), and
when pasting events onto instruments. Here is how it works:
1. Add a new event to instrument.events.
2. Make sure event.start value and event.duration value have been set.
3. Call event.MoveButDoNotOverlap(desired_start_position). This will
start at the desired_start_position and continue forward from there. It
will then set event.start to the first position it finds where the event
does not overlap with any other event.
Excerpt from Instrument.py:
def addEventFromEvent(self, start, event):
...
self.events.append(e)
e.SetProperties()
e.MoveButDoNotOverlap(e.start)
...
And then this will work better than just putting them at start +=
duration because calling MoveButDoNotOverlap() will avoid overlaps with
events that are already present on that instrument.
- What to do with 'bad' file-uri's? (http:// in stead of file://,
trying to import a .txt, ...)
Just ignore them and tell the status bar to display "could not import
file(s): %s".
Laszlo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]