[SCM] guayadeque/master: Make multimedia keys work on GNOME 3.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Thu Jan 12 11:23:38 UTC 2012


The following commit has been merged in the master branch:
commit 2c28feb1a7b61b26f4384e6b3b1a149ca16e34c6
Author: Alessio Treglia <alessio at debian.org>
Date:   Thu Jan 12 12:22:38 2012 +0100

    Make multimedia keys work on GNOME 3.
    
    Thanks: Damyan Ivanov for the report.
    Closes: #655561
    LP: #860600

diff --git a/debian/patches/04-mmkeys.patch b/debian/patches/04-mmkeys.patch
new file mode 100644
index 0000000..73a91cb
--- /dev/null
+++ b/debian/patches/04-mmkeys.patch
@@ -0,0 +1,105 @@
+Description: Make multimedia keys work with GNOME 3.
+Origin: upstream, commit:r1660
+Bug-Ubuntu: https://launchpad.net/bugs/860600
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655561
+---
+ src/dbus/mmkeys.cpp |   53 +++++++++++++++++++++++++++++++++++++++++++++++++---
+ src/dbus/mmkeys.h   |    7 ++++--
+ 2 files changed, 55 insertions(+), 5 deletions(-)
+
+--- guayadeque.orig/src/dbus/mmkeys.cpp
++++ guayadeque/src/dbus/mmkeys.cpp
+@@ -31,13 +31,55 @@ guMMKeys::guMMKeys( guDBusServer * serve
+     RegisterClient();
+ 
+     // Support for the MultimediaKeys
+-    AddMatch( "type='signal',interface='org.gnome.SettingsDaemon'" );
++//    AddMatch( "type='signal',interface='org.gnome.SettingsDaemon'" );
+     AddMatch( "type='signal',interface='org.gnome.SettingsDaemon.MediaKeys'" );
++
++    GrabMediaPlayerKeys( 0 );
+ }
+ 
+ // -------------------------------------------------------------------------------- //
+ guMMKeys::~guMMKeys()
+ {
++    ReleaseMediaPlayerKeys();
++}
++
++// -------------------------------------------------------------------------------- //
++void guMMKeys::GrabMediaPlayerKeys( const unsigned int time )
++{
++    guDBusMethodCall * Msg = new guDBusMethodCall( "org.gnome.SettingsDaemon",
++            "/org/gnome/SettingsDaemon/MediaKeys",
++			"org.gnome.SettingsDaemon.MediaKeys",
++			"GrabMediaPlayerKeys" );
++
++    const char * AppId = "Guayadeque";
++
++    dbus_message_append_args( Msg->GetMessage(),
++                              DBUS_TYPE_STRING, &AppId,
++                              DBUS_TYPE_UINT32, &time,
++                              DBUS_TYPE_INVALID );
++
++    SendWithReply( Msg );
++
++    delete Msg;
++}
++
++// -------------------------------------------------------------------------------- //
++void guMMKeys::ReleaseMediaPlayerKeys( void )
++{
++    guDBusMethodCall * Msg = new guDBusMethodCall( "org.gnome.SettingsDaemon",
++            "/org/gnome/SettingsDaemon/MediaKeys",
++			"org.gnome.SettingsDaemon.MediaKeys",
++			"ReleaseMediaPlayerKeys" );
++
++    const char * AppId = "Guayadeque";
++
++    dbus_message_append_args( Msg->GetMessage(),
++                              DBUS_TYPE_STRING, &AppId,
++                              DBUS_TYPE_INVALID );
++
++    SendWithReply( Msg );
++
++    delete Msg;
+ }
+ 
+ // -------------------------------------------------------------------------------- //
+@@ -54,8 +96,13 @@ DBusHandlerResult guMMKeys::HandleMessag
+     // MULTIMEDIA KEYS
+     if( Type == DBUS_MESSAGE_TYPE_SIGNAL )  // If its a Signal message
+     {
+-        if( !strcmp( Path, "/org/gnome/SettingsDaemon" ) ||
+-            !strcmp( Path, "/org/gnome/SettingsDaemon/MediaKeys" ) )
++        //guLogMessage( wxT( "**** Received Signal ****\n" )
++        //              wxT( "Path   : '%s'\n" )
++        //              wxT( "Member : '%s'" ),
++        //             wxString( Path, wxConvUTF8 ).c_str(),
++        //             wxString( Member, wxConvUTF8 ).c_str()
++        //            );
++        if( !strcmp( Path, "/org/gnome/SettingsDaemon/MediaKeys" ) )
+         {
+             if( !strcmp( Member, "MediaPlayerKeyPressed" ) )
+             {
+--- guayadeque.orig/src/dbus/mmkeys.h
++++ guayadeque/src/dbus/mmkeys.h
+@@ -28,13 +28,16 @@
+ class guMMKeys : public guDBusClient
+ {
+   protected :
+-    guPlayerPanel * m_PlayerPanel;
++    guPlayerPanel *                 m_PlayerPanel;
+ 
+   public :
+     guMMKeys( guDBusServer * server, guPlayerPanel * playerpanel );
+     ~guMMKeys();
+ 
+-    virtual DBusHandlerResult   HandleMessages( guDBusMessage * msg, guDBusMessage * reply = NULL );
++    virtual DBusHandlerResult       HandleMessages( guDBusMessage * msg, guDBusMessage * reply = NULL );
++
++    void                            GrabMediaPlayerKeys( const unsigned int time );
++    void                            ReleaseMediaPlayerKeys( void );
+ 
+ };
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 907c2f5..b39326a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 01-desktop_file.patch
 02-wxsqlite3_linking.patch
 03-curl_headers_location.patch
+04-mmkeys.patch

-- 
guayadeque packaging



More information about the pkg-multimedia-commits mailing list