inspector: Support the a11y debug flag

Add support for the GTK_DEBUG_A11Y debug flag in
the logs tab.
This commit is contained in:
Matthias Clasen 2020-07-17 10:40:31 -04:00 committed by Emmanuele Bassi
parent 0b6df9efe7
commit 8adcf95300
2 changed files with 9 additions and 0 deletions

View File

@ -78,6 +78,7 @@ struct _GtkInspectorLogs
GtkWidget *text; GtkWidget *text;
GtkWidget *constraints; GtkWidget *constraints;
GtkWidget *layout; GtkWidget *layout;
GtkWidget *a11y;
GdkDisplay *display; GdkDisplay *display;
}; };
@ -174,6 +175,7 @@ flag_toggled (GtkWidget *button,
update_flag (logs->text, &flags, GTK_DEBUG_TEXT); update_flag (logs->text, &flags, GTK_DEBUG_TEXT);
update_flag (logs->constraints, &flags, GTK_DEBUG_CONSTRAINTS); update_flag (logs->constraints, &flags, GTK_DEBUG_CONSTRAINTS);
update_flag (logs->layout, &flags, GTK_DEBUG_LAYOUT); update_flag (logs->layout, &flags, GTK_DEBUG_LAYOUT);
update_flag (logs->a11y, &flags, GTK_DEBUG_A11Y);
gtk_set_display_debug_flags (logs->display, flags); gtk_set_display_debug_flags (logs->display, flags);
} }
@ -217,6 +219,7 @@ gtk_inspector_logs_class_init (GtkInspectorLogsClass *klass)
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, text); gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, text);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, constraints); gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, constraints);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, layout); gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, layout);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, a11y);
gtk_widget_class_bind_template_callback (widget_class, flag_toggled); gtk_widget_class_bind_template_callback (widget_class, flag_toggled);
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT); gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);

View File

@ -227,6 +227,12 @@
<signal name="toggled" handler="flag_toggled"/> <signal name="toggled" handler="flag_toggled"/>
</object> </object>
</child> </child>
<child>
<object class="GtkCheckButton" id="a11y">
<property name="label">Accessibility</property>
<signal name="toggled" handler="flag_toggled"/>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>