[Xfce4-commits] <parole:master> Fix playlist interface name to correctly add media file from the command line
Ali Abdallah
noreply at xfce.org
Tue Sep 29 11:38:01 CEST 2009
Updating branch refs/heads/master
to ae52c422cdda334800f03b32a72f280b9043d15d (commit)
from e6e9c2f47561081d3608f60f122250f5ba300b77 (commit)
commit ae52c422cdda334800f03b32a72f280b9043d15d
Author: Ali Abdallah <ali at ali-xfce.org>
Date: Tue Sep 29 10:46:58 2009 +0000
Fix playlist interface name to correctly add media file from the command line
parole/main.c | 4 ++--
parole/parole-dbus.c | 6 +++---
parole/parole-dbus.h | 14 +++++++++-----
parole/parole-medialist.c | 2 +-
4 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/parole/main.c b/parole/main.c
index 12cf675..be22829 100644
--- a/parole/main.c
+++ b/parole/main.c
@@ -120,7 +120,7 @@ parole_send (gchar **filenames)
{
DBusGProxy *proxy;
- proxy = parole_get_proxy ();
+ proxy = parole_get_proxy (PAROLE_DBUS_PLAYLIST_PATH, PAROLE_DBUS_PLAYLIST_INTERFACE);
if ( !proxy )
g_error ("Unable to create proxy for %s", PAROLE_DBUS_NAME);
@@ -139,7 +139,7 @@ parole_send_message (const gchar *message)
DBusGProxy *proxy;
GError *error = NULL;
- proxy = parole_get_proxy ();
+ proxy = parole_get_proxy (PAROLE_DBUS_PATH, PAROLE_DBUS_INTERFACE);
dbus_g_proxy_call (proxy, message, &error,
G_TYPE_INVALID,
diff --git a/parole/parole-dbus.c b/parole/parole-dbus.c
index 3e8f0a3..8312422 100644
--- a/parole/parole-dbus.c
+++ b/parole/parole-dbus.c
@@ -58,7 +58,7 @@ parole_g_session_bus_get (void)
}
DBusGProxy *
-parole_get_proxy (void)
+parole_get_proxy (const gchar *path, const gchar *iface)
{
DBusGConnection *bus;
DBusGProxy *proxy;
@@ -67,8 +67,8 @@ parole_get_proxy (void)
proxy = dbus_g_proxy_new_for_name (bus,
PAROLE_DBUS_NAME,
- PAROLE_DBUS_PATH,
- PAROLE_DBUS_INTERFACE);
+ path,
+ iface);
if ( !proxy )
g_error ("Unable to create proxy for %s", PAROLE_DBUS_NAME);
diff --git a/parole/parole-dbus.h b/parole/parole-dbus.h
index a70fcab..836ccae 100644
--- a/parole/parole-dbus.h
+++ b/parole/parole-dbus.h
@@ -23,14 +23,18 @@
#include <dbus/dbus-glib.h>
-#define PAROLE_DBUS_NAME "org.Parole.Media.Player"
-#define PAROLE_DBUS_PATH "/org/Parole/Media/Player"
-#define PAROLE_DBUS_LIST_PATH "/org/Parole/Media/List"
-#define PAROLE_DBUS_INTERFACE "org.Parole.Media.Player"
+#define PAROLE_DBUS_NAME "org.Parole.Media.Player"
+
+#define PAROLE_DBUS_PATH "/org/Parole/Media/Player"
+#define PAROLE_DBUS_PLAYLIST_PATH "/org/Parole/Media/List"
+
+#define PAROLE_DBUS_INTERFACE "org.Parole.Media.Player"
+#define PAROLE_DBUS_PLAYLIST_INTERFACE "org.Parole.Media.List"
DBusGConnection *parole_g_session_bus_get (void);
-DBusGProxy *parole_get_proxy (void);
+DBusGProxy *parole_get_proxy (const gchar *path,
+ const gchar *iface);
gboolean parole_dbus_name_has_owner (const gchar *name);
diff --git a/parole/parole-medialist.c b/parole/parole-medialist.c
index 910adb3..ab5144f 100644
--- a/parole/parole-medialist.c
+++ b/parole/parole-medialist.c
@@ -1302,7 +1302,7 @@ static void
parole_media_list_dbus_init (ParoleMediaList *list)
{
dbus_g_connection_register_g_object (parole_g_session_bus_get (),
- PAROLE_DBUS_LIST_PATH,
+ PAROLE_DBUS_PLAYLIST_PATH,
G_OBJECT (list));
}
More information about the Xfce4-commits
mailing list