pidgin/resources/Prefs/vv.ui

Tue, 23 Aug 2022 04:28:29 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Tue, 23 Aug 2022 04:28:29 -0500
branch
gtk4
changeset 41581
732b1fcb8e31
parent 41552
c9157099adf8
child 41627
7d9b4a9d5c3e
permissions
-rw-r--r--

Fix prefs on GTK4

Testing Done:
Opened prefs, saw no warnings, toggled a few buttons, switched proxy modes, tried out audio & video test. Video test crashes as we probably need to port to a different sink.

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

<?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> -->
  <object class="GtkAdjustment" id="adjustment1">
    <property name="upper">100</property>
    <property name="step-increment">1</property>
    <property name="page-increment">10</property>
  </object>
  <object class="GtkAdjustment" id="adjustment2">
    <property name="upper">100</property>
    <property name="step-increment">1</property>
    <property name="page-increment">10</property>
  </object>
  <object class="GtkListStore" id="video.input.store">
    <columns>
      <!-- column-name text -->
      <column type="gchararray"/>
      <!-- column-name value -->
      <column type="gchararray"/>
    </columns>
  </object>
  <object class="GtkListStore" id="video.output.store">
    <columns>
      <!-- column-name text -->
      <column type="gchararray"/>
      <!-- column-name value -->
      <column type="gchararray"/>
    </columns>
  </object>
  <object class="GtkListStore" id="voice.input.store">
    <columns>
      <!-- column-name text -->
      <column type="gchararray"/>
      <!-- column-name value -->
      <column type="gchararray"/>
    </columns>
  </object>
  <object class="GtkListStore" id="voice.output.store">
    <columns>
      <!-- column-name text -->
      <column type="gchararray"/>
      <!-- column-name value -->
      <column type="gchararray"/>
    </columns>
  </object>
  <template class="PidginVVPrefs" parent="AdwPreferencesPage">
    <child>
      <object class="AdwPreferencesGroup">
        <property name="title" translatable="1">Audio</property>
        <child>
          <object class="GtkBox">
            <property name="margin-start">12</property>
            <property name="orientation">vertical</property>
            <property name="spacing">6</property>
            <child>
              <object class="GtkFrame">
                <property name="child">
                  <object class="GtkBox">
                    <property name="margin-start">12</property>
                    <property name="spacing">6</property>
                    <child>
                      <object class="GtkLabel" id="label1">
                        <property name="label" translatable="1" context="Device for Audio Input">Device</property>
                        <property name="xalign">0</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkComboBox" id="voice.input.combo">
                        <property name="id-column">1</property>
                        <property name="model">voice.input.store</property>
                        <child>
                          <object class="GtkCellRendererText"/>
                          <attributes>
                            <attribute name="text">0</attribute>
                          </attributes>
                        </child>
                      </object>
                    </child>
                  </object>
                </property>
                <child type="label">
                  <object class="GtkLabel">
                    <property name="label" translatable="1" context="Input for Audio">Input</property>
                    <attributes>
                      <attribute name="weight" value="bold"></attribute>
                    </attributes>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="GtkFrame">
                <property name="child">
                  <object class="GtkBox">
                    <property name="margin-start">12</property>
                    <property name="spacing">6</property>
                    <child>
                      <object class="GtkLabel" id="label2">
                        <property name="label" translatable="1" context="Device for Audio Output">Device</property>
                        <property name="xalign">0</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkComboBox" id="voice.output.combo">
                        <property name="id-column">1</property>
                        <property name="model">voice.output.store</property>
                        <child>
                          <object class="GtkCellRendererText"/>
                          <attributes>
                            <attribute name="text">0</attribute>
                          </attributes>
                        </child>
                      </object>
                    </child>
                  </object>
                </property>
                <child type="label">
                  <object class="GtkLabel">
                    <property name="label" translatable="1" context="Output for Audio">Output</property>
                    <attributes>
                      <attribute name="weight" value="bold"></attribute>
                    </attributes>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="GtkBox">
                <property name="spacing">6</property>
                <child>
                  <object class="GtkLabel">
                    <property name="label" translatable="1">Volume:</property>
                  </object>
                </child>
                <child>
                  <object class="GtkVolumeButton" id="voice.volume">
                    <property name="focusable">1</property>
                    <property name="focus-on-click">0</property>
                    <property name="receives-default">1</property>
                    <property name="orientation">vertical</property>
                    <property name="adjustment">adjustment2</property>
                    <signal name="value-changed" handler="volume_changed_cb" swapped="no"/>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="GtkLabel" id="voice.threshold_label">
                <property name="label" translatable="1">Silence threshold:</property>
                <property name="xalign">0</property>
              </object>
            </child>
            <child>
              <object class="GtkScale" id="voice.threshold">
                <property name="focusable">1</property>
                <property name="adjustment">adjustment1</property>
                <property name="round-digits">0</property>
                <property name="digits">0</property>
                <signal name="value-changed" handler="threshold_value_changed_cb" object="PidginVVPrefs" swapped="no"/>
              </object>
            </child>
            <child>
              <object class="GtkToggleButton" id="voice.test">
                <property name="label" translatable="1">Test Audio</property>
                <property name="focusable">1</property>
                <property name="receives-default">1</property>
                <signal name="toggled" handler="toggle_voice_test_cb" object="PidginVVPrefs" swapped="no"/>
              </object>
            </child>
            <child>
              <object class="GtkProgressBar" id="voice.level">
                <property name="sensitive">0</property>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
    <child>
      <object class="AdwPreferencesGroup">
        <property name="title" translatable="1">Video</property>
        <child>
          <object class="GtkBox">
            <property name="margin-start">12</property>
            <property name="orientation">vertical</property>
            <property name="spacing">6</property>
            <child>
              <object class="GtkFrame">
                <property name="child">
                  <object class="GtkBox">
                    <property name="margin-start">12</property>
                    <property name="spacing">6</property>
                    <child>
                      <object class="GtkLabel" id="label3">
                        <property name="label" translatable="1" context="Device for Video Input">Device</property>
                        <property name="xalign">0</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkComboBox" id="video.input.combo">
                        <property name="id-column">1</property>
                        <property name="model">video.input.store</property>
                        <child>
                          <object class="GtkCellRendererText"/>
                          <attributes>
                            <attribute name="text">0</attribute>
                          </attributes>
                        </child>
                      </object>
                    </child>
                  </object>
                </property>
                <child type="label">
                  <object class="GtkLabel">
                    <property name="label" translatable="1" context="Input for Video">Input</property>
                    <attributes>
                      <attribute name="weight" value="bold"></attribute>
                    </attributes>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="GtkFrame">
                <property name="child">
                  <object class="GtkBox">
                    <property name="margin-start">12</property>
                    <property name="spacing">6</property>
                    <child>
                      <object class="GtkLabel" id="label4">
                        <property name="label" translatable="1" context="Device for Video Output">Device</property>
                        <property name="xalign">0</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkComboBox" id="video.output.combo">
                        <property name="id-column">1</property>
                        <property name="model">video.output.store</property>
                        <child>
                          <object class="GtkCellRendererText"/>
                          <attributes>
                            <attribute name="text">0</attribute>
                          </attributes>
                        </child>
                      </object>
                    </child>
                  </object>
                </property>
                <child type="label">
                  <object class="GtkLabel">
                    <property name="label" translatable="1" context="Output for Video">Output</property>
                    <attributes>
                      <attribute name="weight" value="bold"></attribute>
                    </attributes>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="GtkAspectFrame" id="video.frame">
                <property name="valign">fill</property>
                <property name="vexpand">1</property>
                <property name="ratio">1.33</property>
                <child>
                  <placeholder/>
                </child>
              </object>
            </child>
            <child>
              <object class="GtkToggleButton" id="video.test">
                <property name="label" translatable="1">Test Video</property>
                <property name="focusable">1</property>
                <property name="receives-default">1</property>
                <signal name="toggled" handler="toggle_video_test_cb" object="PidginVVPrefs" swapped="no"/>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
  <object class="GtkSizeGroup" id="sg">
    <widgets>
      <widget name="label1"/>
      <widget name="label2"/>
      <widget name="label3"/>
      <widget name="label4"/>
    </widgets>
  </object>
</interface>

mercurial