aboutsummaryrefslogtreecommitdiff
path: root/src/dbus-menu-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus-menu-manager.c')
-rw-r--r--src/dbus-menu-manager.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/dbus-menu-manager.c b/src/dbus-menu-manager.c
index 4cd4a6b..5b97a0d 100644
--- a/src/dbus-menu-manager.c
+++ b/src/dbus-menu-manager.c
@@ -31,6 +31,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "sound-service-dbus.h"
#include "pulse-manager.h"
#include "slider-menu-item.h"
+#include "common-defs.h"
#include "dbus-shared-names.h"
@@ -74,13 +75,15 @@ DbusmenuMenuitem* dbus_menu_manager_setup()
return root_menuitem;
}
-/**
-teardown:
-**/
-void dbus_menu_manager_teardown()
+
+void dbus_menu_manager_update_volume(gdouble volume)
{
- //TODO tidy up dbus_interface and items!
+ 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);
}
+
/**
update_pa_state:
@@ -102,7 +105,7 @@ void dbus_menu_manager_update_pa_state(gboolean pa_state, gboolean sink_availabl
// Emit the signals after the menus are setup/torn down
// preserve ordering !
sound_service_dbus_update_sink_availability(dbus_interface, sink_available);
- sound_service_dbus_update_sink_volume(dbus_interface, percent);
+ dbus_menu_manager_update_volume(percent);
sound_service_dbus_update_sink_mute(dbus_interface, sink_muted);
dbus_menu_manager_update_mute_ui(b_all_muted);
}
@@ -123,7 +126,6 @@ void dbus_menu_manager_update_mute_ui(gboolean incoming_mute_value)
/*-------------------------------------------------------------------------*/
// Private Methods
/*-------------------------------------------------------------------------*/
-
static void refresh_menu()
{
g_debug("in the refresh menu method");