[mythtv] MythGallery addition of copy to USB drive

Roy Lofthouse lofty69 at gmail.com
Wed Jan 21 11:29:18 UTC 2009


Hi,

I'm looking at adding the above functionality to Mythgallery but
haven't done any coding in C++ before (have done quite a bit of vb and
hta scripting).

I've had a look at the code for the existing copy function but there's
one thing I'm not sure about..

In the following section of Iconview.cpp it mentions
GalleryUtil::CopyMove, but in Galleryutil.cpp there is no
GalleryUtil::CopyMove only GalleryUtil::Copy & GalleryUtil::Move.

void IconView::CopyMarkedFiles(bool move)
{
    if (m_itemMarked.isEmpty())
        return;

    QStringList::iterator it;
    QFileInfo fi;
    QFileInfo dest;
    int count = 0;

    QString msg = (move) ?
        tr("Moving marked images...") :
        tr("Copying marked images...");

    MythProgressDialog *progress =
        new MythProgressDialog(msg, m_itemMarked.count());

    for (it = m_itemMarked.begin(); it != m_itemMarked.end(); it++)
    {
        fi.setFile(*it);
        dest.setFile(QDir(m_currDir), fi.fileName());

        if (fi.exists())
            GalleryUtil::CopyMove(fi, dest, move);

        progress->setProgress(++count);
    }

    progress->Close();
    progress->deleteLater();

    LoadDirectory(m_currDir, true);
}


More information about the mythtv-dev mailing list