]> git.sesse.net Git - kdenlive/commitdiff
Merge branch 'master' into next
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 20 Nov 2011 17:08:08 +0000 (18:08 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 20 Nov 2011 17:08:08 +0000 (18:08 +0100)
src/clipmanager.cpp
src/clipmanager.h
src/colorpickerwidget.cpp
src/customtrackview.cpp
src/customtrackview.h
src/documentvalidator.cpp
src/dvdwizard.cpp
src/dvdwizard.h
src/kdenlive.notifyrc
src/kdenlivedoc.cpp

index a06874543bb3d5dbded0a5ea7c970fd28497b7b6..2f223465292d9271d860cea852222987b786adff 100644 (file)
@@ -140,19 +140,26 @@ void ClipManager::stopThumbs(const QString &id)
 void ClipManager::slotGetThumbs()
 {
     QMap<QString, int>::iterator i = m_requestedThumbs.begin();
+    int max;
+    int done = 0;
     while (i != m_requestedThumbs.end() && !m_abortThumb) {
         QString producerId = i.key();
         m_thumbsMutex.lock();
         QList<int> values = m_requestedThumbs.values(producerId);
-        i = m_requestedThumbs.erase(i);
+        m_requestedThumbs.remove(producerId);
+        i = m_requestedThumbs.begin();
         m_thumbsMutex.unlock();
         qSort(values);
         DocClipBase *clip = getClipById(producerId);
         if (!clip) continue;
+        max = m_requestedThumbs.size() + values.count();
         while (!values.isEmpty() && clip->thumbProducer() && !m_abortThumb) {
             clip->thumbProducer()->getThumb(values.takeFirst());
+            done++;
+            if (max > 3) emit displayMessage(i18n("Loading thumbnails"), 100 * done / max);
         }
     }
+    emit displayMessage(QString(), -1);
 }
 
 void ClipManager::checkAudioThumbs()
index 9ac2cfd2dbcc1bf9e25d8bea670b5df2b7f48a83..7f1622e33c48f3fba9e3aa948a285a3130fce51a 100644 (file)
@@ -162,6 +162,7 @@ signals:
     void missingClip(const QString &);
     void availableClip(const QString &);
     void checkAllClips(bool displayRatioChanged, bool fpsChanged, QStringList brokenClips);
+    void displayMessage(const QString &, int);
 };
 
 #endif
index 2a2d8468b86cb5d072207cda11c0bf481c4896db..3c91f0fd5e8e68198dafe2403167c7558c6ae9b4 100644 (file)
@@ -52,8 +52,7 @@ ColorPickerWidget::ColorPickerWidget(QWidget *parent) :
 
     QToolButton *button = new QToolButton(this);
     button->setIcon(KIcon("color-picker"));
-    // TODO: make translatable after 0.8.2 release
-    button->setToolTip(i18n("Pick a color on the screen") + QString("\nBy pressing the mouse button and then moving your mouse you can select a section of the screen from which to get an average color."));
+    button->setToolTip("<p>" + i18n("Pick a color on the screen. By pressing the mouse button and then moving your mouse you can select a section of the screen from which to get an average color.") + "</p>");
     button->setAutoRaise(true);
     connect(button, SIGNAL(clicked()), this, SLOT(slotSetupEventFilter()));
 
index f5e7d91acae8ea22e4b6f0a266b5950375a58ba6..32e787908c36aa1fac9dce78094bba1e0addab94 100644 (file)
@@ -1641,8 +1641,7 @@ void CustomTrackView::addEffect(int track, GenTime pos, QDomElement effect)
     if (pos < GenTime()) {
         // Add track effect
         if (effect.attribute("id") == "speed") {
-            // TODO: uncomment after 0.8.2 release
-            // emit displayMessage(i18n("Cannot add speed effect to track"));
+            emit displayMessage(i18n("Cannot add speed effect to track"), ErrorMessage);
             return;
         }
         clearSelection();
@@ -3884,34 +3883,6 @@ void CustomTrackView::deleteSelectedClips()
     m_commandStack->push(deleteSelected);
 }
 
