From: Jean-Baptiste Mardelle Date: Thu, 29 Jan 2009 12:39:54 +0000 (+0000) Subject: Open website upload page after rendering from a website profile if user wants it X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=433ca07e9c5a10874b30d51b06aa57382a171c9a;p=kdenlive Open website upload page after rendering from a website profile if user wants it svn path=/branches/KDE4/; revision=3000 --- diff --git a/export/profiles.xml b/export/profiles.xml index 9e7f9746..f12cca14 100644 --- a/export/profiles.xml +++ b/export/profiles.xml @@ -172,13 +172,13 @@ Web sites - - - - - - - + + + + + + + diff --git a/src/renderwidget.cpp b/src/renderwidget.cpp index 4b8ef6b6..a28aa0f7 100644 --- a/src/renderwidget.cpp +++ b/src/renderwidget.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include "kdenlivesettings.h" #include "renderwidget.h" @@ -39,6 +40,7 @@ const int RenderRole = GroupRole + 3; const int ParamsRole = GroupRole + 4; const int EditableRole = GroupRole + 5; const int MetaGroupRole = GroupRole + 6; +const int ExtraRole = GroupRole + 7; RenderWidget::RenderWidget(QWidget * parent): QDialog(parent) { m_view.setupUi(this); @@ -484,6 +486,11 @@ void RenderWidget::slotExport() { kDebug() << "// render profile: " << prof; renderItem->setData(0, Qt::UserRole + 1, prof); } + } else if (group == "websites" && m_view.open_browser->isChecked()) { + renderItem->setData(0, Qt::UserRole, group); + // pass the url + QString url = m_view.size_list->currentItem()->data(ExtraRole).toString(); + renderItem->setData(0, Qt::UserRole + 1, url); } emit doRender(dest, item->data(RenderRole).toString(), overlayargs, renderArgs.simplified().split(' '), m_view.render_zone->isChecked(), m_view.play_after->isChecked(), startPos, endPos, resizeProfile); @@ -750,6 +757,7 @@ void RenderWidget::parseFile(QString exportFile, bool editable) { item->setData(RenderRole, renderer); item->setData(StandardRole, standard); item->setData(ParamsRole, params); + if (profileElement.hasAttribute("url")) item->setData(ExtraRole, profileElement.attribute("url")); if (editable) item->setData(EditableRole, "true"); n = n.nextSibling(); } @@ -779,8 +787,10 @@ void RenderWidget::setRenderStatus(const QString &dest, int status, const QStrin QString itemGroup = item->data(0, Qt::UserRole).toString(); if (itemGroup == "dvd") { emit openDvdWizard(item->text(0), item->data(0, Qt::UserRole + 1).toString()); + } else if (itemGroup == "websites") { + QString url = item->data(0, Qt::UserRole + 1).toString(); + if (!url.isEmpty()) KRun *openBrowser = new KRun(url, this); } - } else if (status == -2) { // Rendering crashed item->setIcon(0, KIcon("dialog-close"));