--- a/pidgin/pidginpresenceicon.c Tue May 03 02:32:33 2022 -0500
+++ b/pidgin/pidginpresenceicon.c Thu May 05 22:15:44 2022 -0500
@@ -25,7 +25,9 @@
#include "pidgin/pidginiconname.h"
struct _PidginPresenceIcon {
PurplePresence *presence;
@@ -41,7 +43,7 @@
static GParamSpec *properties[N_PROPERTIES] = { NULL, };
-G_DEFINE_TYPE(PidginPresenceIcon, pidgin_presence_icon, GTK_TYPE_IMAGE)
+G_DEFINE_TYPE(PidginPresenceIcon, pidgin_presence_icon, GTK_TYPE_BOX) /******************************************************************************
@@ -52,7 +54,8 @@
icon_name = pidgin_icon_name_from_presence(icon->presence, icon->fallback);
- gtk_image_set_from_icon_name(GTK_IMAGE(icon), icon_name, icon->icon_size);
+ gtk_image_set_from_icon_name(GTK_IMAGE(icon->icon), icon_name, @@ -121,13 +124,13 @@
pidgin_presence_icon_init(PidginPresenceIcon *presenceicon) {
- /* Use the icon name fallback that we're expecting. */
- g_object_set(G_OBJECT(presenceicon), "use-fallback", TRUE, NULL);
+ gtk_widget_init_template(GTK_WIDGET(presenceicon)); pidgin_presence_icon_class_init(PidginPresenceIconClass *klass) {
GObjectClass *obj_class = G_OBJECT_CLASS(klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); obj_class->finalize = pidgin_presence_icon_finalize;
obj_class->get_property = pidgin_presence_icon_get_property;
@@ -168,6 +171,14 @@
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties(obj_class, N_PROPERTIES, properties);
+ gtk_widget_class_set_template_from_resource( + "/im/pidgin/Pidgin3/presenceicon.ui" + gtk_widget_class_bind_template_child(widget_class, PidginPresenceIcon, /******************************************************************************
--- a/pidgin/pidginpresenceicon.h Tue May 03 02:32:33 2022 -0500
+++ b/pidgin/pidginpresenceicon.h Thu May 05 22:15:44 2022 -0500
@@ -42,7 +42,7 @@
#define PIDGIN_TYPE_PRESENCE_ICON (pidgin_presence_icon_get_type())
G_DECLARE_FINAL_TYPE(PidginPresenceIcon, pidgin_presence_icon,
- PIDGIN, PRESENCE_ICON, GtkImage)
+ PIDGIN, PRESENCE_ICON, GtkBox) --- a/pidgin/resources/Conversations/infopane.ui Tue May 03 02:32:33 2022 -0500
+++ b/pidgin/resources/Conversations/infopane.ui Thu May 05 22:15:44 2022 -0500
@@ -37,8 +37,6 @@
<object class="PidginPresenceIcon" id="presence_icon">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">image-missing</property>
- <property name="use-fallback">True</property>
<property name="fallback">chat</property>
<property name="icon_size">3</property>
--- a/pidgin/resources/pidgin.gresource.xml Tue May 03 02:32:33 2022 -0500
+++ b/pidgin/resources/pidgin.gresource.xml Thu May 05 22:15:44 2022 -0500
@@ -37,6 +37,7 @@
<file compressed="true">Xfer/xfer.ui</file>
<file compressed="true">closebutton.ui</file>
<file compressed="true">gtk/menus.ui</file>
+ <file compressed="true">presenceicon.ui</file> <file compressed="true">proxyoptions.ui</file>
<file compressed="true">statusprimitivechooser.ui</file>
<file>icons/16x16/status/pidgin-user-available.png</file>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pidgin/resources/presenceicon.ui Thu May 05 22:15:44 2022 -0500
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.38.2 +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/>. + <requires lib="gtk+" version="3.24"/> + <!-- interface-license-type gplv2 --> + <!-- interface-name Pidgin --> + <!-- interface-description Internet Messenger --> + <!-- interface-copyright Pidgin Developers <devel@pidgin.im> --> + <template class="PidginPresenceIcon" parent="GtkBox"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="orientation">vertical</property> + <object class="GtkImage" id="icon"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="icon-name">image-missing</property> + <property name="use-fallback">True</property> + <property name="icon_size">6</property> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property>