diff options
author | lukefromdc <[email protected]> | 2018-01-17 16:37:14 -0500 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-01-21 16:34:55 -0500 |
commit | fd12de42dc5614b94ae330eee307fb32a35bd335 (patch) | |
tree | 0b461dcc37b69c148af3b3653ef6dab71bfa29bf /applets/notification_area/status-notifier/sn-dbus-menu-item.c | |
parent | 3889e1727159429123f872d4f3a2cf8c7ddbb971 (diff) | |
download | mate-panel-fd12de42dc5614b94ae330eee307fb32a35bd335.tar.bz2 mate-panel-fd12de42dc5614b94ae330eee307fb32a35bd335.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
Diffstat (limited to 'applets/notification_area/status-notifier/sn-dbus-menu-item.c')
-rw-r--r-- | applets/notification_area/status-notifier/sn-dbus-menu-item.c | 6 |
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 { |