gtk: start a custom Console widget

This commit is contained in:
Marc-André Lureau
2021-02-09 17:51:01 +04:00
parent edaffdb868
commit 54f299599f
7 changed files with 127 additions and 11 deletions
+1
View File
@@ -2,6 +2,7 @@
<gresources>
<gresource prefix="/org/qemu/gtk4/">
<file compressed="true" preprocess="xml-stripblanks" alias="shortcuts.ui">resources/ui/shortcuts.ui</file>
<file compressed="true" preprocess="xml-stripblanks" alias="console.ui">resources/ui/console.ui</file>
<file compressed="true" preprocess="xml-stripblanks" alias="window.ui">resources/ui/window.ui</file>
<file compressed="true" alias="style.css">resources/style.css</file>
+30
View File
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="QemuConsole" parent="GtkWidget">
<property name="layout-manager">
<object class="GtkBinLayout"/>
</property>
<child>
<object class="GtkNotebook">
<child>
<object class="GtkGLArea" id="glarea"/>
</child>
<child type="tab">
<object class="GtkLabel" id="notebook-tab">
<property name="label">Console</property>
</object>
</child>
<child>
<object class="GtkLabel" id="label">
<property name="label" translatable="yes">Hello world2!</property>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="notebook-tab2">
<property name="label">Tab2</property>
</object>
</child>
</object>
</child>
</template>
</interface>
+2 -5
View File
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id="primary_menu">
<section>
@@ -29,11 +30,7 @@
</object>
</child>
<child>
<object class="GtkLabel" id="label">
<property name="label" translatable="yes">Hello world!</property>
<style>
<class name="title-header"/>
</style>
<object class="QemuConsole" id="console">
</object>
</child>
</template>