pidgin/resources/display-item.ui

Tue, 13 May 2025 14:29:06 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Tue, 13 May 2025 14:29:06 -0500
changeset 43251
8bd7eee2f178
parent 43208
b81c104ccbe0
permissions
-rw-r--r--

Create a Privacy preference page with the send typing notification preference

This only controls whether or not the conversation window will send typing
notifications, plugins can still do this on their own.

Testing Done:
Used ngrep to verify if the irc typing messages were being sent or not. Also manually modified the settings file and verified the ui update and vice versa.

Bugs closed: PIDGIN-17450

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

<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="GtkListItem">
    <property name="child">
      <object class="GtkTreeExpander" id="expander">
        <binding name="list-row">
          <lookup name="item">GtkListItem</lookup>
        </binding>
        <property name="child">
          <object class="GtkBox">
            <property name="orientation">horizontal</property>
            <property name="spacing">6</property>
            <binding name="tooltip-text">
              <lookup name="title" type="PidginDisplayItem">
                <lookup name="item">expander</lookup>
              </lookup>
            </binding>
            <child>
              <object class="GtkEventControllerMotion" id="motion_controller"/>
            </child>
            <child>
              <object class="GtkImage">
                <binding name="icon-name">
                  <lookup name="icon-name" type="PidginDisplayItem">
                    <lookup name="item">expander</lookup>
                  </lookup>
                </binding>
              </object>
            </child>
            <child>
              <object class="GtkLabel">
                <property name="xalign">0</property>
                <property name="hexpand">1</property>
                <property name="ellipsize">end</property>
                <binding name="label">
                  <lookup name="title" type="PidginDisplayItem">
                    <lookup name="item">expander</lookup>
                  </lookup>
                </binding>
              </object>
            </child>
            <child>
              <object class="GtkStack">
                <property name="transition-type">crossfade</property>
                <binding name="visible-child-name">
                  <closure type="gchararray" function="pidgin_display_window_show_item_actions_cb">
                    <lookup name="selected">GtkListItem</lookup>
                    <lookup name="contains-pointer">motion_controller</lookup>
                    <lookup name="active">menu_button</lookup>
                  </closure>
                </binding>
                <child>
                  <object class="GtkStackPage">
                    <property name="name">notifications</property>
                    <property name="child">
                      <object class="GtkBox">
                        <property name="spacing">6</property>
                        <property name="halign">end</property>
                        <property name="hexpand">true</property>
                        <property name="orientation">horizontal</property>
                        <child>
                          <object class="GtkLabel">
                            <style>
                              <class name="notification-count"/>
                            </style>
                            <property name="valign">center</property>
                            <binding name="visible">
                              <lookup name="needs-attention" type="PidginDisplayItem">
                                <lookup name="item">expander</lookup>
                              </lookup>
                            </binding>
                            <binding name="label">
                              <lookup name="badge-number" type="PidginDisplayItem">
                                <lookup name="item">expander</lookup>
                              </lookup>
                            </binding>
                          </object>
                        </child>
                      </object>
                    </property>
                  </object>
                </child>
                <child>
                  <object class="GtkStackPage">
                    <property name="name">actions</property>
                    <property name="child">
                      <object class="GtkBox">
                        <property name="spacing">6</property>
                        <property name="halign">end</property>
                        <property name="hexpand">true</property>
                        <property name="orientation">horizontal</property>
                        <child>
                          <object class="GtkMenuButton" id="menu_button">
                            <style>
                              <class name="flat"/>
                            </style>
                            <property name="icon-name">view-more-symbolic</property>
                            <binding name="menu-model">
                              <lookup name="menu" type="PidginDisplayItem">
                                <lookup name="item">expander</lookup>
                              </lookup>
                            </binding>
                            <binding name="visible">
                              <closure type="gboolean" function="pidgin_display_window_show_item_menu_cb">
                                <lookup name="item">expander</lookup>
                              </closure>
                            </binding>
                          </object>
                        </child>
                      </object>
                    </property>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </property>
      </object>
    </property>
  </template>
</interface>

mercurial