pidgin/resources/Status/box.ui

Mon, 04 Apr 2022 23:15:13 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Mon, 04 Apr 2022 23:15:13 -0500
changeset 41320
1695e758b590
child 41574
5c79e2bb862b
permissions
-rw-r--r--

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
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 <!-- Generated with glade 3.38.2
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 Pidgin - Internet Messenger
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 Copyright (C) Pidgin Developers <devel@pidgin.im>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 This program is free software; you can redistribute it and/or
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 modify it under the terms of the GNU General Public License
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 as published by the Free Software Foundation; either version 2
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 of the License, or (at your option) any later version.
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 This program is distributed in the hope that it will be useful,
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 GNU General Public License for more details.
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 You should have received a copy of the GNU Lesser General Public
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 License along with this library; if not, see <https://www.gnu.org/licenses/>.
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 -->
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 <interface>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 <requires lib="gtk+" version="3.24"/>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 <!-- interface-license-type gplv2 -->
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 <!-- interface-name Pidgin -->
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 <!-- interface-description Internet Messenger -->
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 <!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 <object class="GtkListStore" id="model">
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 <columns>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 <!-- column-name id -->
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 <column type="gchararray"/>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 <!-- column-name type -->
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 <column type="gint"/>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 <!-- column-name icon-name -->
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 <column type="gchararray"/>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 <!-- column-name primitive -->
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 <column type="gint"/>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 <!-- column-name text -->
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 <column type="gchararray"/>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 <!-- column-name data -->
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 <column type="gpointer"/>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 <!-- column-name emblem-visible -->
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 <column type="gboolean"/>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 </columns>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 </object>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 <template class="PidginStatusBox" parent="GtkBox">
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 <property name="visible">True</property>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 <property name="can-focus">True</property>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 <property name="orientation">vertical</property>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 <child>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 <object class="GtkComboBox" id="combo">
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 <property name="visible">True</property>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 <property name="can-focus">True</property>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 <property name="model">model</property>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 <property name="id-column">0</property>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 <signal name="changed" handler="pidgin_status_box_combo_changed_cb" object="PidginStatusBox" swapped="no"/>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 <child>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 <object class="GtkCellRendererPixbuf" id="icon"/>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 <attributes>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 <attribute name="icon-name">2</attribute>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 </attributes>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 </child>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 <child>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 <object class="GtkCellRendererText" id="text"/>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 <cell-packing>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 <property name="expand">true</property>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 </cell-packing>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 <attributes>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 <attribute name="markup">4</attribute>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 </attributes>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 </child>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 <child>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 <object class="GtkCellRendererPixbuf" id="emblem">
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 <property name="icon-name">document-save</property>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 </object>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 <attributes>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 <attribute name="visible">6</attribute>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 </attributes>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 </child>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 </object>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 <packing>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 <property name="expand">False</property>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 <property name="fill">True</property>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 <property name="position">0</property>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 </packing>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 </child>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 </template>
1695e758b590 Overhaul the status box
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 </interface>

mercurial