diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-04-01 13:59:32 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-04-01 13:59:32 +0100 |
commit | 0a3977efd6bec63c3223d6d4973945caf7588031 (patch) | |
tree | 39d88fd5f8d4ff6516690e4788f8cfe4411ea98e /src/sound-service-dbus.c | |
parent | 73827ae57eb2027121e71a85af1858cc59fd5943 (diff) | |
download | ayatana-indicator-sound-0a3977efd6bec63c3223d6d4973945caf7588031.tar.gz ayatana-indicator-sound-0a3977efd6bec63c3223d6d4973945caf7588031.tar.bz2 ayatana-indicator-sound-0a3977efd6bec63c3223d6d4973945caf7588031.zip |
make sure that even if the service crashes there are no visual indications on the indicator (i.e. no two slider scenario
)
Diffstat (limited to 'src/sound-service-dbus.c')
-rw-r--r-- | src/sound-service-dbus.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index dc1fd94..a22e648 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -164,13 +164,10 @@ sound_service_dbus_build_sound_menu ( SoundServiceDbus* self, { SoundServiceDbusPrivate * priv = SOUND_SERVICE_DBUS_GET_PRIVATE(self); - // Mute button - // TODO this additions should be fixed position, i.e. add via position and not just append - // be explicit as it is fixed. - dbusmenu_menuitem_child_append (priv->root_menuitem, mute_item); - dbusmenu_menuitem_child_append (priv->root_menuitem, slider_item); - g_debug ("just about to add the slider %i", DBUSMENU_IS_MENUITEM(slider_item)); - dbusmenu_menuitem_child_append (priv->root_menuitem, voip_input_menu_item); + // Mute, Volume and Voip widgets + dbusmenu_menuitem_child_add_position (priv->root_menuitem, mute_item, 0); + dbusmenu_menuitem_child_add_position (priv->root_menuitem, slider_item, 1); + dbusmenu_menuitem_child_add_position (priv->root_menuitem, voip_input_menu_item, 2); // Separator DbusmenuMenuitem* separator = dbusmenu_menuitem_new(); @@ -178,7 +175,7 @@ sound_service_dbus_build_sound_menu ( SoundServiceDbus* self, dbusmenu_menuitem_property_set (separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR); - dbusmenu_menuitem_child_append(priv->root_menuitem, separator); + dbusmenu_menuitem_child_add_position (priv->root_menuitem, separator, 3); g_object_unref (separator); // Sound preferences dialog |