From: Flavio Date: Wed, 12 Dec 2012 16:39:05 +0000 (+0100) Subject: Renamed uppercase filenames to lowercase X-Git-Tag: 2.0~47 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=556cf441d55188184caaff274bcfbbf2d083e3f5;p=minitube Renamed uppercase filenames to lowercase --- diff --git a/.gitignore b/.gitignore index d3fbddf..c645b5d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ minitube.pro.user local/ *.swp .tx +android +qtc_packaging diff --git a/CHANGES b/CHANGES index ed037c4..6be6d80 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +2.0 +- Autoupdate on Mac and Windows +- Fixed clicking on channel names not working in some cases + 1.9 - September 27, 2012 - Adapted to YouTube changes - New search filter UI. Filter results by publication date, video duration and video quality. diff --git a/minitube.pro b/minitube.pro index e705eb1..1846c02 100644 --- a/minitube.pro +++ b/minitube.pro @@ -1,6 +1,6 @@ CONFIG += release TEMPLATE = app -VERSION = 1.9 +VERSION = 2.0 DEFINES += APP_VERSION="$$VERSION" APP_NAME = Minitube @@ -11,29 +11,23 @@ DEFINES += APP_UNIX_NAME="$$APP_UNIX_NAME" DEFINES += QT_USE_FAST_CONCATENATION DEFINES += QT_USE_FAST_OPERATOR_PLUS +DEFINES += QT_STRICT_ITERATORS # TODO Saner string behaviour -# DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_STRICT_ITERATORS +# DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII TARGET = minitube -QT += network \ - xml \ - phonon +QT += network xml phonon declarative include(src/qtsingleapplication/qtsingleapplication.pri) -HEADERS += src/MainWindow.h \ - src/SearchView.h \ - src/MediaView.h \ - src/AboutView.h \ +HEADERS += \ src/youtubesearch.h \ src/video.h \ src/youtubestreamreader.h \ - src/View.h \ src/searchlineedit.h \ src/urllineedit.h \ src/spacer.h \ src/constants.h \ src/iconloader/qticonloader.h \ - src/ListModel.h \ - src/playlist/PrettyItemDelegate.h \ + src/playlistitemdelegate.h \ src/networkaccess.h \ src/videomimedata.h \ src/global.h \ @@ -62,12 +56,18 @@ HEADERS += src/MainWindow.h \ src/playlistview.h \ src/refinesearchwidget.h \ src/refinesearchbutton.h \ - src/sidebarwidget.h + src/sidebarwidget.h \ + src/homeview.h \ + src/aboutview.h \ + src/listmodel.h \ + src/mainwindow.h \ + src/mediaview.h \ + src/searchview.h \ + src/view.h \ + src/categoriesview.h \ + src/userview.h \ + src/youtubecategories.h SOURCES += src/main.cpp \ - src/MainWindow.cpp \ - src/SearchView.cpp \ - src/MediaView.cpp \ - src/AboutView.cpp \ src/youtubesearch.cpp \ src/youtubestreamreader.cpp \ src/searchlineedit.cpp \ @@ -75,8 +75,6 @@ SOURCES += src/main.cpp \ src/spacer.cpp \ src/video.cpp \ src/iconloader/qticonloader.cpp \ - src/ListModel.cpp \ - src/playlist/PrettyItemDelegate.cpp \ src/videomimedata.cpp \ src/updatechecker.cpp \ src/networkaccess.cpp \ @@ -104,7 +102,17 @@ SOURCES += src/main.cpp \ src/playlistview.cpp \ src/refinesearchwidget.cpp \ src/refinesearchbutton.cpp \ - src/sidebarwidget.cpp + src/sidebarwidget.cpp \ + src/homeview.cpp \ + src/mainwindow.cpp \ + src/mediaview.cpp \ + src/listmodel.cpp \ + src/aboutview.cpp \ + src/searchview.cpp \ + src/categoriesview.cpp \ + src/userview.cpp \ + src/playlistitemdelegate.cpp \ + src/youtubecategories.cpp RESOURCES += resources.qrc DESTDIR = build/target/ OBJECTS_DIR = build/obj/ @@ -117,8 +125,7 @@ CODECFORSRC = UTF-8 include(locale/locale.pri) # deploy -DISTFILES += CHANGES \ - COPYING +DISTFILES += CHANGES COPYING unix:!mac { INCLUDEPATH += /usr/include/phonon QT += dbus @@ -167,3 +174,6 @@ unix:!mac { icon512.files += data/512x512/minitube.png } mac|win32:include(local/local.pri) + +OTHER_FILES += \ + qml/categories.qml diff --git a/resources.qrc b/resources.qrc index 64c2549..5961a8f 100644 --- a/resources.qrc +++ b/resources.qrc @@ -6,5 +6,6 @@ images/search-sortBy.png images/search-quality.png images/search-duration.png + qml/categories.qml diff --git a/src/AboutView.cpp b/src/AboutView.cpp deleted file mode 100644 index 8cbfad7..0000000 --- a/src/AboutView.cpp +++ /dev/null @@ -1,114 +0,0 @@ -#include "AboutView.h" -#include "constants.h" -#ifndef Q_WS_X11 -#include "extra.h" -#endif -#ifdef APP_ACTIVATION -#include "activation.h" -#endif -#ifdef APP_MAC -#include "macutils.h" -#include "mac_startup.h" -#endif - -AboutView::AboutView(QWidget *parent) : QWidget(parent) { - - QBoxLayout *hLayout = new QHBoxLayout(this); - hLayout->setAlignment(Qt::AlignCenter); - hLayout->setMargin(30); - hLayout->setSpacing(30); - - QLabel *logo = new QLabel(this); - logo->setPixmap(QPixmap(":/images/app.png")); - hLayout->addWidget(logo, 0, Qt::AlignTop); - - QBoxLayout *layout = new QVBoxLayout(); - layout->setAlignment(Qt::AlignCenter); - layout->setSpacing(30); - hLayout->addLayout(layout); - - QString info = "" - "