-void CustomTrackView::changeClipSpeed()
-{
-  // TODO: remove after string freeze
-    QList<QGraphicsItem *> itemList = scene()->selectedItems();
-    if (itemList.count() == 0) {
-        emit displayMessage(i18n("Select clip to change speed"), ErrorMessage);
-        return;
-    }
-    QUndoCommand *changeSelected = new QUndoCommand();
-    changeSelected->setText("Edit clip speed");
-    int count = 0;
-    int percent = -1;
-    bool ok;
-    for (int i = 0; i < itemList.count(); i++) {
-        if (itemList.at(i)->type() == AVWIDGET) {
-            ClipItem *item = static_cast <ClipItem *>(itemList.at(i));
-            if (percent == -1) percent = QInputDialog::getInteger(this, i18n("Edit Clip Speed"), i18n("New speed (percents)"), item->speed() * 100, 1, 10000, 1, &ok);
-            if (!ok) break;
-            double speed = (double) percent / 100.0;
-            if (item->speed() != speed && (item->clipType() == VIDEO || item->clipType() == AV)) {
-                count++;
-                //new ChangeSpeedCommand(this, info, item->speed(), speed, item->clipProducer(), changeSelected);
-            }
-        }
-    }
-    if (count > 0) m_commandStack->push(changeSelected);
-    else delete changeSelected;
-}
 
 void CustomTrackView::doChangeClipSpeed(ItemInfo info, ItemInfo speedIndependantInfo, const double speed, const double oldspeed, int strobe, const QString &id)
 {
index 2bfad8fe68b9602bd29254bdc02bc3ac7b08a541..64c0ddbb8968a33ee0dbfdfd71497600787aed67 100644 (file)
@@ -105,7 +105,6 @@ public:
     QList<ItemInfo> findId(const QString &clipId);
     void clipStart();
     void clipEnd();
-    void changeClipSpeed();
     void doChangeClipSpeed(ItemInfo info, ItemInfo speedIndependantInfo, const double speed, const double oldspeed, int strobe, const QString &id);
     /** @brief Sets the document as modified. */
     void setDocumentModified();
index 1226a85c96b6adc13f97aa964e2fde1575891789..a31c18a841cf29688b6d1b06a38267fdf5c709fb 100644 (file)
@@ -78,10 +78,6 @@ bool DocumentValidator::validate(const double currentVersion)
         initEffects::parseEffectFiles();
     }
 
-    // TODO: remove after string freeze
-    if (0)
-        KMessageBox::sorry(kapp->activeWindow(), i18n("The document you are opening uses a different locale (%1) than your system. You can only open and render it, no editing is supported unless you change your system's locale.", mlt.attribute("LC_NUMERIC")), i18n("Read only project"));
-
     // Upgrade the document to the latest version
     if (!upgrade(documentLocale.toDouble(kdenliveDoc.attribute("version")), currentVersion))
         return false;
index 99b295d54f7a93625bd9acdfb58eb61d9f7daa74..68a3580a5b19ce33084a7201aa463a72cc3801c2 100644 (file)
@@ -254,8 +254,8 @@ void DvdWizard::generateDvd()
             renderbg.start(KdenliveSettings::rendererpath(), args);
             if (renderbg.waitForFinished()) {
                 if (renderbg.exitStatus() == QProcess::CrashExit) {
-                    //TODO: inform user via the m_isoMessage widget after string freeze
                     kDebug() << "/// RENDERING MENU vob crashed";
+                    errorMessage(i18n("Rendering menu crashed"));
                     QByteArray result = renderbg.readAllStandardError();
                     vobitem->setIcon(KIcon("dialog-close"));
                     m_status.error_log->append(result);
@@ -266,11 +266,7 @@ void DvdWizard::generateDvd()
                 }
             } else {
                 kDebug() << "/// RENDERING MENU vob timed out";
-#if KDE_IS_VERSION(4,7,0)
-                m_isoMessage->setText(i18n("Rendering job timed out"));
-                m_isoMessage->setMessageType(KMessageWidget::Error);
-                m_isoMessage->animatedShow();
-#endif
+                errorMessage(i18n("Rendering job timed out"));
                 vobitem->setIcon(KIcon("dialog-close"));
                 m_status.error_log->append("<a name=\"result\" /><br /><strong>" + i18n("Rendering job timed out"));
                 m_status.error_log->scrollToAnchor("result");
@@ -375,11 +371,7 @@ void DvdWizard::generateDvd()
             }
         } else {
             kDebug() << "/// RENDERING SPUMUX MENU timed out";
-#if KDE_IS_VERSION(4,7,0)
-            m_isoMessage->setText(i18n("Rendering job timed out"));
-            m_isoMessage->setMessageType(KMessageWidget::Error);
-            m_isoMessage->animatedShow();
-#endif
+            errorMessage(i18n("Rendering job timed out"));
             spuitem->setIcon(KIcon("dialog-close"));
             m_status.error_log->append("<a name=\"result\" /><br /><strong>" + i18n("Menu job timed out"));
             m_status.error_log->scrollToAnchor("result");
@@ -546,18 +538,27 @@ void DvdWizard::slotShowRenderInfo()
     m_status.error_box->setHidden(false);
 }
 
