GtkWidget *box;
GtkWidget *role;
+ GtkWidget *path_label;
GtkWidget *path;
GtkWidget *attributes;
};
static void
update_path (GtkInspectorA11y *sl)
{
- const char *path = "—";
#ifdef G_OS_UNIX
+ const char *path = NULL;
GtkATContext *context;
context = gtk_accessible_get_at_context (GTK_ACCESSIBLE (sl->object));
else
path = "not realized";
}
- else
- path = "not on bus";
+
+ if (path != NULL)
+ gtk_label_set_label (GTK_LABEL (sl->path), path);
+
+ gtk_widget_set_visible (sl->path, path != NULL);
+ gtk_widget_set_visible (sl->path_label, path != NULL);
g_clear_object (&context);
#endif
-
- gtk_label_set_label (GTK_LABEL (sl->path), path);
}
extern GType gtk_string_pair_get_type (void);
gtk_inspector_a11y_init (GtkInspectorA11y *sl)
{
gtk_widget_init_template (GTK_WIDGET (sl));
+
+#ifndef G_OS_UNIX
+ gtk_widget_set_visible (sl->path, FALSE);
+ gtk_widget_set_visible (sl->path_label, FALSE);
+#endif
}
static void
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/inspector/a11y.ui");
gtk_widget_class_bind_template_child (widget_class, GtkInspectorA11y, box);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorA11y, role);
+ gtk_widget_class_bind_template_child (widget_class, GtkInspectorA11y, path_label);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorA11y, path);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorA11y, attributes);
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="path_label">
- <property name="label" translatable="yes">Object path</property>
+ <property name="label" translatable="yes">Object Path</property>
<property name="halign">start</property>
<property name="valign">baseline</property>
<property name="xalign">0.0</property>