From: Jakob Haufe Date: Wed, 7 Dec 2011 01:50:04 +0000 (+0100) Subject: Imported Debian patch 1.6-1 X-Git-Tag: debian/1.6-1^0 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=df8b2c951e66b538dd4d191220e883d86b700864;p=minitube Imported Debian patch 1.6-1 --- df8b2c951e66b538dd4d191220e883d86b700864 diff --cc debian/changelog index e57559c,0000000..c1de010 mode 100644,000000..100644 --- a/debian/changelog +++ b/debian/changelog @@@ -1,79 -1,0 +1,87 @@@ ++minitube (1.6-1) unstable; urgency=low ++ ++ * New upstream version (Closes: #650622, #647212) ++ * Recreate debian/patches/disable-update-check ++ * Recreate debian/patches/proper-tempfiles ++ ++ -- Jakob Haufe Wed, 07 Dec 2011 02:50:04 +0100 ++ +minitube (1.5-2) unstable; urgency=low + - * Do proper temporary file createn (Closes: #644935) ++ * Do proper temporary file creation (Closes: #644935). + + -- Jakob Haufe Wed, 12 Oct 2011 23:06:30 +0200 + +minitube (1.5-1.1) unstable; urgency=low + + * Bump Standards-Version to 3.9.2 (no changes required) + + -- Jakob Haufe Sun, 14 Aug 2011 09:33:19 +0200 + +minitube (1.5-1) unstable; urgency=low + + * New upstream version (Closes: #637410) + + -- Jakob Haufe Fri, 12 Aug 2011 18:34:21 +0200 + +minitube (1.4.3-1) unstable; urgency=low + + * New upstream version (Closes: #623821) + + -- Jakob Haufe Fri, 10 Jun 2011 00:12:04 +0200 + +minitube (1.4.2-1) unstable; urgency=low + + * New upstream version + + -- Jakob Haufe Sun, 24 Apr 2011 19:30:24 +0200 + +minitube (1.4.1-1) unstable; urgency=low + + * New upstream version + * Disable update check, makes no sense for a packaged version (Closes: + #619941) + + -- Jakob Haufe Sun, 03 Apr 2011 20:38:04 +0200 + +minitube (1.3-1) unstable; urgency=low + + * New upstream version (Closes: #606670) + + -- Jakob Haufe Fri, 17 Dec 2010 00:23:23 +0100 + +minitube (1.2-1) unstable; urgency=low + + * New upstream version (Closes: #600070) + + -- Jakob Haufe Fri, 15 Oct 2010 01:48:10 +0200 + +minitube (1.1-1) unstable; urgency=low + + * New upstream version (Closes: #590320) + * Bump Standards-Version to 3.9.1 (no changes required) + * Add dependencies to dbus-x11 and gstreamer0.10-plugins-good + + -- Jakob Haufe Tue, 27 Jul 2010 23:04:09 +0200 + +minitube (1.0-3) unstable; urgency=low + + * Mention files with copyright by Nokia in debian/copyright. Thanks to Barry + deFreese for pointing it out. + + -- Jakob Haufe Wed, 09 Jun 2010 20:52:44 +0200 + +minitube (1.0-2) unstable; urgency=low + + * Make phonon and gstreamer dependencies more strict + * Remove now obsolete README.Debian + * Remove README.source template + + -- Jakob Haufe Thu, 06 May 2010 22:58:30 +0200 + +minitube (1.0-1) unstable; urgency=low + + * Initial release (Closes: #561012) + + -- Jakob Haufe Tue, 04 May 2010 21:51:02 +0200 + diff --cc debian/patches/disable-update-check index e2eff00,0000000..375a37d mode 100644,000000..100644 --- a/debian/patches/disable-update-check +++ b/debian/patches/disable-update-check @@@ -1,16 -1,0 +1,16 @@@ +Description: Disable update check as it's useless for a packaged version +Author: Jakob Haufe + - diff --git a/src/SearchView.cpp b/src/SearchView.cpp - index 809537e..9ac18a8 100644 - --- minitube-1.4.1.orig/src/SearchView.cpp - +++ minitube-1.4.1/src/SearchView.cpp - @@ -180,7 +180,7 @@ SearchView::SearchView(QWidget *parent) : QWidget(parent) { - updateChecker = 0; ++diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp ++index 137ee6f..16a2103 100644 ++--- a/src/MainWindow.cpp +++++ b/src/MainWindow.cpp ++@@ -102,7 +102,7 @@ MainWindow::MainWindow() : + - #ifndef APP_MAC_STORE - - checkForUpdate(); - + //checkForUpdate(); - #endif ++ setAcceptDrops(true); ++ ++- QTimer::singleShot(0, this, SLOT(checkForUpdate())); +++ //QTimer::singleShot(0, this, SLOT(checkForUpdate())); + + } ++ diff --cc debian/patches/proper-tempfiles index a239aaa,0000000..44835c2 mode 100644,000000..100644 --- a/debian/patches/proper-tempfiles +++ b/debian/patches/proper-tempfiles @@@ -1,61 -1,0 +1,83 @@@ +Description: Do proper temporary file creation + Upstream is using predictable temporary file names. Fix this in Debian + for now by using QTemporaryFile. This additionally ensures removal of + temporary files upon exit. +Author: Jakob Haufe +Bug-Debian: http://bugs.debian.org/644935 + - --- minitube-1.5.orig/src/MediaView.cpp - +++ minitube-1.5/src/MediaView.cpp - @@ -127,6 +127,7 @@ MediaView::MediaView(QWidget *parent) : - connect(demoTimer, SIGNAL(timeout()), SLOT(demoMessage())); ++diff --git a/src/temporary.cpp b/src/temporary.cpp ++index a979cbd..bebcd1f 100644 ++--- a/src/temporary.cpp +++++ b/src/temporary.cpp ++@@ -1,7 +1,7 @@ ++ #include "temporary.h" ++ #include "constants.h" ++ ++-static QList paths; +++static QList tempfiles; ++ #ifdef Q_WS_X11 ++ static QString userName; + #endif ++@@ -10,41 +10,21 @@ Temporary::Temporary() { } + - + tempFile = new QTemporaryFile(this); - } ++ QString Temporary::filename() { + - void MediaView::initialize() { - @@ -346,21 +347,15 @@ void MediaView::gotStreamUrl(QUrl stream ++- static const QString tempDir = QDesktopServices::storageLocation(QDesktopServices::TempLocation); +++ QTemporaryFile *tempfile = new QTemporaryFile(QDir::tempPath() + "/" + Constants::UNIX_NAME + "-XXXXXX"); + ++- QString tempFile = tempDir + "/" + Constants::UNIX_NAME + "-" + QString::number(qrand()); +++ tempfiles << tempfile; + - QString tempDir = QDesktopServices::storageLocation(QDesktopServices::TempLocation); +-#ifdef Q_WS_X11 - - QString tempFile = tempDir + "/minitube-" + getenv("USERNAME") + ".mp4"; - -#else - - QString tempFile = tempDir + "/minitube.mp4"; ++- if (userName.isNull()) { ++- userName = QString(getenv("USERNAME")); ++- if (userName.isEmpty()) ++- userName = QString(getenv("USER")); ++- } ++- if (!userName.isEmpty()) ++- tempFile += "-" + userName; +-#endif ++- +- if (QFile::exists(tempFile) && !QFile::remove(tempFile)) { - - qDebug() << "Cannot remove temp file"; ++- qDebug() << "Cannot remove temp file" << tempFile; +++ if (tempfiles.size() > 1) { +++ QTemporaryFile *removedFile = tempfiles.takeFirst(); +++ delete removedFile; ++ } ++ ++- paths << tempFile; ++- ++- if (paths.size() > 1) { ++- QString removedFile = paths.takeFirst(); ++- if (QFile::exists(removedFile) && !QFile::remove(removedFile)) { ++- qDebug() << "Cannot remove temp file" << removedFile; ++- } +- } - + if(tempFile->fileName().isNull()) - + tempFile->open(); ++- ++- return tempFile; ++- +++ tempfile->open(); +++ return tempfile->fileName(); ++ } + - Video *videoCopy = video->clone(); - if (downloadItem) { - downloadItem->stop(); - delete downloadItem; ++ void Temporary::deleteAll() { ++- foreach(QString path, paths) { ++- if (QFile::exists(path) && !QFile::remove(path)) { ++- qDebug() << "Cannot remove temp file" << path; ++- } +++ foreach(QTemporaryFile *tempfile, tempfiles) { +++ delete tempfile; + } - - downloadItem = new DownloadItem(videoCopy, streamUrl, tempFile, this); - + downloadItem = new DownloadItem(videoCopy, streamUrl, tempFile->fileName(), this); - connect(downloadItem, SIGNAL(statusChanged()), SLOT(downloadStatusChanged())); - // connect(downloadItem, SIGNAL(progress(int)), SLOT(downloadProgress(int))); - connect(downloadItem, SIGNAL(bufferProgress(int)), loadingWidget, SLOT(bufferStatus(int))); - --- minitube-1.5.orig/src/MediaView.h - +++ minitube-1.5/src/MediaView.h ++ } ++diff --git a/src/temporary.h b/src/temporary.h ++index 50b9633..0453572 100644 ++--- a/src/temporary.h +++++ b/src/temporary.h +@@ -3,6 +3,7 @@ + - #include - #include ++ #include ++ #include ++#include - #include - #include - #include "View.h" - @@ -130,6 +131,8 @@ private: - DownloadItem *downloadItem; - // QSlider *slider; - - + QTemporaryFile *tempFile; - + - }; - - #endif // __MEDIAVIEW_H__ ++ ++ class Temporary { ++ diff --cc debian/watch index 4f13011,0000000..c11ff89 mode 100644,000000..100644 --- a/debian/watch +++ b/debian/watch @@@ -1,4 -1,0 +1,4 @@@ +version=3 + - http://flavio.tordini.org/minitube http://flavio.tordini.org/files/minitube/minitube-([0-9].*)\.tar\.gz ++opts=downloadurlmangle=s/trees/archive-tarball/,filenamemangle=s/^\/minitube\/minitube\/trees\/(.*)$/minitube-$1.tar.gz/ http://gitorious.org/minitube/minitube/trees/ /minitube/minitube/trees/([0-9])\.([0-9].*) +