talkatu/talkatu

A few random tweaks to TalkatuHistory
gtk4
2022-02-02, Gary Kramlich
7baf8643ecb6
A few random tweaks to TalkatuHistory

The big take away here is that we unparent our children during our dispose.

Testing Done:
Ran the demo and verified that the warning about history still having a child was gone.

Reviewed at https://reviews.imfreedom.org/r/1278/
<?xml version="1.0" encoding="UTF-8"?>
<!--
Talkatu - GTK widgets for chat applications
Copyright (C) 2017-2020 Gary Kramlich <grim@reaperworld.com>
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
-->
<interface>
<requires lib="gtk" version="4.0"/>
<!-- interface-license-type gplv2 -->
<!-- interface-name Pidgin -->
<!-- interface-description Internet Messenger -->
<!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
<menu id="model">
<section>
<item>
<attribute name="label" translatable="yes">_Open Link</attribute>
<attribute name="action">link.open</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Copy Link</attribute>
<attribute name="action">link.copy</attribute>
</item>
</section>
</menu>
<template class="TalkatuView" parent="GtkTextView">
<property name="has-tooltip">1</property>
<property name="wrap-mode">3</property>
<signal name="notify::buffer" handler="talkatu_view_buffer_set_cb"/>
<child>
<object class="GtkPopoverMenu" id="menu">
<property name="has-arrow">0</property>
<property name="menu-model">model</property>
</object>
</child>
<child>
<object class="GtkGestureClick">
<property name="button">0</property>
<signal name="pressed" handler="talkatu_view_pressed_cb"/>
</object>
</child>
<child>
<object class="GtkEventControllerMotion">
<signal name="motion" handler="talkatu_view_motion_cb"/>
</object>
</child>
</template>
</interface>