Merge lp:~cjcurran/indicator-sound/fix-lp-902715 into lp:indicator-sound/12.10

Proposed by Conor Curran
Status: Merged
Approved by: Charles Kerr
Approved revision: 328
Merged at revision: 324
Proposed branch: lp:~cjcurran/indicator-sound/fix-lp-902715
Merge into: lp:indicator-sound/12.10
Diff against target: 49 lines (+22/-3)
1 file modified
src/volume-widget.c (+22/-3)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/fix-lp-902715
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
Review via email: mp+103399@code.launchpad.net

Description of the change

Luke said to go ahead and release with the fix in this branch. We can delve deeper when there is a chance later next month.

To post a comment you must log in.
Revision history for this message
Charles Kerr (charlesk) wrote :

This patch is still incomplete, but you're aware of that and this patch does improve the problem in Bug #902715.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/volume-widget.c'
2--- src/volume-widget.c 2012-03-17 00:37:32 +0000
3+++ src/volume-widget.c 2012-04-25 01:04:26 +0000
4@@ -135,16 +135,28 @@
5
6 if(g_ascii_strcasecmp(DBUSMENU_VOLUME_MENUITEM_LEVEL, property) == 0){
7 g_return_if_fail (g_variant_is_of_type (value, G_VARIANT_TYPE_DOUBLE) );
8+ gdouble update = g_variant_get_double (value);
9+
10 if(priv->grabbed == FALSE){
11 GtkWidget *slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)priv->ido_volume_slider);
12 GtkRange *range = (GtkRange*)slider;
13- gdouble update = g_variant_get_double (value);
14 gtk_range_set_value(range, update);
15 /*
16 g_debug ("volume-widget::volume_widget_property_update - volume - value %f", update);
17-*/
18- update_accessible_desc(priv->indicator);
19+ AtkObject* atk_object;
20+ atk_object = gtk_widget_get_accessible (priv->ido_volume_slider);
21+ if (atk_object != NULL){
22+ atk_object_set_name (atk_object, desc);
23+
24+ }*/
25 }
26+ gchar* desc = g_strdup_printf(_("Volume (%'.0f%%)"),
27+ update);
28+ dbusmenu_menuitem_property_set (priv->twin_item,
29+ DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC,
30+ desc);
31+ g_free (desc);
32+ update_accessible_desc(priv->indicator);
33 }
34 else if(g_ascii_strcasecmp(DBUSMENU_VOLUME_MENUITEM_MUTE, property) == 0){
35 g_return_if_fail (g_variant_is_of_type (value, G_VARIANT_TYPE_BOOLEAN));
36@@ -196,6 +208,13 @@
37 initial_level = 0;
38 }
39 gtk_range_set_value(range, initial_level);
40+ gchar* desc = g_strdup_printf(_("Volume (%'.0f%%)"),
41+ initial_level);
42+ dbusmenu_menuitem_property_set (priv->twin_item,
43+ DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC,
44+ desc);
45+ g_free (desc);
46+
47 }
48
49 static gboolean

Subscribers

People subscribed via source and target branches