aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2012-04-23 12:38:58 -0700
committerConor Curran <conor.curran@canonical.com>2012-04-23 12:38:58 -0700
commit6e076f02999d0010a355fb57f60d4e9b5e799460 (patch)
treebf33261959cd0f12b1fa6058f053b1b5ff0347b9 /src
parent2c3d9c4cbfb106b34716eda98e3beb2878756ae4 (diff)
downloadayatana-indicator-sound-6e076f02999d0010a355fb57f60d4e9b5e799460.tar.gz
ayatana-indicator-sound-6e076f02999d0010a355fb57f60d4e9b5e799460.tar.bz2
ayatana-indicator-sound-6e076f02999d0010a355fb57f60d4e9b5e799460.zip
make sure on key press it updates atk
Diffstat (limited to 'src')
-rw-r--r--src/volume-widget.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/volume-widget.c b/src/volume-widget.c
index 02d0330..1258c20 100644
--- a/src/volume-widget.c
+++ b/src/volume-widget.c
@@ -135,10 +135,11 @@ volume_widget_property_update( DbusmenuMenuitem* item, gchar* property,
if(g_ascii_strcasecmp(DBUSMENU_VOLUME_MENUITEM_LEVEL, property) == 0){
g_return_if_fail (g_variant_is_of_type (value, G_VARIANT_TYPE_DOUBLE) );
+ gdouble update = g_variant_get_double (value);
+
if(priv->grabbed == FALSE){
GtkWidget *slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)priv->ido_volume_slider);
GtkRange *range = (GtkRange*)slider;
- gdouble update = g_variant_get_double (value);
gtk_range_set_value(range, update);
/*
g_debug ("volume-widget::volume_widget_property_update - volume - value %f", update);
@@ -148,15 +149,14 @@ volume_widget_property_update( DbusmenuMenuitem* item, gchar* property,
atk_object_set_name (atk_object, desc);
}*/
-
- gchar* desc = g_strdup_printf(_("Volume (%'.0f%%)"),
- update);
- dbusmenu_menuitem_property_set (priv->twin_item,
- DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC,
- desc);
- g_free (desc);
- update_accessible_desc(priv->indicator);
}
+ gchar* desc = g_strdup_printf(_("Volume (%'.0f%%)"),
+ update);
+ dbusmenu_menuitem_property_set (priv->twin_item,
+ DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC,
+ desc);
+ g_free (desc);
+ update_accessible_desc(priv->indicator);
}
else if(g_ascii_strcasecmp(DBUSMENU_VOLUME_MENUITEM_MUTE, property) == 0){
g_return_if_fail (g_variant_is_of_type (value, G_VARIANT_TYPE_BOOLEAN));
@@ -214,7 +214,7 @@ volume_widget_set_twin_item(VolumeWidget* self,
DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC,
desc);
g_free (desc);
-
+
}
static gboolean