Port PidginInfoPane and PidginPresenceIcon to GTK4 gtk4

Thu, 25 Aug 2022 21:36:19 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 25 Aug 2022 21:36:19 -0500
branch
gtk4
changeset 41592
8e279e150bce
parent 41591
ad6f5ffc2825
child 41593
6928f02e807a

Port PidginInfoPane and PidginPresenceIcon to GTK4

Testing Done:
Opened a conversation and made sure everything worked. There's some issues with sizing right now, but that appears to be related to the conversation widget I think.

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

pidgin/resources/Conversations/infopane.ui file | annotate | diff | comparison | revisions
pidgin/resources/presenceicon.ui file | annotate | diff | comparison | revisions
--- a/pidgin/resources/Conversations/infopane.ui	Thu Aug 25 21:34:53 2022 -0500
+++ b/pidgin/resources/Conversations/infopane.ui	Thu Aug 25 21:36:19 2022 -0500
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 
-
+<!--
 Pidgin - Internet Messenger
 Copyright (C) Pidgin Developers <devel@pidgin.im>
 
@@ -15,97 +14,52 @@
 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/>.
-
+along with this library; if not, see <https://www.gnu.org/licenses/>.
 -->
 <interface>
-  <requires lib="gtk+" version="3.22"/>
+  <requires lib="gtk" version="4.0"/>
   <requires lib="pidgin" version="3.0"/>
   <!-- interface-license-type gplv2 -->
   <!-- interface-name Pidgin -->
   <!-- interface-description Internet Messenger -->
   <!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
   <template class="PidginInfoPane" parent="GtkBox">
-    <property name="visible">True</property>
-    <property name="can-focus">False</property>
     <child>
       <object class="GtkBox" id="hbox">
-        <property name="visible">True</property>
-        <property name="can-focus">False</property>
         <property name="spacing">6</property>
         <child>
           <object class="PidginPresenceIcon" id="presence_icon">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
             <property name="fallback">chat</property>
-            <property name="icon_size">3</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkBox">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
+            <property name="hexpand">1</property>
+            <property name="halign">fill</property>
             <property name="orientation">vertical</property>
             <child>
               <object class="GtkLabel" id="name">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
-                <property name="label" translatable="yes">[Place Holder]</property>
+                <property name="label" translatable="1">[Place Holder]</property>
                 <property name="xalign">0</property>
                 <attributes>
-                  <attribute name="weight" value="bold"/>
-                  <attribute name="scale" value="1.2"/>
+                  <attribute name="weight" value="bold"></attribute>
+                  <attribute name="scale" value="1.2"></attribute>
                 </attributes>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel" id="topic">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
-                <property name="wrap">True</property>
+                <property name="wrap">1</property>
                 <property name="xalign">0</property>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
             </child>
           </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
         </child>
         <child>
           <object class="PidginAvatar" id="avatar">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack-type">end</property>
-            <property name="position">2</property>
-          </packing>
         </child>
       </object>
-      <packing>
-        <property name="expand">True</property>
-        <property name="fill">True</property>
-        <property name="position">0</property>
-      </packing>
     </child>
   </template>
 </interface>
--- a/pidgin/resources/presenceicon.ui	Thu Aug 25 21:34:53 2022 -0500
+++ b/pidgin/resources/presenceicon.ui	Thu Aug 25 21:36:19 2022 -0500
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 
-
+<!--
 Pidgin - Internet Messenger
 Copyright (C) Pidgin Developers <devel@pidgin.im>
 
@@ -15,32 +14,24 @@
 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/>.
-
+along with this library; if not, see <https://www.gnu.org/licenses/>.
 -->
 <interface>
-  <requires lib="gtk+" version="3.24"/>
+  <requires lib="gtk" version="4.0"/>
   <!-- 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>
     <child>
       <object class="GtkImage" id="icon">
-        <property name="visible">True</property>
-        <property name="can-focus">False</property>
+        <property name="vexpand">1</property>
+        <property name="valign">fill</property>
         <property name="icon-name">image-missing</property>
-        <property name="use-fallback">True</property>
-        <property name="icon_size">6</property>
+        <property name="use-fallback">1</property>
+        <property name="icon_size">large</property>
       </object>
-      <packing>
-        <property name="expand">True</property>
-        <property name="fill">True</property>
-        <property name="position">0</property>
-      </packing>
     </child>
   </template>
 </interface>

mercurial