Mon, 04 Apr 2022 23:15:13 -0500
Overhaul the status box
* Subclass GtkBox instead of GtkContainer
* Remove message editing
* Use a GtkComboBox instead of our fake GtkComboBox
* Move to item id's rather than indexes
* Moved new status, and saved status to GActions
* Removed the account and token_account properties. we now show primitives and
saved status
* Removed the ability to delete saved status from the widget
* Use a widget template to construct the ui elements
* Removed the connection detection stuff
Testing Done:
Verified status were updated when used in the saved status manager.
Verified that the new status and saved status actions work.
Verified that the primitive status work.
Verified that the saved statuses work.
Bugs closed: PIDGIN-17591
Reviewed at https://reviews.imfreedom.org/r/1312/
| 41320 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- Generated with glade 3.38.2 | |
| 3 | ||
| 4 | Pidgin - Internet Messenger | |
| 5 | Copyright (C) Pidgin Developers <devel@pidgin.im> | |
| 6 | ||
| 7 | This program is free software; you can redistribute it and/or | |
| 8 | modify it under the terms of the GNU General Public License | |
| 9 | as published by the Free Software Foundation; either version 2 | |
| 10 | of the License, or (at your option) any later version. | |
| 11 | ||
| 12 | This program is distributed in the hope that it will be useful, | |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | GNU General Public License for more details. | |
| 16 | ||
| 17 | You should have received a copy of the GNU Lesser General Public | |
| 18 | License along with this library; if not, see <https://www.gnu.org/licenses/>. | |
| 19 | ||
| 20 | --> | |
| 21 | <interface> | |
| 22 | <requires lib="gtk+" version="3.24"/> | |
| 23 | <!-- interface-license-type gplv2 --> | |
| 24 | <!-- interface-name Pidgin --> | |
| 25 | <!-- interface-description Internet Messenger --> | |
| 26 | <!-- interface-copyright Pidgin Developers <devel@pidgin.im> --> | |
| 27 | <object class="GtkListStore" id="model"> | |
| 28 | <columns> | |
| 29 | <!-- column-name id --> | |
| 30 | <column type="gchararray"/> | |
| 31 | <!-- column-name type --> | |
| 32 | <column type="gint"/> | |
| 33 | <!-- column-name icon-name --> | |
| 34 | <column type="gchararray"/> | |
| 35 | <!-- column-name primitive --> | |
| 36 | <column type="gint"/> | |
| 37 | <!-- column-name text --> | |
| 38 | <column type="gchararray"/> | |
| 39 | <!-- column-name data --> | |
| 40 | <column type="gpointer"/> | |
| 41 | <!-- column-name emblem-visible --> | |
| 42 | <column type="gboolean"/> | |
| 43 | </columns> | |
| 44 | </object> | |
| 45 | <template class="PidginStatusBox" parent="GtkBox"> | |
| 46 | <property name="visible">True</property> | |
| 47 | <property name="can-focus">True</property> | |
| 48 | <property name="orientation">vertical</property> | |
| 49 | <child> | |
| 50 | <object class="GtkComboBox" id="combo"> | |
| 51 | <property name="visible">True</property> | |
| 52 | <property name="can-focus">True</property> | |
| 53 | <property name="model">model</property> | |
| 54 | <property name="id-column">0</property> | |
| 55 | <signal name="changed" handler="pidgin_status_box_combo_changed_cb" object="PidginStatusBox" swapped="no"/> | |
| 56 | <child> | |
| 57 | <object class="GtkCellRendererPixbuf" id="icon"/> | |
| 58 | <attributes> | |
| 59 | <attribute name="icon-name">2</attribute> | |
| 60 | </attributes> | |
| 61 | </child> | |
| 62 | <child> | |
| 63 | <object class="GtkCellRendererText" id="text"/> | |
| 64 | <cell-packing> | |
| 65 | <property name="expand">true</property> | |
| 66 | </cell-packing> | |
| 67 | <attributes> | |
| 68 | <attribute name="markup">4</attribute> | |
| 69 | </attributes> | |
| 70 | </child> | |
| 71 | <child> | |
| 72 | <object class="GtkCellRendererPixbuf" id="emblem"> | |
| 73 | <property name="icon-name">document-save</property> | |
| 74 | </object> | |
| 75 | <attributes> | |
| 76 | <attribute name="visible">6</attribute> | |
| 77 | </attributes> | |
| 78 | </child> | |
| 79 | </object> | |
| 80 | <packing> | |
| 81 | <property name="expand">False</property> | |
| 82 | <property name="fill">True</property> | |
| 83 | <property name="position">0</property> | |
| 84 | </packing> | |
| 85 | </child> | |
| 86 | </template> | |
| 87 | </interface> |