diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/dbus-menu-manager.c | 11 | ||||
-rw-r--r-- | src/sound-service-dbus.c | 17 |
4 files changed, 13 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index 8654f02..aeeb41f 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,6 @@ DBUSMENUGTK_REQUIRED_VERSION=0.3.9 POLKIT_REQUIRED_VERSION=0.92 PULSE_AUDIO_REQUIRED_VERSION=0.9.19 INDICATOR_DISPLAY_OBJECTS=0.1.11 -INDICATE_REQUIRED_VERSION=0.4.1 DBUSMENUGLIB_REQUIRED_VERSION=0.3.9 GIO_2_0_REQUIRED_VERSION=2.25.13 @@ -53,7 +52,6 @@ AC_SUBST(PULSEAUDIO_LIBS) PKG_CHECK_MODULES(SOUNDSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION indicator >= $INDICATOR_REQUIRED_VERSION - indicate >= $INDICATE_REQUIRED_VERSION gee-1.0 gio-unix-2.0 libxml-2.0) diff --git a/src/Makefile.am b/src/Makefile.am index 0443029..99a00c0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -93,6 +93,8 @@ indicator_sound_service_SOURCES = \ sound-service-dbus.c \ slider-menu-item.h \ slider-menu-item.c \ + gen-sound-service.xml.h \ + gen-sound-service.xml.c \ $(music_bridge_VALASOURCES:.vala=.c) indicator_sound_service_CFLAGS = $(PULSEAUDIO_CFLAGS) $(SOUNDSERVICE_CFLAGS) $(GCONF_CFLAGS) -DLIBEXECDIR=\"$(libexecdir)\" -Wall diff --git a/src/dbus-menu-manager.c b/src/dbus-menu-manager.c index f92c324..e51db0d 100644 --- a/src/dbus-menu-manager.c +++ b/src/dbus-menu-manager.c @@ -21,9 +21,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <unistd.h> #include <glib/gi18n.h> -#include <dbus/dbus-glib.h> -#include <dbus/dbus-glib-bindings.h> - #include <libdbusmenu-glib/server.h> #include <libdbusmenu-glib/client.h> @@ -79,10 +76,10 @@ DbusmenuMenuitem* dbus_menu_manager_setup() void dbus_menu_manager_update_volume(gdouble volume) { - GValue value = {0}; - g_value_init(&value, G_TYPE_DOUBLE); - g_value_set_double(&value, volume); - dbusmenu_menuitem_property_set_value(DBUSMENU_MENUITEM(volume_slider_menuitem), DBUSMENU_VOLUME_MENUITEM_LEVEL, &value); + GVariant* new_volume = g_variant_new_double(volume); + dbusmenu_menuitem_property_set_variant(DBUSMENU_MENUITEM(volume_slider_menuitem), + DBUSMENU_VOLUME_MENUITEM_LEVEL, + new_volume); } diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index 987ce7c..8e0f31a 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -23,6 +23,7 @@ #endif #include <gio/gio.h> +#include <libindicator/indicator-service.h> #include "gen-sound-service.xml.h" #include "dbus-shared-names.h" #include "sound-service-dbus.h" @@ -105,11 +106,10 @@ sound_service_dbus_init (SoundServiceDbus *self) priv->sink_availability = FALSE; /* Fetch the session bus */ - priv->connection = g_bus_get_sync (DBUS_BUS_SESSION, NULL, &error); + priv->connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error); if (error != NULL) { - g_error("sound-service-dbus:Unable to connect to the session bus when - creating indicator sound service : %s", error->message); + g_error("sound-service-dbus:Unable to connect to the session bus when creating indicator sound service : %s", error->message); g_error_free(error); return; } @@ -154,19 +154,16 @@ bus_method_call (GDBusConnection * connection, GDBusMethodInvocation * invocation, gpointer user_data) { - IndicatorService * service = INDICATOR_SERVICE(user_data); + IndicatorService* service = INDICATOR_SERVICE(user_data); GVariant * retval = NULL; + SoundServiceDbusPrivate *priv = SOUND_SERVICE_DBUS_GET_PRIVATE (service); if (g_strcmp0(method, "GetSinkMute") == 0) { - SoundServiceDbusPrivate *priv = SOUND_SERVICE_DBUS_GET_PRIVATE (self); - g_debug("Get sink mute - sound service dbus!, - about to send over mute_value of %i", priv->mute); + g_debug("Get sink mute - sound service dbus!,about to send over mute_value of %i", priv->mute); retval = g_variant_new_boolean (priv->mute); } else if (g_strcmp0(method, "GetSinkAvailability") == 0) { - SoundServiceDbusPrivate *priv = SOUND_SERVICE_DBUS_GET_PRIVATE (self); - g_debug("Get sink availability - sound service dbus!, - about to send over availability_value of %i", priv->sink_availability); + g_debug("Get sink availability - sound service dbus!, about to send over availability_value of %i", priv->sink_availability); retval = g_variant_new_boolean (priv->sink_availability); } else { |