" + QString(Constants::NAME) + "

" - "

" + tr("There's life outside the browser!") + "

" - "

" + tr("Version %1").arg(Constants::VERSION) + "

" - + QString("

%1

").arg(Constants::WEBSITE); - -#ifdef APP_ACTIVATION - if (Activation::instance().isActivated()) - info += "

" + tr("Licensed to: %1").arg("" + Activation::instance().getEmail() + ""); -#endif - -#ifdef Q_WS_X11 - info += "

" + tr("%1 is Free Software but its development takes precious time.").arg(Constants::NAME) + "
" - + tr("Please donate to support the continued development of %2.") - .arg(QString(Constants::WEBSITE).append("#donate"), Constants::NAME) + "

"; -#endif - - info += "

" + tr("You may want to try my other apps as well:") + "

" - "" - - "

" + tr("Translate %1 to your native language using %2").arg(Constants::NAME) - .arg("Transifex") - + "

" - - "

" - + tr("Icon designed by %1.").arg("David Nel") - + "

" - - #ifdef Q_WS_X11 - "

" + tr("Released under the GNU General Public License") - .arg("http://www.gnu.org/licenses/gpl.html") + "

" - #endif - "

© 2009-2012 " + Constants::ORG_NAME + "

" - ""; - QLabel *infoLabel = new QLabel(info, this); - infoLabel->setOpenExternalLinks(true); - infoLabel->setWordWrap(true); - layout->addWidget(infoLabel); - - QLayout *buttonLayout = new QHBoxLayout(); - buttonLayout->setMargin(0); - buttonLayout->setSpacing(0); - buttonLayout->setAlignment(Qt::AlignLeft); - - QPushButton *closeButton = new QPushButton(tr("&Close"), this); - closeButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); - closeButton->setDefault(true); - closeButton->setFocus(Qt::OtherFocusReason); - connect(closeButton, SIGNAL(clicked()), parent, SLOT(goBack())); - buttonLayout->addWidget(closeButton); - - layout->addLayout(buttonLayout); -} - -void AboutView::paintEvent(QPaintEvent * /*event*/) { -#if defined(APP_MAC) | defined(APP_WIN) - QBrush brush; - if (window()->isActiveWindow()) { - brush = QBrush(QColor(0xdd, 0xe4, 0xeb)); - } else { - brush = palette().window(); - } - QPainter painter(this); - painter.fillRect(0, 0, width(), height(), brush); -#endif -} - -void AboutView::appear() { -#ifdef APP_MAC - mac::uncloseWindow(window()->winId()); -#ifdef APP_ACTIVATION - mac::CheckForUpdates(); -#endif -#endif -} diff --git a/src/AboutView.h b/src/AboutView.h deleted file mode 100644 index e1977dd..0000000 --- a/src/AboutView.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef ABOUTVIEW_H -#define ABOUTVIEW_H - -#include -#include "View.h" -#include "constants.h" - -class AboutView : public QWidget, public View { - - Q_OBJECT - -public: - AboutView(QWidget *parent); - void appear(); - void disappear() {} - QMap metadata() { - QMap metadata; - metadata.insert("title", tr("About")); - metadata.insert("description", - tr("What you always wanted to know about %1 and never dared to ask") - .arg(Constants::NAME)); - return metadata; - } - -protected: - void paintEvent(QPaintEvent *); - -}; -#endif diff --git a/src/ListModel.cpp b/src/ListModel.cpp deleted file mode 100644 index 851c152..0000000 --- a/src/ListModel.cpp +++ /dev/null @@ -1,474 +0,0 @@ -#include "ListModel.h" -#include "videomimedata.h" - -#define MAX_ITEMS 10 -static const QString recentKeywordsKey = "recentKeywords"; -static const QString recentChannelsKey = "recentChannels"; - -ListModel::ListModel(QWidget *parent) : QAbstractListModel(parent) { - youtubeSearch = 0; - searching = false; - canSearchMore = true; - m_activeVideo = 0; - m_activeRow = -1; - skip = 1; - - hoveredRow = -1; - authorHovered = false; - authorPressed = false; -} - -ListModel::~ListModel() { - delete youtubeSearch; -} - -int ListModel::rowCount(const QModelIndex &/*parent*/) const { - int count = videos.size(); - - // add the message item - if (videos.isEmpty() || !searching) - count++; - - return count; -} - -QVariant ListModel::data(const QModelIndex &index, int role) const { - - int row = index.row(); - - if (row == videos.size()) { - - QPalette palette; - QFont boldFont; - boldFont.setBold(true); - - switch (role) { - case ItemTypeRole: - return ItemTypeShowMore; - case Qt::DisplayRole: - case Qt::StatusTipRole: - if (!errorMessage.isEmpty()) return errorMessage; - if (searching) return tr("Searching..."); - if (canSearchMore) return tr("Show %1 More").arg(MAX_ITEMS); - if (videos.isEmpty()) return tr("No videos"); - else return tr("No more videos"); - case Qt::TextAlignmentRole: - return QVariant(int(Qt::AlignHCenter | Qt::AlignVCenter)); - case Qt::ForegroundRole: - if (!errorMessage.isEmpty()) - return palette.color(QPalette::ToolTipText); - else - return palette.color(QPalette::Dark); - case Qt::BackgroundColorRole: - if (!errorMessage.isEmpty()) - return palette.color(QPalette::ToolTipBase); - else - return QVariant(); - case Qt::FontRole: - return boldFont; - default: - return QVariant(); - } - - } else if (row < 0 || row >= videos.size()) - return QVariant(); - - Video *video = videos.at(row); - - switch (role) { - case ItemTypeRole: - return ItemTypeVideo; - case VideoRole: - return QVariant::fromValue(QPointer