summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2018-01-17 16:37:14 -0500
committermonsta <[email protected]>2018-03-18 14:48:16 +0300
commite2ccace3958c8e375df4b1cb381556329707e7c3 (patch)
tree9896bcb76211c7c0f625e11cf541c6debab2e150
parent683056ef8a8571fc9c3da8e8443b7bba54a4de3d (diff)
downloadmate-panel-e2ccace3958c8e375df4b1cb381556329707e7c3.tar.bz2
mate-panel-e2ccace3958c8e375df4b1cb381556329707e7c3.tar.xz
Fix rendering of radio buttons in status notifier
*Ensure only the actually selected radio button is shown as checked, not all the radio buttons *Note that this works so long as each menu created by a single indicator creates no more than one groups of radio buttons, the usual case *Also set ATK_ROLE_RADIO_MENU_ITEM for any radio menu items created by an indicator as this code otherwise would cause Orca to call them check menu items
-rw-r--r--applets/notification_area/status-notifier/sn-dbus-menu-item.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/applets/notification_area/status-notifier/sn-dbus-menu-item.c b/applets/notification_area/status-notifier/sn-dbus-menu-item.c
index 862fd3b0..2fe587cf 100644
--- a/applets/notification_area/status-notifier/sn-dbus-menu-item.c
+++ b/applets/notification_area/status-notifier/sn-dbus-menu-item.c
@@ -180,7 +180,11 @@ sn_dbus_menu_item_new (GVariant *props)
}
else if (g_strcmp0 (item->toggle_type, "radio") == 0)
{
- item->item = gtk_radio_menu_item_new (NULL);
+ item->item = gtk_check_menu_item_new ();
+ gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM(item->item),TRUE);
+ AtkObject *atk_obj;
+ atk_obj = gtk_widget_get_accessible (item->item);
+ atk_object_set_role (atk_obj,ATK_ROLE_RADIO_MENU_ITEM);
}
else
{