diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-03-09 19:16:12 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-03-09 19:16:12 +0000 |
commit | 01b69bd1d0979f27f003f06151fcda72102f2067 (patch) | |
tree | 1531bcd02ba38c1145e7ba578bc2b7933a07ad2a /src | |
parent | 83554ba72ea7d455f9261355e37d4a5501577364 (diff) | |
parent | 726f77ccdb4d0cc47b952c8403df926a9c7c7d45 (diff) | |
download | ayatana-indicator-sound-01b69bd1d0979f27f003f06151fcda72102f2067.tar.gz ayatana-indicator-sound-01b69bd1d0979f27f003f06151fcda72102f2067.tar.bz2 ayatana-indicator-sound-01b69bd1d0979f27f003f06151fcda72102f2067.zip |
merged luke's updates
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-sound.c | 14 | ||||
-rw-r--r-- | src/indicator-sound.h | 3 | ||||
-rw-r--r-- | src/volume-widget.c | 18 |
3 files changed, 19 insertions, 16 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c index 7851e8a..a7d3808 100644 --- a/src/indicator-sound.c +++ b/src/indicator-sound.c @@ -640,3 +640,17 @@ indicator_sound_scroll (IndicatorObject *io, gint delta, sound_state_manager_show_notification (priv->state_manager, value); } + +void +update_accessible_desc (IndicatorObject * io) +{ + GList *entries = indicator_object_get_entries(io); + IndicatorObjectEntry * entry = (IndicatorObjectEntry *)entries->data; + entry->accessible_desc = get_accessible_desc(io); + g_signal_emit(G_OBJECT(io), + INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE_ID, + 0, + entry, + TRUE); + g_list_free(entries); +} diff --git a/src/indicator-sound.h b/src/indicator-sound.h index 40a3e6f..c945efa 100644 --- a/src/indicator-sound.h +++ b/src/indicator-sound.h @@ -53,4 +53,7 @@ struct _IndicatorSound { // GObject Boiler plate GType indicator_sound_get_type (void); +// Update the accessible description +void update_accessible_desc (IndicatorObject * io); + #endif diff --git a/src/volume-widget.c b/src/volume-widget.c index be97994..c45e93c 100644 --- a/src/volume-widget.c +++ b/src/volume-widget.c @@ -138,14 +138,7 @@ volume_widget_property_update( DbusmenuMenuitem* item, gchar* property, gdouble update = g_variant_get_double (value); //g_debug("volume-widget - update level with value %f", update); gtk_range_set_value(range, update); - - GList *entry = indicator_object_get_entries(priv->indicator); - g_signal_emit(G_OBJECT(priv->indicator), - INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE_ID, - 0, - entry->data, - TRUE); - g_list_free(entry); + update_accessible_desc(priv->indicator); } } } @@ -165,14 +158,7 @@ volume_widget_set_twin_item(VolumeWidget* self, GtkWidget *slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)priv->ido_volume_slider); GtkRange *range = (GtkRange*)slider; gtk_range_set_value(range, initial_level); - - GList *entry = indicator_object_get_entries(priv->indicator); - g_signal_emit(G_OBJECT(priv->indicator), - INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE_ID, - 0, - entry->data, - TRUE); - g_list_free(entry); + update_accessible_desc(priv->indicator); } static gboolean |