From 076deb7cdd0afa45200f82acaa0d1cea660c1c44 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 18 Mar 2017 17:19:57 +0100 Subject: [PATCH] Set PulseAudio property overrides to QupZilla app name and icon Closes #2262 --- src/lib/app/mainapplication.cpp | 8 ++++++++ src/lib/app/mainapplication.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index e7fd29f6b..513adc73d 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -688,6 +688,7 @@ void MainApplication::postLaunch() connect(this, SIGNAL(aboutToQuit()), this, SLOT(saveSettings())); createJumpList(); + initPulseSupport(); QTimer::singleShot(5000, this, &MainApplication::runDeferredPostLaunchActions); } @@ -1171,6 +1172,13 @@ void MainApplication::createJumpList() #endif } +void MainApplication::initPulseSupport() +{ + qputenv("PULSE_PROP_OVERRIDE_application.name", "QupZilla"); + qputenv("PULSE_PROP_OVERRIDE_application.icon_name", "qupzilla"); + qputenv("PULSE_PROP_OVERRIDE_media.icon_name", "qupzilla"); +} + #if defined(Q_OS_WIN) && !defined(Q_OS_OS2) RegisterQAppAssociation* MainApplication::associationManager() { diff --git a/src/lib/app/mainapplication.h b/src/lib/app/mainapplication.h index 66dd3d123..73a02be53 100644 --- a/src/lib/app/mainapplication.h +++ b/src/lib/app/mainapplication.h @@ -187,6 +187,7 @@ private: QString m_languageFile; void createJumpList(); + void initPulseSupport(); #if defined(Q_OS_WIN) && !defined(Q_OS_OS2) public: