gtk2/gtk/ui/gtkfontchooserdialog.ui
Carlos Garnacho 3eb1b22651 gtkfontchooser: Use GtkEventControllerKey
Use an event controller on GtkFontChooserDialog, a nice side effect
is that we can use gtk_event_controller_key_forward() and
gtk_search_entry_set_key_capture_widget() instead of passing events
around for dialog search.
2018-06-21 12:50:57 +02:00

48 lines
1.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface domain="gtk40">
<!-- interface-requires gtk+ 3.10 -->
<template class="GtkFontChooserDialog" parent="GtkDialog">
<property name="title" translatable="yes">Select Font</property>
<property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<property name="margin">5</property>
<child>
<object class="GtkFontChooserWidget" id="fontchooser">
<property name="vexpand">1</property>
<signal name="font-activated" handler="font_activated_cb" swapped="no"/>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="action">
<object class="GtkButton" id="cancel_button">
<property name="use-underline">1</property>
<property name="label" translatable="yes">_Cancel</property>
</object>
</child>
<child type="action">
<object class="GtkButton" id="select_button">
<property name="label" translatable="yes">_Select</property>
<property name="use-underline">1</property>
<property name="can-default">1</property>
</object>
</child>
<child>
<object class="GtkEventControllerKey">
<signal name="key-pressed" handler="dialog_forward_key" swapped="no"/>
<signal name="key-released" handler="dialog_forward_key" swapped="no"/>
</object>
</child>
<action-widgets>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="ok" default="true">select_button</action-widget>
</action-widgets>
</template>
</interface>