pidgin/pidgin

1ecc0512e714
Make purple_contact_new take the id instead of the username.

Username is already readwrite, but id is not, and most protocols have id's for
everything, so lets make that the normal case in the api.

Testing Done:
Ran the unit tests.

Reviewed at https://reviews.imfreedom.org/r/1851/
<?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 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> -->
<object class="GtkListStore" id="model">
<columns>
<column type="PurpleProxyType"/>
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0">PURPLE_PROXY_TYPE_USE_GLOBAL</col>
<col id="1" translatable="yes">Use Global Proxy Settings</col>
</row>
<row>
<col id="0">PURPLE_PROXY_TYPE_NONE</col>
<col id="1" translatable="yes">No Proxy</col>
</row>
<row>
<col id="0">PURPLE_PROXY_TYPE_SOCKS4</col>
<col id="1" translatable="yes">SOCKS 4</col>
</row>
<row>
<col id="0">PURPLE_PROXY_TYPE_SOCKS5</col>
<col id="1" translatable="yes">SOCKS 5</col>
</row>
<row>
<col id="0">PURPLE_PROXY_TYPE_TOR</col>
<col id="1" translatable="yes">TOR/Privacy (SOCKS 5)</col>
</row>
<row>
<col id="0">PURPLE_PROXY_TYPE_HTTP</col>
<col id="1" translatable="yes">HTTP</col>
</row>
<row>
<col id="0">PURPLE_PROXY_TYPE_USE_ENVVAR</col>
<col id="1" translatable="yes">Use Environmental Settings</col>
</row>
</data>
</object>
<object class="GtkTreeModelFilter" id="filter">
<property name="child-model">model</property>
</object>
<object class="GtkAdjustment" id="port_adjustment">
<property name="lower">-1</property>
<property name="upper">65535</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<template class="PidginProxyOptions" parent="GtkBox">
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox">
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="proxy_type_label">
<property name="label" translatable="1">Proxy _type:</property>
<property name="use-underline">1</property>
<property name="mnemonic-widget">proxy_type</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkComboBox" id="proxy_type">
<property name="hexpand">1</property>
<property name="model">filter</property>
<signal name="changed" handler="pidgin_proxy_options_proxy_type_changed_cb" object="PidginProxyOptions" swapped="no"/>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox" id="options">
<property name="sensitive">0</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox">
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="host_label">
<property name="label" translatable="1">_Host:</property>
<property name="use-underline">1</property>
<property name="mnemonic-widget">hostname</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkEntry" id="hostname">
<property name="hexpand">1</property>
<property name="focusable">1</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="port_label">
<property name="label" translatable="1">_Port:</property>
<property name="use-underline">1</property>
<property name="mnemonic-widget">port</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkSpinButton" id="port">
<property name="hexpand">1</property>
<property name="focusable">1</property>
<property name="adjustment">port_adjustment</property>
<property name="numeric">1</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="username_label">
<property name="label" translatable="1">_Username:</property>
<property name="use-underline">1</property>
<property name="mnemonic-widget">username</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkEntry" id="username">
<property name="hexpand">1</property>
<property name="focusable">1</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="password_label">
<property name="label" translatable="1">Pa_ssword:</property>
<property name="use-underline">1</property>
<property name="mnemonic-widget">password</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkPasswordEntry" id="password">
<property name="hexpand">1</property>
<property name="focusable">1</property>
<property name="show-peek-icon">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
<object class="GtkSizeGroup">
<widgets>
<widget name="proxy_type_label"/>
<widget name="host_label"/>
<widget name="port_label"/>
<widget name="username_label"/>
<widget name="password_label"/>
</widgets>
</object>
<menu id="extra">
<item>
<!-- TRANSLATORS: This is an easter egg.
It means one of two things, both intended as humorous:
A) your network is really slow and you have nothing better to do than look at butterflies.
B) You are looking really closely at something that shouldn't matter.
-->
<attribute name="label" translatable="yes">If you look real closely</attribute>
</item>
<item>
<!-- TRANSLATORS: This is an easter egg.
It means one of two things, both intended as humorous:
A) your network is really slow and you have nothing better to do than look at butterflies.
B) You are looking really closely at something that shouldn't matter.
-->
<attribute name="label" translatable="yes">you can see the butterflies mating</attribute>
</item>
</menu>
</interface>