call-record-row: Improve event handling

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714>
This commit is contained in:
Anton Lazarev
2024-01-12 16:38:25 -08:00
parent caecf10cc1
commit eef5b33ad4
2 changed files with 67 additions and 58 deletions

View File

@@ -5,54 +5,50 @@
<property name="activatable">False</property>
<property name="selectable">False</property>
<property name="child">
<object class="GtkBox" id="event_box">
<object class="GtkBox">
<child>
<object class="GtkBox">
<child>
<object class="AdwAvatar" id="avatar">
<property name="margin-start">8</property>
<property name="margin_top">8</property>
<property name="margin_bottom">8</property>
<property name="size">48</property>
<property name="text" bind-source="target" bind-property="label" bind-flags="sync-create"/>
<property name="show-initials">True</property>
</object>
</child>
<child>
<object class="GtkImage" id="type">
<property name="margin-start">8</property>
</object>
</child>
<child>
<object class="GtkLabel" id="target">
<property name="margin-start">10</property>
<property name="ellipsize">middle</property>
</object>
</child>
<child>
<object class="GtkButton" id="button">
<property name="margin-start">12</property>
<property name="margin-end">8</property>
<property name="margin_top">8</property>
<property name="margin_bottom">8</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="tooltip-text">Call</property>
<property name="icon-name">call-start-symbolic</property>
</object>
</child>
<child>
<object class="GtkLabel" id="time">
<property name="margin-start">8</property>
<property name="justify">right</property>
<style>
<class name="dim-label"/>
</style>
<attributes>
<attribute name="scale" value="0.7"></attribute>
</attributes>
</object>
</child>
<object class="AdwAvatar" id="avatar">
<property name="margin-start">8</property>
<property name="margin_top">8</property>
<property name="margin_bottom">8</property>
<property name="size">48</property>
<property name="text" bind-source="target" bind-property="label" bind-flags="sync-create"/>
<property name="show-initials">True</property>
</object>
</child>
<child>
<object class="GtkImage" id="type">
<property name="margin-start">8</property>
</object>
</child>
<child>
<object class="GtkLabel" id="target">
<property name="margin-start">10</property>
<property name="ellipsize">middle</property>
</object>
</child>
<child>
<object class="GtkButton" id="button">
<property name="margin-start">12</property>
<property name="margin-end">8</property>
<property name="margin_top">8</property>
<property name="margin_bottom">8</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="tooltip-text">Call</property>
<property name="icon-name">call-start-symbolic</property>
</object>
</child>
<child>
<object class="GtkLabel" id="time">
<property name="margin-start">8</property>
<property name="justify">right</property>
<style>
<class name="dim-label"/>
</style>
<attributes>
<attribute name="scale" value="0.7"></attribute>
</attributes>
</object>
</child>
</object>
@@ -62,21 +58,21 @@
<section>
<item>
<attribute name="label" translatable="yes">_Delete Call</attribute>
<attribute name="action">delete-call</attribute>
<attribute name="action">row-history.delete-call</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Copy number</attribute>
<attribute name="action">copy-number</attribute>
<attribute name="action">row-history.copy-number</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Add contact</attribute>
<attribute name="action">new-contact</attribute>
<attribute name="action">row-history.new-contact</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Send SMS</attribute>
<attribute name="action">new-sms</attribute>
<attribute name="action">row-history.new-sms</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
</section>