pidgin/resources/Privacy/dialog.ui

Tue, 15 Sep 2020 21:54:10 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Tue, 15 Sep 2020 21:54:10 -0500
changeset 40534
8dad2981fb86
parent 40252
18fd5c5c4625
child 40824
132c763c26e4
permissions
-rw-r--r--

Separate the AccountChooser from its model and move options to filters

Create a store for accounts and a filter to only show connected accounts

Update everything to use the new PidginAccountStore and PidginAccountFilterConnected filter

Add a GtkTreeModelFilter for protocols by id

Testing Done:
Compiled and opened most of the dialogs to make sure they're still working the same. Was unable to test gevolution.

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

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1

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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

-->
<interface>
  <requires lib="gtk+" version="3.20"/>
  <requires lib="pidgin" version="3.0"/>
  <!-- interface-license-type gplv2 -->
  <!-- interface-name Pidgin -->
  <!-- interface-description Internet Messenger -->
  <!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
  <object class="PidginAccountStore" id="account_store"/>
  <object class="PidginAccountFilterConnected" id="connected_account_store">
    <property name="child_model">account_store</property>
  </object>
  <object class="GtkListStore" id="allow_store">
    <columns>
      <!-- column-name column1 -->
      <column type="gchararray"/>
    </columns>
  </object>
  <object class="GtkListStore" id="block_store">
    <columns>
      <!-- column-name column1 -->
      <column type="gchararray"/>
    </columns>
  </object>
  <template class="PidginPrivacyDialog" parent="GtkDialog">
    <property name="can_focus">False</property>
    <property name="title" translatable="yes">Privacy</property>
    <property name="role">privacy</property>
    <property name="type_hint">dialog</property>
    <signal name="close" handler="gtk_widget_destroy" swapped="no"/>
    <child>
      <placeholder/>
    </child>
    <child internal-child="vbox">
      <object class="GtkBox">
        <property name="can_focus">False</property>
        <property name="orientation">vertical</property>
        <property name="spacing">2</property>
        <child internal-child="action_area">
          <object class="GtkButtonBox">
            <property name="can_focus">False</property>
            <property name="layout_style">end</property>
            <child>
              <object class="GtkButton" id="add_button">
                <property name="label">gtk-add</property>
                <property name="visible">True</property>
                <property name="can_focus">True</property>
                <property name="receives_default">True</property>
                <property name="use_stock">True</property>
                <signal name="clicked" handler="add_cb" object="PidginPrivacyDialog" swapped="no"/>
              </object>
              <packing>
                <property name="expand">True</property>
                <property name="fill">True</property>
                <property name="position">0</property>
              </packing>
            </child>
            <child>
              <object class="GtkButton" id="remove_button">
                <property name="label">gtk-remove</property>
                <property name="visible">True</property>
                <property name="sensitive">False</property>
                <property name="can_focus">True</property>
                <property name="receives_default">True</property>
                <property name="use_stock">True</property>
                <signal name="clicked" handler="remove_cb" object="PidginPrivacyDialog" swapped="no"/>
              </object>
              <packing>
                <property name="expand">True</property>
                <property name="fill">True</property>
                <property name="position">1</property>
              </packing>
            </child>
            <child>
              <object class="GtkButton" id="removeall_button">
                <property name="label" translatable="yes">Remove Al_l</property>
                <property name="visible">True</property>
                <property name="can_focus">True</property>
                <property name="receives_default">True</property>
                <property name="use_underline">True</property>
                <signal name="clicked" handler="removeall_cb" object="PidginPrivacyDialog" swapped="no"/>
              </object>
              <packing>
                <property name="expand">True</property>
                <property name="fill">True</property>
                <property name="position">2</property>
              </packing>
            </child>
            <child>
              <object class="GtkButton" id="close_button">
                <property name="label">gtk-close</property>
                <property name="visible">True</property>
                <property name="can_focus">True</property>
                <property name="receives_default">True</property>
                <property name="use_stock">True</property>
                <signal name="clicked" handler="gtk_widget_destroy" object="PidginPrivacyDialog" swapped="yes"/>
              </object>
              <packing>
                <property name="expand">True</property>
                <property name="fill">True</property>
                <property name="position">3</property>
              </packing>
            </child>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">False</property>
            <property name="position">0</property>
          </packing>
        </child>
        <child>
          <object class="GtkBox">
            <property name="visible">True</property>
            <property name="can_focus">False</property>
            <property name="orientation">vertical</property>
            <property name="spacing">6</property>
            <child>
              <object class="GtkLabel">
                <property name="visible">True</property>
                <property name="can_focus">False</property>
                <property name="label" translatable="yes">Changes to privacy settings take effect immediately.</property>
                <property name="xalign">0</property>
              </object>
              <packing>
                <property name="expand">False</property>
                <property name="fill">False</property>
                <property name="position">0</property>
              </packing>
            </child>
            <child>
              <object class="GtkBox">
                <property name="visible">True</property>
                <property name="can_focus">False</property>
                <property name="spacing">5</property>
                <child>
                  <object class="GtkLabel" id="label1">
                    <property name="visible">True</property>
                    <property name="can_focus">False</property>
                    <property name="label" translatable="yes">Set privacy for:</property>
                    <property name="use_underline">True</property>
                    <property name="mnemonic_widget">account_chooser</property>
                    <accessibility>
                      <relation type="label-for" target="account_chooser"/>
                    </accessibility>
                  </object>
                  <packing>
                    <property name="expand">False</property>
                    <property name="fill">False</property>
                    <property name="position">0</property>
                  </packing>
                </child>
                <child>
                  <object class="PidginAccountChooser" id="account_chooser">
                    <property name="visible">True</property>
                    <property name="can_focus">False</property>
                    <property name="model">connected_account_store</property>
                    <property name="active">0</property>
                    <signal name="changed" handler="select_account_cb" object="PidginPrivacyDialog" swapped="no"/>
                    <accessibility>
                      <relation type="labelled-by" target="label1"/>
                    </accessibility>
                  </object>
                  <packing>
                    <property name="expand">True</property>
                    <property name="fill">True</property>
                    <property name="position">1</property>
                  </packing>
                </child>
              </object>
              <packing>
                <property name="expand">False</property>
                <property name="fill">True</property>
                <property name="position">1</property>
              </packing>
            </child>
            <child>
              <object class="GtkComboBoxText" id="type_menu">
                <property name="visible">True</property>
                <property name="can_focus">False</property>
                <signal name="changed" handler="type_changed_cb" object="PidginPrivacyDialog" swapped="no"/>
              </object>
              <packing>
                <property name="expand">False</property>
                <property name="fill">False</property>
                <property name="position">2</property>
              </packing>
            </child>
            <child>
              <object class="GtkScrolledWindow" id="allow_widget">
                <property name="height_request">200</property>
                <property name="visible">True</property>
                <property name="can_focus">True</property>
                <property name="shadow_type">in</property>
                <child>
                  <object class="GtkTreeView" id="allow_list">
                    <property name="visible">True</property>
                    <property name="can_focus">True</property>
                    <property name="model">allow_store</property>
                    <property name="headers_visible">False</property>
                    <property name="search_column">0</property>
                    <child internal-child="selection">
                      <object class="GtkTreeSelection">
                        <signal name="changed" handler="user_selected_cb" object="PidginPrivacyDialog" swapped="no"/>
                      </object>
                    </child>
                    <child>
                      <object class="GtkTreeViewColumn">
                        <property name="clickable">True</property>
                        <property name="sort_column_id">0</property>
                        <child>
                          <object class="GtkCellRendererText"/>
                          <attributes>
                            <attribute name="text">0</attribute>
                          </attributes>
                        </child>
                      </object>
                    </child>
                  </object>
                </child>
              </object>
              <packing>
                <property name="expand">True</property>
                <property name="fill">True</property>
                <property name="position">3</property>
              </packing>
            </child>
            <child>
              <object class="GtkScrolledWindow" id="block_widget">
                <property name="height_request">200</property>
                <property name="visible">True</property>
                <property name="can_focus">True</property>
                <property name="shadow_type">in</property>
                <child>
                  <object class="GtkTreeView" id="block_list">
                    <property name="visible">True</property>
                    <property name="can_focus">True</property>
                    <property name="model">block_store</property>
                    <property name="headers_visible">False</property>
                    <child internal-child="selection">
                      <object class="GtkTreeSelection">
                        <signal name="changed" handler="user_selected_cb" object="PidginPrivacyDialog" swapped="no"/>
                      </object>
                    </child>
                    <child>
                      <object class="GtkTreeViewColumn">
                        <property name="clickable">True</property>
                        <property name="sort_column_id">0</property>
                        <child>
                          <object class="GtkCellRendererText"/>
                          <attributes>
                            <attribute name="text">0</attribute>
                          </attributes>
                        </child>
                      </object>
                    </child>
                  </object>
                </child>
              </object>
              <packing>
                <property name="expand">True</property>
                <property name="fill">True</property>
                <property name="position">4</property>
              </packing>
            </child>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">1</property>
          </packing>
        </child>
      </object>
    </child>
  </template>
</interface>

mercurial