Comment 8 for bug 902715

Revision history for this message
Conor Curran (cjcurran) wrote :

Previously Luke you had added this method to the indicator-sound.c.

void
update_accessible_desc (IndicatorObject * io)
{
  GList *entries = indicator_object_get_entries(io);
  if (!entries)
    return;
  IndicatorObjectEntry * entry = (IndicatorObjectEntry *)entries->data;

  IndicatorSoundPrivate* priv = INDICATOR_SOUND_GET_PRIVATE(io);
  gchar *old_desc = priv->accessible_desc;

  if (priv->volume_widget) {
    priv->accessible_desc = g_strdup_printf(_("Volume (%'.0f%%)"),
                                            volume_widget_get_current_volume (priv->volume_widget));
  }
  else {
    priv->accessible_desc = NULL;
  }

  entry->accessible_desc = priv->accessible_desc;
  g_free (old_desc);
  g_signal_emit(G_OBJECT(io),
                INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE_ID,
                0,
                entry,
                TRUE);
  g_list_free(entries);
}

This is called after a successful property update is received in the volume-widget (just after the said code above). Are you now suggesting that this method needs to call a dbusmenu_property_set using the DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC as opposed to emitting that signal ?