mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Clementine: bump version
This commit is contained in:
@@ -29,12 +29,12 @@ Remote control using a Wii Remote, MPRIS or the command-line.
|
||||
Copy music to your iPod, iPhone, MTP or mass-storage USB player.
|
||||
Queue manager."
|
||||
HOMEPAGE="https://www.clementine-player.org/"
|
||||
COPYRIGHT="2010-2019 David Sansome, John Maguire, Arnaud Bienner"
|
||||
COPYRIGHT="2010-2020 David Sansome, John Maguire, Arnaud Bienner"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="5"
|
||||
srcGitRev="36cc5b82f4daf5c2d4e93dc8072665e5a3ca622b"
|
||||
REVISION="1"
|
||||
srcGitRev="934fd336da6a72963b6e67c1ef3eaef2a1092b1c"
|
||||
SOURCE_URI="https://github.com/clementine-player/Clementine/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="d7f4ee2564fc045dd446226cff02032ba18b9030ad00ba670e484bc9612e7434"
|
||||
CHECKSUM_SHA256="66d27019417d9fa3ce3aa6398f634889b2bbc12f8872ca901911bb5c660fdc35"
|
||||
SOURCE_DIR="Clementine-$srcGitRev"
|
||||
PATCHES="clementine-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="clementine.rdef.in"
|
||||
@@ -1,111 +1,14 @@
|
||||
From ae3f5bacdd7f44e83859c44c9bf4fd7a32c84667 Mon Sep 17 00:00:00 2001
|
||||
From 53fb223400241e93c07a1e2277b0880b6324b58b Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 24 Feb 2019 14:47:42 +1000
|
||||
Date: Sun, 19 Apr 2020 15:30:42 +1000
|
||||
Subject: Fix build for Haiku
|
||||
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index d635aee..e9a0268 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -904,6 +904,14 @@ optional_source(WIN32
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/tinysvcmdns
|
||||
)
|
||||
|
||||
+# Platform specific - Haiku
|
||||
+optional_source(HAIKU
|
||||
+ SOURCES
|
||||
+ widgets/osd_win.cpp
|
||||
+ INCLUDE_DIRECTORIES
|
||||
+ ${CMAKE_SOURCE_DIR}/3rdparty/tinysvcmdns
|
||||
+)
|
||||
+
|
||||
# Platform specific - X11
|
||||
optional_source(HAVE_X11 SOURCES widgets/osd_x11.cpp)
|
||||
|
||||
@@ -1357,7 +1365,7 @@ if (WIN32)
|
||||
)
|
||||
endif (WIN32)
|
||||
|
||||
-if (UNIX AND NOT APPLE)
|
||||
+if (UNIX AND NOT APPLE AND NOT HAIKU)
|
||||
# Hack: the Gold linker pays attention to the order that libraries are
|
||||
# specified on the link line. -lX11 and -ldl are provided earlier in the link
|
||||
# command but they're actually used by libraries that appear after them, so
|
||||
diff --git a/src/core/qxtglobalshortcutbackend.cpp b/src/core/qxtglobalshortcutbackend.cpp
|
||||
index c04e41d..485a286 100644
|
||||
--- a/src/core/qxtglobalshortcutbackend.cpp
|
||||
+++ b/src/core/qxtglobalshortcutbackend.cpp
|
||||
@@ -19,7 +19,9 @@
|
||||
|
||||
#include "globalshortcuts.h"
|
||||
#include "qxtglobalshortcutbackend.h"
|
||||
+#ifndef Q_OS_HAIKU
|
||||
#include "qxtglobalshortcut.h"
|
||||
+#endif
|
||||
#include "core/logging.h"
|
||||
|
||||
#include <QAction>
|
||||
@@ -29,24 +31,29 @@ QxtGlobalShortcutBackend::QxtGlobalShortcutBackend(GlobalShortcuts* parent)
|
||||
: GlobalShortcutBackend(parent) {}
|
||||
|
||||
bool QxtGlobalShortcutBackend::DoRegister() {
|
||||
+#ifndef Q_OS_HAIKU
|
||||
qLog(Debug) << "registering";
|
||||
for (const GlobalShortcuts::Shortcut& shortcut :
|
||||
manager_->shortcuts().values()) {
|
||||
AddShortcut(shortcut.action);
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
void QxtGlobalShortcutBackend::AddShortcut(QAction* action) {
|
||||
+#ifndef Q_OS_HAIKU
|
||||
if (action->shortcut().isEmpty()) return;
|
||||
QxtGlobalShortcut* shortcut = new QxtGlobalShortcut(action->shortcut(), this);
|
||||
connect(shortcut, SIGNAL(activated()), action, SLOT(trigger()));
|
||||
shortcuts_ << shortcut;
|
||||
+#endif
|
||||
}
|
||||
|
||||
void QxtGlobalShortcutBackend::DoUnregister() {
|
||||
+#ifndef Q_OS_HAIKU
|
||||
qLog(Debug) << "unregistering";
|
||||
qDeleteAll(shortcuts_);
|
||||
shortcuts_.clear();
|
||||
+#endif
|
||||
}
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 0ee7a8f..88e6f7c 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -488,5 +488,9 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ kill(::getpid(), SIGKILL);
|
||||
+#endif
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From b7331379b00e2dc988a735747ec7bce72bb0e061 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 24 Feb 2019 15:11:18 +1000
|
||||
Subject: Disable qxt and x11
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 657efdb..abda86b 100644
|
||||
index 15cc4d3..904ad43 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -46,7 +46,7 @@ find_package(PkgConfig REQUIRED)
|
||||
@@ -49,7 +49,7 @@ find_package(PkgConfig REQUIRED)
|
||||
find_package(Protobuf REQUIRED)
|
||||
find_package(FFTW3)
|
||||
find_package(ALSA)
|
||||
@@ -114,7 +17,7 @@ index 657efdb..abda86b 100644
|
||||
find_package(X11)
|
||||
endif()
|
||||
if(X11_FOUND)
|
||||
@@ -395,6 +395,7 @@ if(NOT QTIOCOMPRESSOR_INCLUDE_DIRS OR NOT QTIOCOMPRESSOR_LIBRARIES)
|
||||
@@ -397,6 +397,7 @@ if(NOT QTIOCOMPRESSOR_INCLUDE_DIRS OR NOT QTIOCOMPRESSOR_LIBRARIES)
|
||||
set(QTIOCOMPRESSOR_LIBRARIES qtiocompressor)
|
||||
endif(NOT QTIOCOMPRESSOR_INCLUDE_DIRS OR NOT QTIOCOMPRESSOR_LIBRARIES)
|
||||
|
||||
@@ -122,7 +25,7 @@ index 657efdb..abda86b 100644
|
||||
# When/if upstream accepts our or reimplement our patches then these options can be
|
||||
# used to link to system installed qxt instead.
|
||||
option(USE_SYSTEM_QXT "Don't set this option unless your system Qxt library has been compiled with the Clementine patches in 3rdparty" OFF)
|
||||
@@ -412,6 +413,7 @@ else (USE_SYSTEM_QXT)
|
||||
@@ -414,6 +415,7 @@ else (USE_SYSTEM_QXT)
|
||||
add_subdirectory(3rdparty/qxt)
|
||||
endif (NOT APPLE)
|
||||
endif (USE_SYSTEM_QXT)
|
||||
@@ -130,182 +33,40 @@ index 657efdb..abda86b 100644
|
||||
|
||||
# Use system gmock if it's available
|
||||
# We need to look for both gmock and gtest
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From 98f936fd4b23bd08a30d2d1df8b93e9770f7024b Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 24 Feb 2019 16:01:04 +1000
|
||||
Subject: disable backtrace_symbols for haiku
|
||||
|
||||
|
||||
diff --git a/ext/libclementine-common/core/logging.cpp b/ext/libclementine-common/core/logging.cpp
|
||||
index 9aa1319..e148298 100644
|
||||
--- a/ext/libclementine-common/core/logging.cpp
|
||||
+++ b/ext/libclementine-common/core/logging.cpp
|
||||
@@ -254,7 +254,7 @@ QString DemangleSymbol(const QString& symbol) {
|
||||
}
|
||||
|
||||
void DumpStackTrace() {
|
||||
-#ifdef Q_OS_UNIX
|
||||
+#if defined(Q_OS_UNIX) && !defined(Q_OS_HAIKU)
|
||||
void* callstack[128];
|
||||
int callstack_size =
|
||||
backtrace(reinterpret_cast<void**>(&callstack), sizeof(callstack));
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From 0beeef3aaf72db942a4d5b213e13f4a73efce48e Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 24 Feb 2019 16:36:40 +1000
|
||||
Subject: Fix settings paths
|
||||
|
||||
|
||||
diff --git a/src/core/utilities.cpp b/src/core/utilities.cpp
|
||||
index fe106e2..58a80b9 100644
|
||||
--- a/src/core/utilities.cpp
|
||||
+++ b/src/core/utilities.cpp
|
||||
@@ -346,6 +346,9 @@ QString GetConfigPath(ConfigPath config) {
|
||||
#ifdef Q_OS_DARWIN
|
||||
return mac::GetApplicationSupportPath() + "/" +
|
||||
QCoreApplication::organizationName();
|
||||
+#elif defined(Q_OS_HAIKU)
|
||||
+ return QString("%1/config/settings/%2")
|
||||
+ .arg(QDir::homePath(), QCoreApplication::organizationName());
|
||||
#else
|
||||
return QString("%1/.config/%2")
|
||||
.arg(QDir::homePath(), QCoreApplication::organizationName());
|
||||
@@ -356,7 +359,7 @@ QString GetConfigPath(ConfigPath config) {
|
||||
if (Application::kIsPortable) {
|
||||
return GetConfigPath(Path_Root) + "/cache";
|
||||
}
|
||||
-#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)
|
||||
+#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && !defined(Q_OS_HAIKU)
|
||||
char* xdg = getenv("XDG_CACHE_HOME");
|
||||
if (!xdg || !*xdg) {
|
||||
return QString("%1/.cache/%2")
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From e30e22a1c4a3f20e65b2970b6ae9105d39496283 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 24 Feb 2019 17:39:21 +1000
|
||||
Subject: Tune default settings for Haiku
|
||||
|
||||
|
||||
diff --git a/src/library/librarysettingspage.cpp b/src/library/librarysettingspage.cpp
|
||||
index afb73df..763fb11 100644
|
||||
--- a/src/library/librarysettingspage.cpp
|
||||
+++ b/src/library/librarysettingspage.cpp
|
||||
@@ -132,7 +132,7 @@ void LibrarySettingsPage::Load() {
|
||||
|
||||
s.beginGroup(LibraryWatcher::kSettingsGroup);
|
||||
ui_->startup_scan->setChecked(s.value("startup_scan", true).toBool());
|
||||
- ui_->monitor->setChecked(s.value("monitor", true).toBool());
|
||||
+ ui_->monitor->setChecked(s.value("monitor", false).toBool());
|
||||
|
||||
QStringList filters =
|
||||
s.value("cover_art_patterns", QStringList() << "front"
|
||||
diff --git a/src/ui/appearancesettingspage.cpp b/src/ui/appearancesettingspage.cpp
|
||||
index 8cffb45..befbbca 100644
|
||||
--- a/src/ui/appearancesettingspage.cpp
|
||||
+++ b/src/ui/appearancesettingspage.cpp
|
||||
@@ -108,7 +108,11 @@ void AppearanceSettingsPage::Load() {
|
||||
current_background_color_ = original_background_color_;
|
||||
|
||||
InitColorSelectorsColors();
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ ui_->b_use_sys_icons->setChecked(s.value("b_use_sys_icons", true).toBool());
|
||||
+#else
|
||||
ui_->b_use_sys_icons->setChecked(s.value("b_use_sys_icons", false).toBool());
|
||||
+#endif
|
||||
ui_->b_hide_filter_toolbar->setChecked(s.value("b_hide_filter_toolbar",false).toBool());
|
||||
s.endGroup();
|
||||
|
||||
diff --git a/src/ui/iconloader.cpp b/src/ui/iconloader.cpp
|
||||
index f691504..857af19 100644
|
||||
--- a/src/ui/iconloader.cpp
|
||||
+++ b/src/ui/iconloader.cpp
|
||||
@@ -38,7 +38,11 @@ void IconLoader::Init() {
|
||||
icon_sub_path_ << "/icons" << "/providers" << "/last.fm" << "";
|
||||
QSettings settings;
|
||||
settings.beginGroup(Appearance::kSettingsGroup);
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ use_sys_icons_ = settings.value("b_use_sys_icons", true).toBool();
|
||||
+#else
|
||||
use_sys_icons_ = settings.value("b_use_sys_icons", false).toBool();
|
||||
+#endif
|
||||
}
|
||||
|
||||
QIcon IconLoader::Load(const QString& name, const IconType& icontype) {
|
||||
diff --git a/src/ui/notificationssettingspage.cpp b/src/ui/notificationssettingspage.cpp
|
||||
index a00eede..27d63b9 100644
|
||||
--- a/src/ui/notificationssettingspage.cpp
|
||||
+++ b/src/ui/notificationssettingspage.cpp
|
||||
@@ -98,7 +98,9 @@ NotificationsSettingsPage::NotificationsSettingsPage(SettingsDialog* dialog)
|
||||
if (!OSD::SupportsNativeNotifications())
|
||||
ui_->notifications_native->setEnabled(false);
|
||||
if (!OSD::SupportsTrayPopups()) ui_->notifications_tray->setEnabled(false);
|
||||
-
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ ui_->notifications_pretty->setEnabled(false);
|
||||
+#endif
|
||||
connect(ui_->notifications_pretty, SIGNAL(toggled(bool)),
|
||||
SLOT(UpdatePopupVisible()));
|
||||
|
||||
@@ -126,7 +128,11 @@ void NotificationsSettingsPage::Load() {
|
||||
|
||||
s.beginGroup(OSD::kSettingsGroup);
|
||||
OSD::Behaviour osd_behaviour =
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ OSD::Behaviour(s.value("Behaviour", OSD::TrayPopup).toInt());
|
||||
+#else
|
||||
OSD::Behaviour(s.value("Behaviour", OSD::Native).toInt());
|
||||
+#endif
|
||||
switch (osd_behaviour) {
|
||||
case OSD::Native:
|
||||
if (OSD::SupportsNativeNotifications()) {
|
||||
@@ -171,6 +177,11 @@ void NotificationsSettingsPage::Load() {
|
||||
ui_->notifications_pretty->isChecked());
|
||||
#endif
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ ui_->notifications_options->setEnabled(
|
||||
+ ui_->notifications_tray->isChecked());
|
||||
+#endif
|
||||
+
|
||||
// Pretty OSD
|
||||
pretty_popup_->ReloadSettings();
|
||||
ui_->notifications_opacity->setValue(pretty_popup_->background_opacity() *
|
||||
diff --git a/src/widgets/osd.cpp b/src/widgets/osd.cpp
|
||||
index 77178a1..f5ec09c 100644
|
||||
--- a/src/widgets/osd.cpp
|
||||
+++ b/src/widgets/osd.cpp
|
||||
@@ -64,7 +64,11 @@ OSD::~OSD() { delete pretty_popup_; }
|
||||
void OSD::ReloadSettings() {
|
||||
QSettings s;
|
||||
s.beginGroup(kSettingsGroup);
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ behaviour_ = OSD::Behaviour(s.value("Behaviour", TrayPopup).toInt());
|
||||
+#else
|
||||
behaviour_ = OSD::Behaviour(s.value("Behaviour", Native).toInt());
|
||||
+#endif
|
||||
timeout_msec_ = s.value("Timeout", 5000).toInt();
|
||||
show_on_volume_change_ = s.value("ShowOnVolumeChange", false).toBool();
|
||||
show_art_ = s.value("ShowArt", true).toBool();
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From e5c4462abe4bed169c5895cab46df9bc176a9506 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 24 Feb 2019 19:20:23 +1000
|
||||
Subject: Don't use action icons for side panel
|
||||
|
||||
|
||||
diff --git a/data/data.qrc b/data/data.qrc
|
||||
index f7fff7c..a8fd056 100644
|
||||
--- a/data/data.qrc
|
||||
+++ b/data/data.qrc
|
||||
@@ -102,6 +102,9 @@
|
||||
<file>icons/22x22/x-clementine-artist.png</file>
|
||||
<file>icons/22x22/x-clementine-shuffle.png</file>
|
||||
<file>icons/22x22/zoom-in.png</file>
|
||||
+ <file>icons/22x22/folder-network.png</file>
|
||||
+ <file>icons/22x22/folder-open.png</file>
|
||||
+ <file>icons/22x22/folder-text.png</file>
|
||||
<file>icons/32x32/application-exit.png</file>
|
||||
<file>icons/32x32/applications-internet.png</file>
|
||||
<file>icons/32x32/audio-volume-medium.png</file>
|
||||
@@ -186,6 +189,9 @@
|
||||
<file>icons/32x32/x-clementine-artist.png</file>
|
||||
<file>icons/32x32/x-clementine-shuffle.png</file>
|
||||
<file>icons/32x32/zoom-in.png</file>
|
||||
+ <file>icons/32x32/folder-network.png</file>
|
||||
+ <file>icons/32x32/folder-open.png</file>
|
||||
+ <file>icons/32x32/folder-text.png</file>
|
||||
<file>icons/48x48/application-exit.png</file>
|
||||
<file>icons/48x48/applications-internet.png</file>
|
||||
<file>icons/48x48/audio-volume-medium.png</file>
|
||||
@@ -267,6 +273,9 @@
|
||||
<file>icons/48x48/x-clementine-artist.png</file>
|
||||
<file>icons/48x48/x-clementine-shuffle.png</file>
|
||||
<file>icons/48x48/zoom-in.png</file>
|
||||
+ <file>icons/48x48/folder-network.png</file>
|
||||
+ <file>icons/48x48/folder-open.png</file>
|
||||
+ <file>icons/48x48/folder-text.png</file>
|
||||
<file>last.fm/as_disabled.png</file>
|
||||
<file>last.fm/as_light.png</file>
|
||||
<file>last.fm/as.png</file>
|
||||
diff --git a/data/icons/22x22/folder-network.png b/data/icons/22x22/folder-network.png
|
||||
new file mode 120000
|
||||
index 0000000..b2eb970
|
||||
@@ -378,8 +139,191 @@ index 0000000..fcdd6f2
|
||||
@@ -0,0 +1 @@
|
||||
+view-media-playlist.png
|
||||
\ No newline at end of file
|
||||
diff --git a/ext/libclementine-common/core/logging.cpp b/ext/libclementine-common/core/logging.cpp
|
||||
index 1a1269a..089a158 100644
|
||||
--- a/ext/libclementine-common/core/logging.cpp
|
||||
+++ b/ext/libclementine-common/core/logging.cpp
|
||||
@@ -313,7 +313,7 @@ QString DemangleSymbol(const QString& symbol) {
|
||||
}
|
||||
|
||||
void DumpStackTrace() {
|
||||
-#ifdef Q_OS_UNIX
|
||||
+#if defined(Q_OS_UNIX) && !defined(Q_OS_HAIKU)
|
||||
void* callstack[128];
|
||||
int callstack_size =
|
||||
backtrace(reinterpret_cast<void**>(&callstack), sizeof(callstack));
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 0ecea33..803d4a6 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -906,6 +906,14 @@ optional_source(WIN32
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/tinysvcmdns
|
||||
)
|
||||
|
||||
+# Platform specific - Haiku
|
||||
+optional_source(HAIKU
|
||||
+ SOURCES
|
||||
+ widgets/osd_win.cpp
|
||||
+ INCLUDE_DIRECTORIES
|
||||
+ ${CMAKE_SOURCE_DIR}/3rdparty/tinysvcmdns
|
||||
+)
|
||||
+
|
||||
# Platform specific - X11
|
||||
optional_source(HAVE_X11 SOURCES widgets/osd_x11.cpp)
|
||||
|
||||
@@ -1373,7 +1381,7 @@ if (WIN32)
|
||||
)
|
||||
endif (WIN32)
|
||||
|
||||
-if (UNIX AND NOT APPLE)
|
||||
+if (UNIX AND NOT APPLE AND NOT HAIKU)
|
||||
# Hack: the Gold linker pays attention to the order that libraries are
|
||||
# specified on the link line. -lX11 and -ldl are provided earlier in the link
|
||||
# command but they're actually used by libraries that appear after them, so
|
||||
diff --git a/src/core/backgroundstreams.cpp b/src/core/backgroundstreams.cpp
|
||||
index 2e6ac60..9ac5b59 100644
|
||||
--- a/src/core/backgroundstreams.cpp
|
||||
+++ b/src/core/backgroundstreams.cpp
|
||||
@@ -44,7 +44,7 @@ void BackgroundStreams::LoadStreams() {
|
||||
int version = s.value("version", 0).toInt();
|
||||
if (version < 1) {
|
||||
AddStream(QT_TR_NOOP("Hypnotoad"), QUrl(kHypnotoadUrl));
|
||||
- AddStream(QT_TR_NOOP("Rain"), QUrl(kRainUrl));
|
||||
+// AddStream(QT_TR_NOOP("Rain"), QUrl(kRainUrl));
|
||||
}
|
||||
|
||||
if (version < kVersion) {
|
||||
diff --git a/src/core/qxtglobalshortcutbackend.cpp b/src/core/qxtglobalshortcutbackend.cpp
|
||||
index 6c87860..7420929 100644
|
||||
--- a/src/core/qxtglobalshortcutbackend.cpp
|
||||
+++ b/src/core/qxtglobalshortcutbackend.cpp
|
||||
@@ -19,7 +19,9 @@
|
||||
|
||||
#include "globalshortcuts.h"
|
||||
#include "qxtglobalshortcutbackend.h"
|
||||
+#ifndef Q_OS_HAIKU
|
||||
#include "qxtglobalshortcut.h"
|
||||
+#endif
|
||||
#include "core/logging.h"
|
||||
|
||||
#include <QAction>
|
||||
@@ -30,6 +32,7 @@ QxtGlobalShortcutBackend::QxtGlobalShortcutBackend(GlobalShortcuts* parent)
|
||||
: GlobalShortcutBackend(parent) {}
|
||||
|
||||
bool QxtGlobalShortcutBackend::DoRegister() {
|
||||
+#ifndef Q_OS_HAIKU
|
||||
if (QGuiApplication::platformName() == "wayland") {
|
||||
qLog(Warning) << "No support for Wayland in qxt.";
|
||||
return false;
|
||||
@@ -39,19 +42,23 @@ bool QxtGlobalShortcutBackend::DoRegister() {
|
||||
manager_->shortcuts().values()) {
|
||||
AddShortcut(shortcut.action);
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
void QxtGlobalShortcutBackend::AddShortcut(QAction* action) {
|
||||
+#ifndef Q_OS_HAIKU
|
||||
if (action->shortcut().isEmpty()) return;
|
||||
QxtGlobalShortcut* shortcut = new QxtGlobalShortcut(action->shortcut(), this);
|
||||
connect(shortcut, SIGNAL(activated()), action, SLOT(trigger()));
|
||||
shortcuts_ << shortcut;
|
||||
+#endif
|
||||
}
|
||||
|
||||
void QxtGlobalShortcutBackend::DoUnregister() {
|
||||
+#ifndef Q_OS_HAIKU
|
||||
qLog(Debug) << "unregistering";
|
||||
qDeleteAll(shortcuts_);
|
||||
shortcuts_.clear();
|
||||
+#endif
|
||||
}
|
||||
diff --git a/src/core/utilities.cpp b/src/core/utilities.cpp
|
||||
index 03a7966..6cbd6b3 100644
|
||||
--- a/src/core/utilities.cpp
|
||||
+++ b/src/core/utilities.cpp
|
||||
@@ -349,6 +349,9 @@ QString GetConfigPath(ConfigPath config) {
|
||||
#ifdef Q_OS_DARWIN
|
||||
return mac::GetApplicationSupportPath() + "/" +
|
||||
QCoreApplication::organizationName();
|
||||
+#elif defined(Q_OS_HAIKU)
|
||||
+ return QString("%1/config/settings/%2")
|
||||
+ .arg(QDir::homePath(), QCoreApplication::organizationName());
|
||||
#else
|
||||
return QString("%1/%2").arg(
|
||||
QStandardPaths::writableLocation(QStandardPaths::ConfigLocation),
|
||||
@@ -360,7 +363,7 @@ QString GetConfigPath(ConfigPath config) {
|
||||
if (Application::kIsPortable) {
|
||||
return GetConfigPath(Path_Root) + "/cache";
|
||||
}
|
||||
-#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)
|
||||
+#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && !defined(Q_OS_HAIKU)
|
||||
return QString("%1/%2").arg(QStandardPaths::writableLocation(
|
||||
QStandardPaths::GenericCacheLocation),
|
||||
QCoreApplication::organizationName());
|
||||
diff --git a/src/library/librarysettingspage.cpp b/src/library/librarysettingspage.cpp
|
||||
index afb73df..763fb11 100644
|
||||
--- a/src/library/librarysettingspage.cpp
|
||||
+++ b/src/library/librarysettingspage.cpp
|
||||
@@ -132,7 +132,7 @@ void LibrarySettingsPage::Load() {
|
||||
|
||||
s.beginGroup(LibraryWatcher::kSettingsGroup);
|
||||
ui_->startup_scan->setChecked(s.value("startup_scan", true).toBool());
|
||||
- ui_->monitor->setChecked(s.value("monitor", true).toBool());
|
||||
+ ui_->monitor->setChecked(s.value("monitor", false).toBool());
|
||||
|
||||
QStringList filters =
|
||||
s.value("cover_art_patterns", QStringList() << "front"
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 6b59169..909bdce 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -460,5 +460,9 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
int ret = a.exec();
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ kill(::getpid(), SIGKILL);
|
||||
+#endif
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
diff --git a/src/ui/appearancesettingspage.cpp b/src/ui/appearancesettingspage.cpp
|
||||
index 8cffb45..befbbca 100644
|
||||
--- a/src/ui/appearancesettingspage.cpp
|
||||
+++ b/src/ui/appearancesettingspage.cpp
|
||||
@@ -108,7 +108,11 @@ void AppearanceSettingsPage::Load() {
|
||||
current_background_color_ = original_background_color_;
|
||||
|
||||
InitColorSelectorsColors();
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ ui_->b_use_sys_icons->setChecked(s.value("b_use_sys_icons", true).toBool());
|
||||
+#else
|
||||
ui_->b_use_sys_icons->setChecked(s.value("b_use_sys_icons", false).toBool());
|
||||
+#endif
|
||||
ui_->b_hide_filter_toolbar->setChecked(s.value("b_hide_filter_toolbar",false).toBool());
|
||||
s.endGroup();
|
||||
|
||||
diff --git a/src/ui/iconloader.cpp b/src/ui/iconloader.cpp
|
||||
index f691504..857af19 100644
|
||||
--- a/src/ui/iconloader.cpp
|
||||
+++ b/src/ui/iconloader.cpp
|
||||
@@ -38,7 +38,11 @@ void IconLoader::Init() {
|
||||
icon_sub_path_ << "/icons" << "/providers" << "/last.fm" << "";
|
||||
QSettings settings;
|
||||
settings.beginGroup(Appearance::kSettingsGroup);
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ use_sys_icons_ = settings.value("b_use_sys_icons", true).toBool();
|
||||
+#else
|
||||
use_sys_icons_ = settings.value("b_use_sys_icons", false).toBool();
|
||||
+#endif
|
||||
}
|
||||
|
||||
QIcon IconLoader::Load(const QString& name, const IconType& icontype) {
|
||||
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
|
||||
index 2944d46..3f116b9 100644
|
||||
index ddf4a84..048057c 100644
|
||||
--- a/src/ui/mainwindow.cpp
|
||||
+++ b/src/ui/mainwindow.cpp
|
||||
@@ -266,13 +266,13 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||
@@ -399,91 +343,7 @@ index 2944d46..3f116b9 100644
|
||||
tr("Internet"));
|
||||
ui_->tabs->addTab(
|
||||
device_view_container_,
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From bc85872b90a93ed0c5a51b1d9d361952e93956bc Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 24 Feb 2019 19:38:26 +1000
|
||||
Subject: Add icon aliases to resource
|
||||
|
||||
|
||||
diff --git a/data/data.qrc b/data/data.qrc
|
||||
index f7fff7c..a8fd056 100644
|
||||
--- a/data/data.qrc
|
||||
+++ b/data/data.qrc
|
||||
@@ -102,6 +102,9 @@
|
||||
<file>icons/22x22/x-clementine-artist.png</file>
|
||||
<file>icons/22x22/x-clementine-shuffle.png</file>
|
||||
<file>icons/22x22/zoom-in.png</file>
|
||||
+ <file>icons/22x22/folder-network.png</file>
|
||||
+ <file>icons/22x22/folder-open.png</file>
|
||||
+ <file>icons/22x22/folder-text.png</file>
|
||||
<file>icons/32x32/application-exit.png</file>
|
||||
<file>icons/32x32/applications-internet.png</file>
|
||||
<file>icons/32x32/audio-volume-medium.png</file>
|
||||
@@ -186,6 +189,9 @@
|
||||
<file>icons/32x32/x-clementine-artist.png</file>
|
||||
<file>icons/32x32/x-clementine-shuffle.png</file>
|
||||
<file>icons/32x32/zoom-in.png</file>
|
||||
+ <file>icons/32x32/folder-network.png</file>
|
||||
+ <file>icons/32x32/folder-open.png</file>
|
||||
+ <file>icons/32x32/folder-text.png</file>
|
||||
<file>icons/48x48/application-exit.png</file>
|
||||
<file>icons/48x48/applications-internet.png</file>
|
||||
<file>icons/48x48/audio-volume-medium.png</file>
|
||||
@@ -267,6 +273,9 @@
|
||||
<file>icons/48x48/x-clementine-artist.png</file>
|
||||
<file>icons/48x48/x-clementine-shuffle.png</file>
|
||||
<file>icons/48x48/zoom-in.png</file>
|
||||
+ <file>icons/48x48/folder-network.png</file>
|
||||
+ <file>icons/48x48/folder-open.png</file>
|
||||
+ <file>icons/48x48/folder-text.png</file>
|
||||
<file>last.fm/as_disabled.png</file>
|
||||
<file>last.fm/as_light.png</file>
|
||||
<file>last.fm/as.png</file>
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From effac414d78c55c803e889b7ecc89fb2b32cee11 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 24 Feb 2019 19:40:32 +1000
|
||||
Subject: Remove broken background stream
|
||||
|
||||
|
||||
diff --git a/src/core/backgroundstreams.cpp b/src/core/backgroundstreams.cpp
|
||||
index 2e6ac60..9ac5b59 100644
|
||||
--- a/src/core/backgroundstreams.cpp
|
||||
+++ b/src/core/backgroundstreams.cpp
|
||||
@@ -44,7 +44,7 @@ void BackgroundStreams::LoadStreams() {
|
||||
int version = s.value("version", 0).toInt();
|
||||
if (version < 1) {
|
||||
AddStream(QT_TR_NOOP("Hypnotoad"), QUrl(kHypnotoadUrl));
|
||||
- AddStream(QT_TR_NOOP("Rain"), QUrl(kRainUrl));
|
||||
+// AddStream(QT_TR_NOOP("Rain"), QUrl(kRainUrl));
|
||||
}
|
||||
|
||||
if (version < kVersion) {
|
||||
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
|
||||
index 3f116b9..a2c8e74 100644
|
||||
--- a/src/ui/mainwindow.cpp
|
||||
+++ b/src/ui/mainwindow.cpp
|
||||
@@ -482,7 +482,7 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||
connect(ui_->action_view_stream_details, SIGNAL(triggered()),
|
||||
SLOT(DiscoverStreamDetails()));
|
||||
|
||||
- background_streams_->AddAction("Rain", ui_->action_rain);
|
||||
+// background_streams_->AddAction("Rain", ui_->action_rain);
|
||||
background_streams_->AddAction("Hypnotoad", ui_->action_hypnotoad);
|
||||
background_streams_->AddAction("Make it so!", ui_->action_enterprise);
|
||||
|
||||
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
|
||||
index a2c8e74..68e2395 100644
|
||||
--- a/src/ui/mainwindow.cpp
|
||||
+++ b/src/ui/mainwindow.cpp
|
||||
@@ -385,8 +385,8 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||
@@ -387,8 +387,8 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||
IconLoader::Load("document-save", IconLoader::Base));
|
||||
ui_->action_full_library_scan->setIcon(
|
||||
IconLoader::Load("view-refresh", IconLoader::Base));
|
||||
@@ -494,6 +354,15 @@ index a2c8e74..68e2395 100644
|
||||
ui_->action_hypnotoad->setIcon(
|
||||
IconLoader::Load("hypnotoad", IconLoader::Base));
|
||||
ui_->action_kittens->setIcon(IconLoader::Load("kittens", IconLoader::Base));
|
||||
@@ -484,7 +484,7 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||
connect(ui_->action_view_stream_details, SIGNAL(triggered()),
|
||||
SLOT(DiscoverStreamDetails()));
|
||||
|
||||
- background_streams_->AddAction("Rain", ui_->action_rain);
|
||||
+// background_streams_->AddAction("Rain", ui_->action_rain);
|
||||
background_streams_->AddAction("Hypnotoad", ui_->action_hypnotoad);
|
||||
background_streams_->AddAction("Make it so!", ui_->action_enterprise);
|
||||
|
||||
diff --git a/src/ui/mainwindow.ui b/src/ui/mainwindow.ui
|
||||
index fce8c3f..d240c07 100644
|
||||
--- a/src/ui/mainwindow.ui
|
||||
@@ -521,6 +390,61 @@ index fce8c3f..d240c07 100644
|
||||
<action name="action_hypnotoad">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
diff --git a/src/ui/notificationssettingspage.cpp b/src/ui/notificationssettingspage.cpp
|
||||
index c04dcb3..3b5108b 100644
|
||||
--- a/src/ui/notificationssettingspage.cpp
|
||||
+++ b/src/ui/notificationssettingspage.cpp
|
||||
@@ -98,7 +98,9 @@ NotificationsSettingsPage::NotificationsSettingsPage(SettingsDialog* dialog)
|
||||
if (!OSD::SupportsNativeNotifications())
|
||||
ui_->notifications_native->setEnabled(false);
|
||||
if (!OSD::SupportsTrayPopups()) ui_->notifications_tray->setEnabled(false);
|
||||
-
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ ui_->notifications_pretty->setEnabled(false);
|
||||
+#endif
|
||||
connect(ui_->notifications_pretty, SIGNAL(toggled(bool)),
|
||||
SLOT(UpdatePopupVisible()));
|
||||
|
||||
@@ -126,7 +128,11 @@ void NotificationsSettingsPage::Load() {
|
||||
|
||||
s.beginGroup(OSD::kSettingsGroup);
|
||||
OSD::Behaviour osd_behaviour =
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ OSD::Behaviour(s.value("Behaviour", OSD::TrayPopup).toInt());
|
||||
+#else
|
||||
OSD::Behaviour(s.value("Behaviour", OSD::Native).toInt());
|
||||
+#endif
|
||||
switch (osd_behaviour) {
|
||||
case OSD::Native:
|
||||
if (OSD::SupportsNativeNotifications()) {
|
||||
@@ -171,6 +177,11 @@ void NotificationsSettingsPage::Load() {
|
||||
ui_->notifications_pretty->isChecked());
|
||||
#endif
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ ui_->notifications_options->setEnabled(
|
||||
+ ui_->notifications_tray->isChecked());
|
||||
+#endif
|
||||
+
|
||||
// Pretty OSD
|
||||
pretty_popup_->ReloadSettings();
|
||||
ui_->notifications_opacity->setValue(pretty_popup_->background_opacity() *
|
||||
diff --git a/src/widgets/osd.cpp b/src/widgets/osd.cpp
|
||||
index 7cd74df..5e366e0 100644
|
||||
--- a/src/widgets/osd.cpp
|
||||
+++ b/src/widgets/osd.cpp
|
||||
@@ -64,7 +64,11 @@ OSD::~OSD() { delete pretty_popup_; }
|
||||
void OSD::ReloadSettings() {
|
||||
QSettings s;
|
||||
s.beginGroup(kSettingsGroup);
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ behaviour_ = OSD::Behaviour(s.value("Behaviour", TrayPopup).toInt());
|
||||
+#else
|
||||
behaviour_ = OSD::Behaviour(s.value("Behaviour", Native).toInt());
|
||||
+#endif
|
||||
timeout_msec_ = s.value("Timeout", 5000).toInt();
|
||||
show_on_volume_change_ = s.value("ShowOnVolumeChange", false).toBool();
|
||||
show_art_ = s.value("ShowArt", true).toBool();
|
||||
--
|
||||
2.19.1
|
||||
2.26.0
|
||||
|
||||
Reference in New Issue
Block a user