Fwd: [Rosegarden-bugs] SF.net SVN: rosegarden:[11061] trunk/rosegarden/src/gui

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown Fwd: [Rosegarden-bugs] SF.net SVN: rosegarden:[11061] trunk/rosegarden/src/gui

by cannam :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm not in a position to try it out right now, but is this perhaps the
answer to the problems that Ilan was experiencing (discussed off-list)
with inserting audio files?

(Ilan, are you subscribed to the -bugs list?)


Chris


---------- Forwarded message ----------
From:  <emrum@...>
Date: Sun, Oct 18, 2009 at 7:21 PM
Subject: [Rosegarden-bugs] SF.net SVN: rosegarden:[11061]
trunk/rosegarden/src/gui
To: rosegarden-bugs@...


Revision: 11061
         http://rosegarden.svn.sourceforge.net/rosegarden/?rev=11061&view=rev
Author:   emrum
Date:     2009-10-18 18:21:53 +0000 (Sun, 18 Oct 2009)

Log Message:
-----------

You can drop Audiofiles on the TrackEditor now, from AudioFileManager
and PlayList

Modified Paths:
--------------
   trunk/rosegarden/src/gui/application/RosegardenMainViewWidget.cpp
   trunk/rosegarden/src/gui/dialogs/AudioManagerDialog.cpp
   trunk/rosegarden/src/gui/editors/segment/TrackEditor.cpp
   trunk/rosegarden/src/gui/editors/segment/compositionview/CompositionModelImpl.cpp

Modified: trunk/rosegarden/src/gui/application/RosegardenMainViewWidget.cpp
===================================================================
--- trunk/rosegarden/src/gui/application/RosegardenMainViewWidget.cpp
 2009-10-18 16:18:14 UTC (rev 11060)
+++ trunk/rosegarden/src/gui/application/RosegardenMainViewWidget.cpp
 2009-10-18 18:21:53 UTC (rev 11061)
@@ -1614,7 +1614,7 @@
            progressDlg.progressBar(), SLOT(setValue(int)));
    connect(&aFM, SIGNAL(setOperationName(QString)),
            &progressDlg, SLOT(slotSetOperationName(QString)));
