pidgin/resources/notification.ui

Sat, 21 Sep 2024 16:22:31 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Sat, 21 Sep 2024 16:22:31 -0500
changeset 42960
f80f044d734c
parent 42946
25a2db55796d
child 42966
228d9d3637a0
permissions
-rw-r--r--

Fix keep-aspect-ratio deprecation

We require a new enough GTK to use the new property.

Testing Done:
Compiled, ran, and didn't see the warning any more.

Reviewed at https://reviews.imfreedom.org/r/3515/

<?xml version="1.0" encoding="UTF-8"?>
<!--
Pidgin - Internet Messenger
Copyright (C) Pidgin Developers <devel@pidgin.im>

This program 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 program 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 program; if not, see <https://www.gnu.org/licenses/>.
-->
<interface>
  <requires lib="gtk" version="4.0"/>
  <requires lib="Adw" version="1.0"/>
  <!-- interface-license-type gplv2 -->
  <!-- interface-name Pidgin -->
  <!-- interface-description Internet Messenger -->
  <!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
  <template class="PidginNotification" parent="GtkBox">
    <property name="orientation">horizontal</property>
    <property name="spacing">6</property>
    <property name="margin-start">2</property>
    <property name="margin-end">2</property>
    <property name="margin-top">2</property>
    <property name="margin-bottom">2</property>
    <child>
      <object class="GtkImage" id="icon">
        <property name="icon-size">large</property>
        <property name="halign">center</property>
        <property name="valign">center</property>
        <binding name="icon-name">
          <lookup name="icon-name" type="PurpleNotification">
            <lookup name="notification">PidginNotification</lookup>
          </lookup>
        </binding>
      </object>
    </child>
    <child>
      <object class="GtkBox" id="details">
        <property name="halign">fill</property>
        <property name="hexpand">true</property>
        <property name="orientation">vertical</property>
        <property name="spacing">0</property>
        <property name="valign">center</property>
        <child>
          <object class="GtkLabel">
            <property name="ellipsize">end</property>
            <property name="lines">3</property>
            <property name="xalign">0</property>
            <binding name="label">
              <lookup name="title" type="PurpleNotification">
                <lookup name="notification">PidginNotification</lookup>
              </lookup>
            </binding>
          </object>
        </child>
        <child>
          <object class="GtkLabel">
            <property name="ellipsize">end</property>
            <property name="lines">3</property>
            <property name="wrap">1</property>
            <property name="xalign">0</property>
            <binding name="label">
              <lookup name="subtitle" type="PurpleNotification">
                <lookup name="notification">PidginNotification</lookup>
              </lookup>
            </binding>
            <binding name="visible">
              <closure type="gboolean" function="pidgin_notification_show_subtitle">
                <lookup name="subtitle" type="PurpleNotification">
                  <lookup name="notification">PidginNotification</lookup>
                </lookup>
              </closure>
            </binding>
          </object>
        </child>
      </object>
    </child>
    <child>
      <object class="GtkButton">
        <property name="focusable">1</property>
        <property name="receives-default">1</property>
        <property name="icon-name">edit-delete-symbolic</property>
        <property name="halign">center</property>
        <property name="valign">center</property>
        <property name="action-name">notification.close</property>
        <style>
          <class name="flat"/>
        </style>
      </object>
    </child>
  </template>
</interface>

mercurial