new-call-box: Switch to using CuiDialpad
It has been in libcall-ui for some time, so let's use it. This will also easy the transition to Gtk4 as it's one less widget we have to worry about.
This commit is contained in:
@@ -4,18 +4,12 @@
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<requires lib="libhandy" version="1.0"/>
|
||||
<template class="CallsNewCallBox" parent="GtkBox">
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="margin_left">24</property>
|
||||
<property name="margin_right">24</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="visible">True</property>
|
||||
|
||||
<child>
|
||||
<object class="HdyClamp">
|
||||
<property name="visible">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="maximum-size">300</property>
|
||||
<child>
|
||||
<object class="HdyClamp">
|
||||
<property name="visible">True</property>
|
||||
@@ -28,7 +22,6 @@
|
||||
<object class="GtkListBox" id="origin_list_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="halign">center</property>
|
||||
<child>
|
||||
<object class="HdyComboRow" id="origin_list">
|
||||
@@ -51,89 +44,9 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="keypad_entry">
|
||||
<object class="CuiDialpad" id="dialpad">
|
||||
<property name="visible" bind-source="CallsNewCallBox" bind-property="numeric-input-only" bind-flags="sync-create"/>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="placeholder-text" translatable="yes">Enter a number</property>
|
||||
<signal name="activate" handler="dial_clicked_cb" swapped="yes"/>
|
||||
<style>
|
||||
<class name="phone-number-entry"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyKeypad" id="keypad">
|
||||
<property name="visible" bind-source="CallsNewCallBox" bind-property="numeric-input-only" bind-flags="sync-create"/>
|
||||
<property name="column_spacing">16</property>
|
||||
<property name="row_spacing">10</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin_top">18</property>
|
||||
<property name="margin_bottom">18</property>
|
||||
<property name="entry">keypad_entry</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible" bind-source="CallsNewCallBox" bind-property="numeric-input-only" bind-flags="sync-create"/>
|
||||
<property name="orientation">horizontal</property>
|
||||
<child type="center">
|
||||
<object class="GtkButton" id="dial">
|
||||
<property name="always_show_image">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="visible">True</property>
|
||||
<signal name="clicked" handler="dial_clicked_cb" swapped="yes"/>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
<class name="image-button"/>
|
||||
<class name="dial-button"/>
|
||||
</style>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="a11y-dial">
|
||||
<property name="accessible-name" translatable="yes">Dial</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="back_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">call-start-symbolic</property>
|
||||
<property name="icon-size">5</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="backspace">
|
||||
<property name="always_show_image">True</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="focus-on-click">False</property>
|
||||
<property name="margin_right">15</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="halign">center</property>
|
||||
<signal name="clicked" handler="backspace_clicked_cb" swapped="yes"/>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="a11y-backspace">
|
||||
<property name="accessible-name" translatable="yes">Delete character in front of cursor</property>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="delete-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
<signal name="dialed" handler="dialpad_dialed_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
@@ -178,11 +91,5 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
<object class="GtkGestureLongPress" id="long_press_back_gesture">
|
||||
<property name="widget">backspace</property>
|
||||
<signal name="pressed" handler="long_press_back_cb" object="CallsNewCallBox" swapped="true"/>
|
||||
</object>
|
||||
</interface>
|
||||
|
||||
Reference in New Issue
Block a user