From fd12de42dc5614b94ae330eee307fb32a35bd335 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Wed, 17 Jan 2018 16:37:14 -0500 Subject: 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 --- applets/notification_area/status-notifier/sn-dbus-menu-item.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'applets/notification_area/status-notifier/sn-dbus-menu-item.c') 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 { -- cgit v1.2.1