More windows fixes

This commit is contained in:
David Sansome 2010-02-13 16:45:01 +00:00
parent 77425d4d15
commit e1880477e8
4 changed files with 210 additions and 194 deletions

View File

@ -227,8 +227,8 @@ MainWindow::MainWindow(QWidget *parent)
connect(tray_icon_, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), SLOT(TrayClicked(QSystemTrayIcon::ActivationReason))); connect(tray_icon_, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), SLOT(TrayClicked(QSystemTrayIcon::ActivationReason)));
// Global shortcuts // Global shortcuts
// Breaks on OS X. // Breaks on OS X and Windows
#ifndef Q_OS_DARWIN #ifdef Q_OS_LINUX
QxtGlobalShortcut* play_pause = new QxtGlobalShortcut(QKeySequence("Media Play"), this); QxtGlobalShortcut* play_pause = new QxtGlobalShortcut(QKeySequence("Media Play"), this);
QxtGlobalShortcut* stop = new QxtGlobalShortcut(QKeySequence("Media Stop"), this); QxtGlobalShortcut* stop = new QxtGlobalShortcut(QKeySequence("Media Stop"), this);
QxtGlobalShortcut* next = new QxtGlobalShortcut(QKeySequence("Media Next"), this); QxtGlobalShortcut* next = new QxtGlobalShortcut(QKeySequence("Media Next"), this);

15
src/osd_win.cpp Normal file
View File

@ -0,0 +1,15 @@
#include "osd.h"
#include <QtDebug>
void OSD::Init() {
}
bool OSD::CanShowNativeMessages() const {
return false;
}
void OSD::ShowMessageNative(const QString&, const QString&,
const QString&) {
}

View File

