]> git.sesse.net Git - kdenlive/commitdiff
Cleanup after string freeze
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 20 Nov 2011 13:07:03 +0000 (14:07 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 20 Nov 2011 13:07:03 +0000 (14:07 +0100)
src/colorpickerwidget.cpp
src/customtrackview.cpp
src/customtrackview.h
src/documentvalidator.cpp
src/dvdwizard.cpp
src/dvdwizard.h

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);