Index: src/xfmedia-remote.c =================================================================== --- src/xfmedia-remote.c (revision 18308) +++ src/xfmedia-remote.c (working copy) @@ -133,7 +133,7 @@ " Saves the current playlist to the specified FILE.\n")); g_print(_(" -Q, --quit Instructs Xfmedia to quit.\n")); g_print(_(" -j, --jump-to-file Causes Xfmedia to show the main window (if not visible)\n" - " and show the jump-to-file entry box.")); + " and show the jump-to-file entry box.\n")); } int @@ -145,6 +145,8 @@ gboolean possibly_play_too = FALSE; XfmediaRemoteStatus ret; + g_type_init(); + xfce_textdomain(GETTEXT_PACKAGE, LOCALEDIR, "UTF-8"); if(!setlocale(LC_ALL, "")) g_warning("Locale not supported; using 'C'."); Index: xfmedia/remote-client.c =================================================================== --- xfmedia/remote-client.c (revision 18308) +++ xfmedia/remote-client.c (working copy) @@ -102,6 +102,8 @@ XFMEDIA_DBUS_INTERFACE, XFMEDIA_REMOTE_IS_RUNNING); #ifdef DBUS_USE_OLD_API dbus_message_set_auto_activation(msg, FALSE); +#else + dbus_message_set_auto_start(msg, FALSE); #endif dbus_error_init(&derr); @@ -174,6 +176,8 @@ XFMEDIA_DBUS_INTERFACE, XFMEDIA_REMOTE_CLEAR_PLAYLIST); #ifdef DBUS_USE_OLD_API dbus_message_set_auto_activation(msg, FALSE); +#else + dbus_message_set_auto_start(msg, FALSE); #endif dbus_error_init(&derr); @@ -200,24 +204,31 @@ if(!filename || !*filename) ret = XFMEDIA_REMOTE_BAD_ARGUMENTS; else { - msg = dbus_message_new_method_call(service_name, path_name, - XFMEDIA_DBUS_INTERFACE, command); + gchar *utf8_fn = g_filename_to_utf8(filename, -1, NULL, NULL, NULL); + + if (utf8_fn) { + msg = dbus_message_new_method_call(service_name, path_name, + XFMEDIA_DBUS_INTERFACE, command); #ifdef DBUS_USE_OLD_API - dbus_message_set_auto_activation(msg, FALSE); + dbus_message_set_auto_activation(msg, FALSE); +#else + dbus_message_set_auto_start(msg, FALSE); #endif - dbus_message_append_args(msg, + dbus_message_append_args(msg, #ifdef DBUS_USE_OLD_API - DBUS_TYPE_STRING, filename, + DBUS_TYPE_STRING, utf8_fn, #else - DBUS_TYPE_STRING, &filename, + DBUS_TYPE_STRING, &utf8_fn, #endif - DBUS_TYPE_INVALID); + DBUS_TYPE_INVALID); + + dbus_error_init(&derr); + msg_ret = dbus_connection_send_with_reply_and_block(dbus_conn, + msg, 5000, &derr); + dbus_message_unref(msg); + g_free(utf8_fn); + } - dbus_error_init(&derr); - msg_ret = dbus_connection_send_with_reply_and_block(dbus_conn, - msg, 5000, &derr); - dbus_message_unref(msg); - if(!msg_ret) { ret = XFMEDIA_REMOTE_UNKNOWN_ERROR; dbus_error_free(&derr); @@ -241,26 +252,33 @@ if(!filename || !*filename) ret = XFMEDIA_REMOTE_BAD_ARGUMENTS; else { - msg = dbus_message_new_method_call(service_name, path_name, - XFMEDIA_DBUS_INTERFACE, XFMEDIA_REMOTE_ADD_FILE); + gchar *utf8_fn = g_filename_to_utf8(filename, -1, NULL, NULL, NULL); + + if (utf8_fn) { + msg = dbus_message_new_method_call(service_name, path_name, + XFMEDIA_DBUS_INTERFACE, XFMEDIA_REMOTE_ADD_FILE); #ifdef DBUS_USE_OLD_API - dbus_message_set_auto_activation(msg, FALSE); + dbus_message_set_auto_activation(msg, FALSE); +#else + dbus_message_set_auto_start(msg, FALSE); #endif - dbus_message_append_args(msg, + dbus_message_append_args(msg, #ifdef DBUS_USE_OLD_API - DBUS_TYPE_STRING, filename, - DBUS_TYPE_INT32, idx, + DBUS_TYPE_STRING, utf8_fn, + DBUS_TYPE_INT32, idx, #else - DBUS_TYPE_STRING, &filename, - DBUS_TYPE_INT32, &idx, + DBUS_TYPE_STRING, &utf8_fn, + DBUS_TYPE_INT32, &idx, #endif - DBUS_TYPE_INVALID); + DBUS_TYPE_INVALID); + + dbus_error_init(&derr); + msg_ret = dbus_connection_send_with_reply_and_block(dbus_conn, + msg, 5000, &derr); + dbus_message_unref(msg); + g_free(utf8_fn); + } - dbus_error_init(&derr); - msg_ret = dbus_connection_send_with_reply_and_block(dbus_conn, - msg, 5000, &derr); - dbus_message_unref(msg); - if(!msg_ret) { ret = XFMEDIA_REMOTE_UNKNOWN_ERROR; dbus_error_free(&derr); @@ -288,6 +306,8 @@ XFMEDIA_DBUS_INTERFACE, XFMEDIA_REMOTE_REMOVE_FILE); #ifdef DBUS_USE_OLD_API dbus_message_set_auto_activation(msg, FALSE); +#else + dbus_message_set_auto_start(msg, FALSE); #endif dbus_message_append_args(msg, #ifdef DBUS_USE_OLD_API @@ -323,6 +343,8 @@ XFMEDIA_DBUS_INTERFACE, XFMEDIA_REMOTE_PLAY); #ifdef DBUS_USE_OLD_API dbus_message_set_auto_activation(msg, FALSE); +#else + dbus_message_set_auto_start(msg, FALSE); #endif dbus_message_append_args(msg, #ifdef DBUS_USE_OLD_API @@ -359,6 +381,8 @@ XFMEDIA_DBUS_INTERFACE, command); #ifdef DBUS_USE_OLD_API dbus_message_set_auto_activation(msg, FALSE); +#else + dbus_message_set_auto_start(msg, FALSE); #endif dbus_error_init(&derr);