@ -1,191 +1,192 @@
# Change this line to install Clementine somewhere else # Change this line to install Clementine somewhere else
install_prefix = /usr install_prefix = /usr
VERSION = 0.1 VERSION = 0.1
QT += sql \ QT += sql \
network \ network \
xml \ xml \
opengl opengl
TARGET = clementine TARGET = clementine
TEMPLATE = app TEMPLATE = app
SOURCES += main.cpp \ SOURCES += main.cpp \
mainwindow.cpp \ mainwindow.cpp \
player.cpp \ player.cpp \
library.cpp \ library.cpp \
librarybackend.cpp \ librarybackend.cpp \
playlist.cpp \ playlist.cpp \
playlistitem.cpp \ playlistitem.cpp \
enginebase.cpp \ enginebase.cpp \
analyzers/baranalyzer.cpp \ analyzers/baranalyzer.cpp \
analyzers/analyzerbase.cpp \ analyzers/analyzerbase.cpp \
fht.cpp \ fht.cpp \
analyzers/blockanalyzer.cpp \ analyzers/blockanalyzer.cpp \
xine-engine.cpp \ xine-engine.cpp \
xine-scope.c \ xine-scope.c \
sliderwidget.cpp \ sliderwidget.cpp \
playlistview.cpp \ playlistview.cpp \
backgroundthread.cpp \ backgroundthread.cpp \
librarywatcher.cpp \ librarywatcher.cpp \
song.cpp \ song.cpp \
songplaylistitem.cpp \ songplaylistitem.cpp \
libraryview.cpp \ libraryview.cpp \
libraryconfig.cpp \ libraryconfig.cpp \
systemtrayicon.cpp \ systemtrayicon.cpp \
libraryquery.cpp \ libraryquery.cpp \
fileview.cpp \ fileview.cpp \
fileviewlist.cpp \ fileviewlist.cpp \
playlistheader.cpp \ playlistheader.cpp \
radioitem.cpp \ radioitem.cpp \
radioservice.cpp \ radioservice.cpp \
lastfmservice.cpp \ lastfmservice.cpp \
radiomodel.cpp \ radiomodel.cpp \
lastfmconfig.cpp \ lastfmconfig.cpp \
busyindicator.cpp \ busyindicator.cpp \
radioplaylistitem.cpp \ radioplaylistitem.cpp \
radioview.cpp \ radioview.cpp \
lastfmstationdialog.cpp \ lastfmstationdialog.cpp \
osd.cpp \ osd.cpp \
trackslider.cpp \ trackslider.cpp \
edittagdialog.cpp \ edittagdialog.cpp \
lineedit.cpp \ lineedit.cpp \
multiloadingindicator.cpp \ multiloadingindicator.cpp \
somafmservice.cpp \ somafmservice.cpp \
settingsdialog.cpp \ settingsdialog.cpp \
librarydirectorymodel.cpp \ librarydirectorymodel.cpp \
libraryconfigdialog.cpp \ libraryconfigdialog.cpp \
lastfmconfigdialog.cpp \ lastfmconfigdialog.cpp \
about.cpp about.cpp
HEADERS += mainwindow.h \ HEADERS += mainwindow.h \
player.h \ player.h \
library.h \ library.h \
librarybackend.h \ librarybackend.h \
playlist.h \ playlist.h \
playlistitem.h \ playlistitem.h \
enginebase.h \ enginebase.h \
engine_fwd.h \ engine_fwd.h \
analyzers/baranalyzer.h \ analyzers/baranalyzer.h \
analyzers/analyzerbase.h \ analyzers/analyzerbase.h \
fht.h \ fht.h \
analyzers/blockanalyzer.h \ analyzers/blockanalyzer.h \
xine-engine.h \ xine-engine.h \
xine-scope.h \ xine-scope.h \
sliderwidget.h \ sliderwidget.h \
playlistview.h \ playlistview.h \
backgroundthread.h \ backgroundthread.h \
librarywatcher.h \ librarywatcher.h \
directory.h \ directory.h \
song.h \ song.h \
songmimedata.h \ songmimedata.h \
songplaylistitem.h \ songplaylistitem.h \
libraryview.h \ libraryview.h \
libraryitem.h \ libraryitem.h \
libraryconfig.h \ libraryconfig.h \
systemtrayicon.h \ systemtrayicon.h \
libraryquery.h \ libraryquery.h \
fileview.h \ fileview.h \
fileviewlist.h \ fileviewlist.h \
playlistheader.h \ playlistheader.h \
simpletreeitem.h \ simpletreeitem.h \
radioitem.h \ radioitem.h \
radioservice.h \ radioservice.h \
lastfmservice.h \ lastfmservice.h \
simpletreemodel.h \ simpletreemodel.h \
radiomodel.h \ radiomodel.h \
lastfmconfig.h \ lastfmconfig.h \
busyindicator.h \ busyindicator.h \
radiomimedata.h \ radiomimedata.h \
radioplaylistitem.h \ radioplaylistitem.h \
radioview.h \ radioview.h \
lastfmstationdialog.h \ lastfmstationdialog.h \
../3rdparty/qxt/keymapper_x11.h \ ../3rdparty/qxt/keymapper_x11.h \
osd.h \ osd.h \
trackslider.h \ trackslider.h \
edittagdialog.h \ edittagdialog.h \
lineedit.h \ lineedit.h \
multiloadingindicator.h \ multiloadingindicator.h \
somafmservice.h \ somafmservice.h \
settingsdialog.h \ settingsdialog.h \
librarydirectorymodel.h \ librarydirectorymodel.h \
libraryconfigdialog.h \ libraryconfigdialog.h \
lastfmconfigdialog.h \ lastfmconfigdialog.h \
about.h about.h
FORMS += mainwindow.ui \ FORMS += mainwindow.ui \
libraryconfig.ui \ libraryconfig.ui \
fileview.ui \ fileview.ui \
lastfmconfig.ui \ lastfmconfig.ui \
lastfmstationdialog.ui \ lastfmstationdialog.ui \
trackslider.ui \ trackslider.ui \
edittagdialog.ui \ edittagdialog.ui \
multiloadingindicator.ui \ multiloadingindicator.ui \
settingsdialog.ui \ settingsdialog.ui \
libraryconfigdialog.ui \ libraryconfigdialog.ui \
lastfmconfigdialog.ui \ lastfmconfigdialog.ui \
about.ui about.ui
RESOURCES += ../data/data.qrc RESOURCES += ../data/data.qrc
OTHER_FILES += ../data/schema.sql \ OTHER_FILES += ../data/schema.sql \
../data/mainwindow.css ../data/mainwindow.css
LIBS += -llastfm LIBS += -llastfm
!win32 { !win32 {
mac { mac {
QMAKE_CXXFLAGS += -I/usr/local/include QMAKE_CXXFLAGS += -I/usr/local/include
LIBS += -L/usr/local/lib -ltag -llastfm -lxine -framework Carbon LIBS += -L/usr/local/lib \
} -ltag \
!mac { -lxine \
QMAKE_CXXFLAGS += $$system(taglib-config --cflags) -framework \
LIBS += $$system(taglib-config --libs) Carbon
QMAKE_CXXFLAGS += $$system(xine-config --cflags) }
LIBS += $$system(xine-config --libs) !mac {
QMAKE_CXXFLAGS += $$system(pkg-config --cflags libnotify) QMAKE_CXXFLAGS += $$system(taglib-config --cflags)
LIBS += $$system(pkg-config --libs libnotify) LIBS += $$system(taglib-config --libs)
} QMAKE_CXXFLAGS += $$system(xine-config --cflags)
} LIBS += $$system(xine-config --libs)
win32 { QMAKE_CXXFLAGS += $$system(pkg-config --cflags libnotify)
INCLUDEPATH += C:/msys/1.0/local/include \ LIBS += $$system(pkg-config --libs libnotify)
C:/msys/1.0/local/include/taglib }
LIBS += -Lc:/msys/1.0/local/lib \ }
-Lc:/msys/1.0/local/bin \ win32:LIBS += -ltag \
-ltag \ -lxine \
-lxine \ -lpthreadGC2
-lpthreadGC2 unix:!macx:SOURCES += osd_x11.cpp
} macx:SOURCES += osd_mac.cpp
unix:!macx:SOURCES += osd_x11.cpp win32:SOURCES += osd_win.cpp
macx:SOURCES += osd_mac.cpp
# QXT
# QXT INCLUDEPATH += ../3rdparty/qxt
INCLUDEPATH += ../3rdparty/qxt unix:!macx: {
HEADERS += ../3rdparty/qxt/qxtglobalshortcut.h HEADERS += ../3rdparty/qxt/qxtglobalshortcut.h
HEADERS += ../3rdparty/qxt/qxtglobalshortcut_p.h HEADERS += ../3rdparty/qxt/qxtglobalshortcut_p.h
HEADERS += ../3rdparty/qxt/qxtglobal.h HEADERS += ../3rdparty/qxt/qxtglobal.h
SOURCES += ../3rdparty/qxt/qxtglobalshortcut.cpp SOURCES += ../3rdparty/qxt/qxtglobalshortcut.cpp
SOURCES += ../3rdparty/qxt/qxtglobal.cpp SOURCES += ../3rdparty/qxt/qxtglobal.cpp
unix:!macx:SOURCES += ../3rdparty/qxt/qxtglobalshortcut_x11.cpp unix:!macx:SOURCES += ../3rdparty/qxt/qxtglobalshortcut_x11.cpp
macx:SOURCES += ../3rdparty/qxt/qxtglobalshortcut_mac.cpp macx:SOURCES += ../3rdparty/qxt/qxtglobalshortcut_mac.cpp
win32:SOURCES += ../3rdparty/qxt/qxtglobalshortcut_win.cpp win32:SOURCES += ../3rdparty/qxt/qxtglobalshortcut_win.cpp
}
# QtSingleApplication
INCLUDEPATH += ../3rdparty/qtsingleapplication # QtSingleApplication
HEADERS += ../3rdparty/qtsingleapplication/qtlocalpeer.h INCLUDEPATH += ../3rdparty/qtsingleapplication
HEADERS += ../3rdparty/qtsingleapplication/qtsingleapplication.h HEADERS += ../3rdparty/qtsingleapplication/qtlocalpeer.h
HEADERS += ../3rdparty/qtsingleapplication/qtsinglecoreapplication.h HEADERS += ../3rdparty/qtsingleapplication/qtsingleapplication.h
SOURCES += ../3rdparty/qtsingleapplication/qtsingleapplication.cpp HEADERS += ../3rdparty/qtsingleapplication/qtsinglecoreapplication.h
SOURCES += ../3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp SOURCES += ../3rdparty/qtsingleapplication/qtsingleapplication.cpp
SOURCES += ../3rdparty/qtsingleapplication/qtlocalpeer.cpp SOURCES += ../3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp
SOURCES += ../3rdparty/qtsingleapplication/qtlockedfile.cpp SOURCES += ../3rdparty/qtsingleapplication/qtlocalpeer.cpp
unix:SOURCES += ../3rdparty/qtsingleapplication/qtlockedfile_unix.cpp SOURCES += ../3rdparty/qtsingleapplication/qtlockedfile.cpp
win32:SOURCES += ../3rdparty/qtsingleapplication/qtlockedfile_win.cpp unix:SOURCES += ../3rdparty/qtsingleapplication/qtlockedfile_unix.cpp
win32:SOURCES += ../3rdparty/qtsingleapplication/qtlockedfile_win.cpp
# Installs
target.path = $${install_prefix}/bin/ # Installs
desktop.path = dummy target.path = $${install_prefix}/bin/
desktop.extra = xdg-icon-resource \ desktop.path = dummy
install \ desktop.extra = xdg-icon-resource \
--size \ install \
64 \ --size \
../dist/clementine_64.png \ 64 \
application-x-clementine \ ../dist/clementine_64.png \
; \ application-x-clementine \
xdg-desktop-menu \ ; \
install \ xdg-desktop-menu \
--novendor \ install \
../dist/clementine.desktop --novendor \
INSTALLS += target \ ../dist/clementine.desktop
desktop INSTALLS += target \
desktop

View File

@ -118,7 +118,7 @@ XineEngine::init()
qDebug() << "'Bringing joy to small mexican gerbils, a few weeks at a time.'"; qDebug() << "'Bringing joy to small mexican gerbils, a few weeks at a time.'";
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
setenv("XINE_PLUGIN_PATH", QString(QCoreApplication::applicationDirPath() + "/xine/plugins").toAscii().constData(), 1); putenv(QString("XINE_PLUGIN_PATH" + QCoreApplication::applicationDirPath() + "/xine/plugins").toAscii().constData());
#endif // Q_OS_WIN32 #endif // Q_OS_WIN32
#ifdef Q_OS_DARWIN #ifdef Q_OS_DARWIN