inspector: Show the media backend

This commit is contained in:
Matthias Clasen 2020-04-28 00:37:00 -04:00
parent 75c75e001c
commit 5477c1cdfe
2 changed files with 46 additions and 0 deletions

View File

@ -32,6 +32,7 @@
#include "gtkadjustment.h" #include "gtkadjustment.h"
#include "gtkbox.h" #include "gtkbox.h"
#include "gtkbinlayout.h" #include "gtkbinlayout.h"
#include "gtkmediafileprivate.h"
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
@ -74,6 +75,7 @@ struct _GtkInspectorGeneralPrivate
GtkWidget *gdk_backend; GtkWidget *gdk_backend;
GtkWidget *gsk_renderer; GtkWidget *gsk_renderer;
GtkWidget *pango_fontmap; GtkWidget *pango_fontmap;
GtkWidget *media_backend;
GtkWidget *gl_version; GtkWidget *gl_version;
GtkWidget *gl_vendor; GtkWidget *gl_vendor;
GtkWidget *vk_device; GtkWidget *vk_device;
@ -646,6 +648,17 @@ init_pango (GtkInspectorGeneral *gen)
gtk_label_set_label (GTK_LABEL (gen->priv->pango_fontmap), name); gtk_label_set_label (GTK_LABEL (gen->priv->pango_fontmap), name);
} }
static void
init_media (GtkInspectorGeneral *gen)
{
GIOExtension *e;
const char *name;
e = gtk_media_file_get_extension ();
name = g_io_extension_get_name (e);
gtk_label_set_label (GTK_LABEL (gen->priv->media_backend), name);
}
static void populate_seats (GtkInspectorGeneral *gen); static void populate_seats (GtkInspectorGeneral *gen);
static void static void
@ -894,6 +907,7 @@ gtk_inspector_general_class_init (GtkInspectorGeneralClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gdk_backend); gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gdk_backend);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gsk_renderer); gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gsk_renderer);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, pango_fontmap); gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, pango_fontmap);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, media_backend);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gl_version); gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gl_version);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gl_vendor); gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gl_vendor);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, vk_device); gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, vk_device);
@ -925,6 +939,7 @@ gtk_inspector_general_set_display (GtkInspectorGeneral *gen,
init_env (gen); init_env (gen);
init_display (gen); init_display (gen);
init_pango (gen); init_pango (gen);
init_media (gen);
init_gl (gen); init_gl (gen);
init_vulkan (gen); init_vulkan (gen);
init_device (gen); init_device (gen);

View File

@ -138,6 +138,36 @@
</child> </child>
</object> </object>
</child> </child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="media_backend_label">
<property name="label" translatable="yes">Media Backend</property>
<property name="halign">start</property>
<property name="valign">baseline</property>
<property name="xalign">0.0</property>
</object>
</child>
<child>
<object class="GtkLabel" id="media_backend">
<property name="selectable">1</property>
<property name="halign">end</property>
<property name="valign">baseline</property>
<property name="hexpand">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>
@ -666,6 +696,7 @@
<widget name="gdk_backend_label"/> <widget name="gdk_backend_label"/>
<widget name="gsk_renderer_label"/> <widget name="gsk_renderer_label"/>
<widget name="pango_fontmap_label"/> <widget name="pango_fontmap_label"/>
<widget name="media_backend_label"/>
<widget name="gl_version_label"/> <widget name="gl_version_label"/>
<widget name="gl_vendor_label"/> <widget name="gl_vendor_label"/>
<widget name="vk_device_label"/> <widget name="vk_device_label"/>