ffmpeg_params->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5);
adjustSize();
- if (m_automaticMode) slotStartTransCode();
}
ClipTranscode::~ClipTranscode()
QString s_url = source_url->url().path();
parameters << "-i" << s_url;
if (QFile::exists(destination + extension)) {
- if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", destination + extension)) == KMessageBox::No) return;
+ if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", destination + extension)) == KMessageBox::No) {
+ // Abort operation
+ if (m_automaticMode) {
+ // inform caller that we aborted
+ emit transcodedClip(source_url->url(), KUrl());
+ close();
+ }
+ return;
+ }
parameters << "-y";
}
m_warnMessage->setCloseButtonVisible(false);
m_warnMessage->addAction(m_transcodeAction);
QGridLayout *s = static_cast <QGridLayout*> (layout());
- s->addWidget(m_warnMessage, 3, 0, 1, -1);
+ s->addWidget(m_warnMessage, 2, 0, 1, -1);
m_warnMessage->hide();
m_view.button_transcode->setHidden(true);
#else
}
ClipTranscode *d = new ClipTranscode(KUrl::List () << KUrl(item->text(0)), params.section(';', 0, 0), postParams, i18n("Transcoding to DVD format"), true, this);
connect(d, SIGNAL(transcodedClip(KUrl,KUrl)), this, SLOT(slotTranscodedClip(KUrl, KUrl)));
+ d->slotStartTransCode();
d->show();
+
}
}
}
void DvdWizardVob::slotTranscodedClip(KUrl src, KUrl transcoded)
{
+ if (transcoded.isEmpty()) {
+ // Transcoding canceled or failed
+ m_transcodeAction->setEnabled(true);
+ return;
+ }
int max = m_vobList->topLevelItemCount();
for (int i = 0; i < max; i++) {
QTreeWidgetItem *item = m_vobList->topLevelItem(i);
<rect>
<x>0</x>
<y>0</y>
- <width>459</width>
- <height>255</height>
+ <width>463</width>
+ <height>275</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>0</number>
</property>
- <item row="3" column="2">
- <widget class="QPushButton" name="button_delete">
- <property name="text">
- <string>Remove file</string>
- </property>
- </widget>
- </item>
- <item row="3" column="5">
- <widget class="QCheckBox" name="use_intro">
- <property name="text">
- <string>Use first movie as intro</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0" colspan="9">
+ <item row="4" column="0" colspan="10">
<widget class="QGroupBox" name="size_box">
<property name="title">
<string/>
</property>
</widget>
</item>
- <item row="0" column="0" colspan="2">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>DVD format</string>
- </property>
- </widget>
- </item>
- <item row="3" column="6">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>244</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
+ <item row="0" column="2" colspan="8">
+ <widget class="KComboBox" name="dvd_profile"/>
</item>
- <item row="3" column="7">
+ <item row="3" column="8">
<widget class="QToolButton" name="button_transcode">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
- <item row="0" column="2" colspan="7">
- <widget class="KComboBox" name="dvd_profile"/>
- </item>
- <item row="3" column="1">
- <widget class="QPushButton" name="button_add">
- <property name="text">
- <string>Add movie file</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0" colspan="9">
+ <item row="5" column="0" colspan="10">
<widget class="QLabel" name="error_message">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
</property>
</widget>
</item>
- <item row="1" column="0" colspan="8">
+ <item row="3" column="6">
+ <widget class="QCheckBox" name="use_intro">
+ <property name="text">
+ <string>Use first movie as intro</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="9">
<widget class="QFrame" name="list_frame">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
</property>
</widget>
</item>
- <item row="3" column="3">
- <widget class="QToolButton" name="button_up">
+ <item row="3" column="2">
+ <widget class="QPushButton" name="button_delete">
<property name="text">
- <string>...</string>
+ <string>Remove file</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QPushButton" name="button_add">
+ <property name="text">
+ <string>Add movie file</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" colspan="2">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>DVD format</string>
</property>
</widget>
</item>
</property>
</widget>
</item>
+ <item row="3" column="3">
+ <widget class="QToolButton" name="button_up">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="5">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>244</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
<customwidgets>