Fix global shortcuts on GNOME
(upstream git commit a649c7114be2612bce72e9c292fab4eb964373a8)
This commit is contained in:
parent
4cce3ec8b0
commit
8fe9ac1d0d
@ -1,9 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.46 2016/03/26 20:37:36 zhuk Exp $
|
||||
# $OpenBSD: Makefile,v 1.47 2016/12/05 11:24:50 dcoppa Exp $
|
||||
|
||||
COMMENT = standalone YouTube.com video browser/player
|
||||
|
||||
DISTNAME = minitube-2.5.2
|
||||
|
||||
REVISION = 0
|
||||
|
||||
CATEGORIES = www multimedia
|
||||
|
||||
HOMEPAGE = http://flavio.tordini.org/minitube
|
||||
|
@ -0,0 +1,32 @@
|
||||
$OpenBSD: patch-src_gnomeglobalshortcutbackend_cpp,v 1.1 2016/12/05 11:24:50 dcoppa Exp $
|
||||
|
||||
commit a649c7114be2612bce72e9c292fab4eb964373a8
|
||||
Author: Felix Kaiser <felix.kaiser@fxkr.net>
|
||||
Date: Wed Oct 12 20:08:30 2016 +0200
|
||||
|
||||
Fix global shortcuts on GNOME
|
||||
|
||||
--- src/gnomeglobalshortcutbackend.cpp.orig Thu Sep 17 16:14:00 2015
|
||||
+++ src/gnomeglobalshortcutbackend.cpp Mon Dec 5 12:15:26 2016
|
||||
@@ -49,6 +49,12 @@ bool GnomeGlobalShortcutBackend::DoRegister() {
|
||||
kGsdService, kGsdPath, kGsdInterface, QDBusConnection::sessionBus(), this);
|
||||
}
|
||||
|
||||
+ QDBusMessage reply = interface_->call("GrabMediaPlayerKeys", "Minitube", (unsigned int) 0);
|
||||
+
|
||||
+ if (reply.type() == QDBusMessage::ErrorMessage) {
|
||||
+ qWarning() << "Failed to grab media player keys. Error:" << reply.errorMessage();
|
||||
+ }
|
||||
+
|
||||
connect(interface_, SIGNAL(MediaPlayerKeyPressed(QString,QString)),
|
||||
this, SLOT(GnomeMediaKeyPressed(QString,QString)));
|
||||
|
||||
@@ -64,6 +70,8 @@ void GnomeGlobalShortcutBackend::DoUnregister() {
|
||||
|
||||
disconnect(interface_, SIGNAL(MediaPlayerKeyPressed(QString,QString)),
|
||||
this, SLOT(GnomeMediaKeyPressed(QString,QString)));
|
||||
+
|
||||
+ interface_->call("ReleaseMediaPlayerKeys", "Minitube");
|
||||
}
|
||||
|
||||
void GnomeGlobalShortcutBackend::GnomeMediaKeyPressed(const QString&, const QString& key) {
|
Loading…
x
Reference in New Issue
Block a user