-    connect(&progressDlg, SIGNAL(cancelClicked()),
+    connect(&progressDlg, SIGNAL(canceled()),
            &aFM, SLOT(slotStopImport()));

    try {
@@ -1631,9 +1631,9 @@
        return ;
    }

-    disconnect(&progressDlg, SIGNAL(cancelClicked()),
+    disconnect(&progressDlg, SIGNAL(canceled()),
               &aFM, SLOT(slotStopImport()));
-    connect(&progressDlg, SIGNAL(cancelClicked()),
+    connect(&progressDlg, SIGNAL(canceled()),
            &aFM, SLOT(slotStopPreview()));
    progressDlg.progressBar()->show();
    progressDlg.slotSetOperationName(tr("Generating audio preview..."));
@@ -1648,7 +1648,7 @@
        //return false;
    }

-    disconnect(&progressDlg, SIGNAL(cancelClicked()),
+    disconnect(&progressDlg, SIGNAL(canceled()),
               &aFM, SLOT(slotStopPreview()));

    // add the file at the sequencer

Modified: trunk/rosegarden/src/gui/dialogs/AudioManagerDialog.cpp
===================================================================
--- trunk/rosegarden/src/gui/dialogs/AudioManagerDialog.cpp
2009-10-18 16:18:14 UTC (rev 11060)
+++ trunk/rosegarden/src/gui/dialogs/AudioManagerDialog.cpp
2009-10-18 18:21:53 UTC (rev 11061)
@@ -58,6 +58,7 @@
 #include <QFileDialog>
 #include <QTreeWidget>
 #include <QTreeWidgetItem>
+#include <QTreeWidgetItemIterator>
 #include <QMessageBox>
 #include <QAction>
 #include <QByteArray>
@@ -1041,56 +1042,49 @@
                                const Segment *segment,
                                bool propagate)
 {
-    QTreeWidgetItem *it = m_fileList->itemAt(0,0); //firstChild();
-    QTreeWidgetItem *chIt = 0;
-    AudioListItem *aItem;
-    int nn;
-    while (it) {
-        // If we're looking for a top level audio file
-        if (segment == 0) {
-            aItem = dynamic_cast<AudioListItem*>(it);
-
-            if (aItem->getId() == id) {
-                selectFileListItemNoSignal(it);
-                return ;
-            }
-        } else // look for a child
-        {
-            if (it->childCount() > 0)
-                //chIt = it->firstChild();
-                //chIt = it->itemAt(0,0);
-                chIt = it->child(0);
-            nn = 0;
-            while (chIt && (chIt->childCount() < nn)) {
-                nn +=1;
-                aItem = dynamic_cast<AudioListItem*>(chIt);
-
+    QTreeWidgetItem *it = 0;    //m_fileList->topLevelItem(0);
+    AudioListItem *aItem = 0;
+    //int itCount = m_fileList->topLevelItemCount();
+
+    QTreeWidgetItemIterator twIt( m_fileList, QTreeWidgetItemIterator::All );
+
+    // note: this iterates over topLevelItems and childItems too.
+    // I hope that's what we want to do (?)
+    // otherwise re-code to iterate over topLevelItems only.
+
+    it = *twIt;
+    while( it ) {
+
+                if( ! it ){
+                    RG_DEBUG "AudioManagerDialog::setSelected Error:
item is 0 " << endl;
+                    continue;
+                }
+                aItem = dynamic_cast<AudioListItem*>( it );
+
                if (aItem) {
-                    if (aItem->getId() == id && aItem->getSegment()
== segment) {
-                        selectFileListItemNoSignal(chIt);
-
+                    if    ((aItem->getId() == id)
+                        && (aItem->getSegment() == segment))
+                    {
+                        selectFileListItemNoSignal( it );
                        // Only propagate to compositionview if asked to
                        if (propagate) {
                            SegmentSelection selection;
                            selection.insert(aItem->getSegment());
                            emit segmentsSelected(selection);
                        }
-
                        return ;
                    }
-                }
-                //chIt = chIt->nextSibling();
-                //chIt = it->itemBelow(chIt);
-                chIt = it->child(nn);
-            }
-        }
+
+                }// end if(aItem)
+
+        twIt++;
+        it = *twIt;
+
+    }// end while
+
+}// end setSelected()

-        //it = it->nextSibling();
-        chIt = m_fileList->itemBelow(chIt);
-    }

-}
-
 void
 AudioManagerDialog::selectFileListItemNoSignal(QTreeWidgetItem* it)
 {

Modified: trunk/rosegarden/src/gui/editors/segment/TrackEditor.cpp
===================================================================
--- trunk/rosegarden/src/gui/editors/segment/TrackEditor.cpp
2009-10-18 16:18:14 UTC (rev 11060)
+++ trunk/rosegarden/src/gui/editors/segment/TrackEditor.cpp
2009-10-18 18:21:53 UTC (rev 11061)
@@ -825,6 +825,8 @@
                t << uri << "\n";
                t << track->getId() << "\n";
                t << time << "\n";
+
+                RG_DEBUG << "TrackEditor::dropEvent() audioText = \n
" << audioText << "\n";

                emit droppedNewAudio(audioText);
            }

Modified: trunk/rosegarden/src/gui/editors/segment/compositionview/CompositionModelImpl.cpp
===================================================================
--- trunk/rosegarden/src/gui/editors/segment/compositionview/CompositionModelImpl.cpp
  2009-10-18 16:18:14 UTC (rev 11060)
+++ trunk/rosegarden/src/gui/editors/segment/compositionview/CompositionModelImpl.cpp
  2009-10-18 18:21:53 UTC (rev 11061)
@@ -821,6 +821,10 @@

 void CompositionModelImpl::setSelected(const Segment* segment, bool selected)
 {
+    if( ! segment ){
+        RG_DEBUG << "WARNING : CompositionModelImpl::setSelected -
segment is NULL " << endl;
+        return;
+    }
    RG_DEBUG << "CompositionModelImpl::setSelected " << segment << " -
" << selected << endl;
    if (selected) {
        if (!isSelected(segment))


This was sent by the SourceForge.net collaborative development
platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Rosegarden-bugs mailing list
Rosegarden-bugs@... - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-bugs

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@... - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Re: Fwd: [Rosegarden-bugs] SF.net SVN: rosegarden:[11061] trunk/rosegarden/src/gui

by D. Michael McIntyre :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sunday 18 October 2009, Chris Cannam wrote:

> I'm not in a position to try it out right now, but is this perhaps the
> answer to the problems that Ilan was experiencing (discussed off-list)
> with inserting audio files?

Looks like a mixed bag.  With JACK running, trying to use the audio file
manager dialog to insert an audio file no longer hangs, but it doesn't work
either.  It fails silently.  (No JACK, and insertion works, so there's
probably still something getting mucked up in the sequencer somewhere.)

Failing silently is better than a hang though, and it's apparently possible to
drag an drop instead, so the audio file manager being broken isn't the end of
the world.  (Apparently possible, but I haven't tested it.  I'm just not a
drag and drop kind of guy.)
--
D. Michael McIntyre

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@... - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Re: Fwd: [Rosegarden-bugs] SF.net SVN: rosegarden:[11061] trunk/rosegarden/src/gui

by Emanuel Rumpf-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/10/19 D. Michael McIntyre <michael.mcintyre@...>:

> On Sunday 18 October 2009, Chris Cannam wrote:
>
>> I'm not in a position to try it out right now, but is this perhaps the
>> answer to the problems that Ilan was experiencing (discussed off-list)
>> with inserting audio files?
>
> Looks like a mixed bag.  With JACK running, trying to use the audio file
> manager dialog to insert an audio file no longer hangs, but it doesn't work
> either.  It fails silently.  (No JACK, and insertion works, so there's
> probably still something getting mucked up in the sequencer somewhere.)
>
Hm. With jackd running I've been able to play the inserted audio segments.
I think you're right though, there are still some bugs involved.


> Failing silently is better than a hang though, and it's apparently possible to
> drag an drop instead, so the audio file manager being broken isn't the end of
> the world.  (Apparently possible, but I haven't tested it.  I'm just not a
> drag and drop kind of guy.)
>
I don't drag/drop much myself, but it's the behavior people expect these days.


--
E.R.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@... - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel