Package: guayadeque
Version: 0.3.1~dfsg0-1
Severity: normal
Tags: upstream patch

Hi,

(This is also LP#860600 [0])

    [0] https://bugs.launchpad.net/ubuntu/+source/guayadeque/+bug/860600

Pressing multimedia keys (prev/next/play/stop) has no effect on guayadeque. 
What happens is that gnome shows a big "no parking" sign.

Looking at [1], it seems this is fixed by upstream in revision 1660 of their 
subversion tree[2].

 [1] 
http://guayadeque.org/forums/index.php?p=/discussion/comment/3221#Comment_3221
 [2] http://guayadeque.svn.sourceforge.net/viewvc/guayadeque/

As I understand it, that revision exports some player control interfaces to 
dbus, so that gnome is able to communicate with guayadeque.

And indeed, applying the attached patch makes the multimedia keys work under 
gnome 3.

Please consider applying the patch to the Debian package.


Thanks,
    dam

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages guayadeque depends on:
ii  gstreamer0.10-plugins-base  0.10.35-1
ii  gstreamer0.10-plugins-good  0.10.30-2.1
ii  libc6                       2.13-24
ii  libcurl3-gnutls             7.23.1-3
ii  libdbus-1-3                 1.5.0-2
ii  libflac8                    1.2.1-6
ii  libgcc1                     1:4.6.2-9
ii  libgdk-pixbuf2.0-0          2.24.0-2
ii  libglib2.0-0                2.30.2-4
ii  libgpod4                    0.8.2-4
ii  libgstreamer0.10-0          0.10.35-1
ii  libimobiledevice2           1.1.1-3
ii  libsqlite3-0                3.7.9-2
ii  libstdc++6                  4.6.2-9
ii  libtag1c2a                  1.7-1
ii  libwxbase2.8-0              2.8.12.1-6
ii  libwxgtk2.8-0               2.8.12.1-6
ii  libwxsqlite3-2.8-0          2.1.3-1
ii  libxml2                     2.7.8.dfsg-5.1

guayadeque recommends no packages.

guayadeque suggests no packages.

-- no debconf information
diff --git a/src/dbus/mmkeys.cpp b/src/dbus/mmkeys.cpp
index 4754ce1..a4d8831 100644
--- a/src/dbus/mmkeys.cpp
+++ b/src/dbus/mmkeys.cpp
@@ -31,13 +31,55 @@ guMMKeys::guMMKeys( guDBusServer * server, guPlayerPanel * playerpanel ) : guDBu
     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::HandleMessages( guDBusMessage * msg, guDBusMessage *
     // 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" ) )
             {
diff --git a/src/dbus/mmkeys.h b/src/dbus/mmkeys.h
index a950e70..fa57f9d 100644
--- a/src/dbus/mmkeys.h
+++ b/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 );
 
 };
 
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to