+void DvdWizard::errorMessage(const QString &text) {
+#if KDE_IS_VERSION(4,7,0)
+    m_isoMessage->setText(text);
+    m_isoMessage->setMessageType(KMessageWidget::Error);
+    m_isoMessage->animatedShow();
+#endif
+}
+
+void DvdWizard::infoMessage(const QString &text) {
+#if KDE_IS_VERSION(4,7,0)
+    m_isoMessage->setText(text);
+    m_isoMessage->setMessageType(KMessageWidget::Positive);
+    m_isoMessage->animatedShow();
+#endif
+}
+
 void DvdWizard::slotRenderFinished(int exitCode, QProcess::ExitStatus status)
 {
     QListWidgetItem *authitem =  m_status.job_progress->item(3);
     if (status == QProcess::CrashExit || exitCode != 0) {
-#if KDE_IS_VERSION(4,7,0)
-        //TODO: Clean up message string after string freeze
-        QString message = i18n("DVDAuthor process crashed.</strong><br />");
-        message.remove(QRegExp("<[^>]*>"));
-        m_isoMessage->setText(message);
-        m_isoMessage->setMessageType(KMessageWidget::Error);
-        m_isoMessage->animatedShow();
-#endif
+        errorMessage(i18n("DVDAuthor process crashed"));
         QString result(m_dvdauthor->readAllStandardError());
         result.append("<a name=\"result\" /><br /><strong>");
         result.append(i18n("DVDAuthor process crashed.</strong><br />"));
@@ -585,11 +586,7 @@ void DvdWizard::slotRenderFinished(int exitCode, QProcess::ExitStatus status)
 
     // Check if DVD structure has the necessary infos
     if (!QFile::exists(m_status.tmp_folder->url().path() + "/DVD/VIDEO_TS/VIDEO_TS.IFO")) {
-#if KDE_IS_VERSION(4,7,0)
-        m_isoMessage->setText(i18n("DVD structure broken"));
-        m_isoMessage->setMessageType(KMessageWidget::Error);
-        m_isoMessage->animatedShow();
-#endif
+        errorMessage(i18n("DVD structure broken"));
         m_status.error_log->append(m_creationLog + "<a name=\"result\" /><br /><strong>" + i18n("DVD structure broken"));
         m_status.error_log->scrollToAnchor("result");
         m_status.error_box->setHidden(false);
@@ -639,11 +636,7 @@ void DvdWizard::slotIsoFinished(int exitCode, QProcess::ExitStatus status)
     button(QWizard::FinishButton)->setEnabled(true);
     QListWidgetItem *isoitem =  m_status.job_progress->item(4);
     if (status == QProcess::CrashExit || exitCode != 0) {
-#if KDE_IS_VERSION(4,7,0)
-        m_isoMessage->setText(i18n("ISO creation process crashed."));
-        m_isoMessage->setMessageType(KMessageWidget::Error);
-        m_isoMessage->animatedShow();
-#endif
+        errorMessage(i18n("ISO creation process crashed."));
         QString result(m_mkiso->readAllStandardError());
         result.append("<a name=\"result\" /><br /><strong>");
         result.append(i18n("ISO creation process crashed."));
@@ -676,11 +669,7 @@ void DvdWizard::slotIsoFinished(int exitCode, QProcess::ExitStatus status)
         if (iso.exists()) {
             KIO::NetAccess::del(m_status.iso_image->url(), this);
         }
-#if KDE_IS_VERSION(4,7,0)
-        m_isoMessage->setText(i18n("DVD ISO is broken"));
-        m_isoMessage->setMessageType(KMessageWidget::Error);
-        m_isoMessage->animatedShow();
-#endif
+        errorMessage(i18n("DVD ISO is broken"));
         m_status.error_log->append(m_creationLog + "<br /><a name=\"result\" /><strong>" + i18n("DVD ISO is broken") + "</strong>");
         m_status.error_log->scrollToAnchor("result");
         m_status.error_box->setHidden(false);
@@ -696,11 +685,7 @@ void DvdWizard::slotIsoFinished(int exitCode, QProcess::ExitStatus status)
     kDebug() << "ISO IMAGE " << m_status.iso_image->url().path() << " Successfully created";
     cleanup();
     kDebug() << m_creationLog;
-#if KDE_IS_VERSION(4,7,0)
-        m_isoMessage->setText(i18n("DVD ISO image %1 successfully created.", m_status.iso_image->url().path()));
-        m_isoMessage->setMessageType(KMessageWidget::Positive);
-        m_isoMessage->animatedShow();
-#endif    
+    infoMessage(i18n("DVD ISO image %1 successfully created.", m_status.iso_image->url().path()));
 
     m_status.error_log->append("<a name=\"result\" /><strong>" + i18n("DVD ISO image %1 successfully created.", m_status.iso_image->url().path()) + "</strong>");
     m_status.error_log->scrollToAnchor("result");
index b9578d9d213cf4ede96d4d9ccad275caa0bb39fc..a763940773232f3111b59d0699993def6910ab8f 100644 (file)
@@ -61,6 +61,8 @@ private:
     QString m_creationLog;
     void cleanup();
     QMenu *m_burnMenu;
+    void errorMessage(const QString &text);
+    void infoMessage(const QString &text);
 
 private slots:
     void slotPageChanged(int page);
index 188ddcd56cbdf0a54c3a95fd3981d0bf065e8f1c..cb9ce1fc7ceb6ebe0c0c8b75edff987a56c43204 100644 (file)
@@ -21,7 +21,7 @@ Name[da]=Rendering gennemført
 Name[nl]=Weergave uitwerken beëindigd
 Name[pt]=A geração terminou
 Name[pt_BR]=A renderização terminou
-Name[sv]=Framställning klar
+Name[sv]=Återgivning klar
 Name[uk]=Обробку завершено
 Name[x-test]=xxRendering finishedxx
 Name[zh_CN]=渲染结束
@@ -32,7 +32,7 @@ Comment[da]=Renderingen er slut
 Comment[nl]=Weergave uitwerken is gereed
 Comment[pt]=A geração terminou
 Comment[pt_BR]=A renderização foi terminada
-Comment[sv]=Framställning är gjord
+Comment[sv]=Återgivningen är gjord
 Comment[uk]=Виконання обробки завершено
 Comment[x-test]=xxRendering is overxx
 Comment[zh_CN]=渲染结束
@@ -46,7 +46,7 @@ Name[da]=Rendering påbegyndt
 Name[nl]=Weergave uitwerken begonnen
 Name[pt]=A geração foi iniciada
 Name[pt_BR]=A renderização iniciou
-Name[sv]=Framställning startad
+Name[sv]=Återgivning startad
 Name[uk]=Обробку розпочато
 Name[x-test]=xxRendering startedxx
 Name[zh_CN]=渲染开始
@@ -57,7 +57,7 @@ Comment[da]=Renderingen blev startet
 Comment[nl]=Weergave uitwerken is begonnen
 Comment[pt]=A geração foi iniciada
 Comment[pt_BR]=A renderização foi iniciada
-Comment[sv]=Framställning har startats
+Comment[sv]=Återgivningen har startats
 Comment[uk]=Було розпочато обробку
 Comment[x-test]=xxRendering was startedxx
 Comment[zh_CN]=渲染开始
index c3aefa9195142ecee9329d62527db447f3f3a9e8..8102ca681918534ca9bd7758d54239d9ad056af1 100644 (file)
@@ -83,6 +83,7 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
     m_clipManager = new ClipManager(this);
     m_autoSaveTimer = new QTimer(this);
     m_autoSaveTimer->setSingleShot(true);
+    connect(m_clipManager, SIGNAL(displayMessage(QString, int)), parent, SLOT(slotGotProgressInfo(QString,int)));
     bool success = false;
 
     // init default document properties