[gnome-builder/wip/gtk4-port: 1283/1774] libide/editor: set role for actions




commit 493695062ac1353845aedd96cb2cbddf682a7860
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jun 1 13:35:25 2022 -0700

    libide/editor: set role for actions
    
    We always want these to be checks, so add the attribute to help inform
    of that.

 src/libide/editor/ide-editor-utils.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/libide/editor/ide-editor-utils.c b/src/libide/editor/ide-editor-utils.c
index 81560e1fb..d5fd62077 100644
--- a/src/libide/editor/ide-editor-utils.c
+++ b/src/libide/editor/ide-editor-utils.c
@@ -74,6 +74,7 @@ ide_editor_encoding_menu_new (const char *action_name)
     g_autoptr(GMenuItem) item = g_menu_item_new ("UTF-8", NULL);
 
     g_menu_item_set_action_and_target (item, action_name, "s", "UTF-8");
+    g_menu_item_set_attribute (item, "role", "s", "check");
     g_menu_append_item (section, item);
     g_menu_append_section (menu, NULL, G_MENU_MODEL (section));
   }
@@ -99,6 +100,7 @@ ide_editor_encoding_menu_new (const char *action_name)
         }
 
       g_menu_item_set_action_and_target (item, action_name, "s", gtk_source_encoding_get_charset (encoding));
+      g_menu_item_set_attribute (item, "role", "s", "check");
       g_menu_append_item (submenu, item);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]