diff --git a/pidgin/prefs/pidginawayprefs.h b/pidgin/prefs/pidginawayprefs.h
--- a/pidgin/prefs/pidginawayprefs.h
+++ b/pidgin/prefs/pidginawayprefs.h
@@ -30,7 +30,7 @@
 #include <glib.h>
 
 #include <gtk/gtk.h>
-#include <handy.h>
+#include <adwaita.h>
 
 G_BEGIN_DECLS
 
@@ -44,7 +44,7 @@ G_BEGIN_DECLS
  */
 #define PIDGIN_TYPE_AWAY_PREFS (pidgin_away_prefs_get_type())
 G_DECLARE_FINAL_TYPE(PidginAwayPrefs, pidgin_away_prefs,
-                     PIDGIN, AWAY_PREFS, HdyPreferencesPage)
+                     PIDGIN, AWAY_PREFS, AdwPreferencesPage)
 
 /**
  * pidgin_away_prefs_new:
# HG changeset patch
# Node ID d61ba20b3d24
# Parent  ed974089f083
diff --git a/pidgin/prefs/pidginawayprefs.c b/pidgin/prefs/pidginawayprefs.c
--- a/pidgin/prefs/pidginawayprefs.c
+++ b/pidgin/prefs/pidginawayprefs.c
@@ -22,7 +22,7 @@
 
 #include <purple.h>
 
-#include <handy.h>
+#include <adwaita.h>
 
 #include "pidginawayprefs.h"
 #include "gtksavedstatuses.h"
@@ -30,7 +30,7 @@
 #include "pidginprefsinternal.h"
 
 struct _PidginAwayPrefs {
-	HdyPreferencesPage parent;
+	AdwPreferencesPage parent;
 
 	PidginPrefCombo idle_reporting;
 	GtkWidget *mins_before_away;
@@ -42,7 +42,7 @@ struct _PidginAwayPrefs {
 	GtkWidget *startup_label;
 };
 
-G_DEFINE_TYPE(PidginAwayPrefs, pidgin_away_prefs, HDY_TYPE_PREFERENCES_PAGE)
+G_DEFINE_TYPE(PidginAwayPrefs, pidgin_away_prefs, ADW_TYPE_PREFERENCES_PAGE)
 
 /******************************************************************************
  * Helpers
@@ -112,8 +112,7 @@ pidgin_away_prefs_init(PidginAwayPrefs *
 	/* TODO: Show something useful if we don't have any saved statuses. */
 	menu = pidgin_status_menu(purple_savedstatus_get_idleaway(),
 	                          G_CALLBACK(set_idle_away));
-	gtk_widget_show_all(menu);
-	gtk_box_pack_start(GTK_BOX(prefs->idle_hbox), menu, FALSE, FALSE, 0);
+	gtk_box_append(GTK_BOX(prefs->idle_hbox), menu);
 
 	g_object_bind_property(prefs->away_when_idle, "active",
 			menu, "sensitive",
@@ -131,8 +130,7 @@ pidgin_away_prefs_init(PidginAwayPrefs *
 	/* TODO: Show something useful if we don't have any saved statuses. */
 	menu = pidgin_status_menu(purple_savedstatus_get_startup(),
 	                          G_CALLBACK(set_startupstatus));
-	gtk_widget_show_all(menu);
-	gtk_box_pack_start(GTK_BOX(prefs->startup_hbox), menu, FALSE, FALSE, 0);
+	gtk_box_append(GTK_BOX(prefs->startup_hbox), menu);
 	gtk_label_set_mnemonic_widget(GTK_LABEL(prefs->startup_label), menu);
 	pidgin_set_accessible_label(menu, GTK_LABEL(prefs->startup_label));
 	g_object_bind_property(prefs->startup_current_status, "active",
diff --git a/pidgin/resources/Prefs/away.ui b/pidgin/resources/Prefs/away.ui
--- a/pidgin/resources/Prefs/away.ui
+++ b/pidgin/resources/Prefs/away.ui
@@ -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>
 
@@ -16,10 +15,10 @@ GNU General Public License for more deta
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, see <https://www.gnu.org/licenses/>.
-
 -->
 <interface>
-  <requires lib="gtk+" version="3.22"/>
+  <requires lib="gtk" version="4.0"/>
+  <requires lib="Adw" version="1.0"/>
   <!-- interface-license-type gplv2 -->
   <!-- interface-name Pidgin -->
   <!-- interface-description Internet Messenger -->
@@ -75,45 +74,28 @@ along with this program; if not, see <ht
     <property name="step-increment">1</property>
     <property name="page-increment">10</property>
   </object>
-  <template class="PidginAwayPrefs" parent="HdyPreferencesPage">
-    <property name="visible">True</property>
-    <property name="can-focus">False</property>
+  <template class="PidginAwayPrefs" parent="AdwPreferencesPage">
     <child>
-      <object class="HdyPreferencesGroup">
-        <property name="visible">True</property>
-        <property name="can-focus">False</property>
+      <object class="AdwPreferencesGroup">
         <property name="title" translatable="yes">Idle</property>
         <child>
           <object class="GtkBox">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
             <property name="margin-start">12</property>
             <property name="orientation">vertical</property>
             <property name="spacing">6</property>
             <child>
               <object class="GtkBox">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkLabel" id="label12">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
                     <property name="label" translatable="yes">_Report idle time:</property>
-                    <property name="use-underline">True</property>
+                    <property name="use-underline">1</property>
                     <property name="mnemonic-widget">idle_reporting.combo</property>
                     <property name="xalign">0</property>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
                 <child>
                   <object class="GtkComboBox" id="idle_reporting.combo">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
                     <property name="model">idle_reporting.store</property>
                     <child>
                       <object class="GtkCellRendererText"/>
@@ -122,133 +104,68 @@ along with this program; if not, see <ht
                       </attributes>
                     </child>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
                 </child>
               </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="spacing">6</property>
                 <child>
                   <object class="GtkLabel" id="label13">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
                     <property name="label" translatable="yes">_Minutes before becoming idle:</property>
-                    <property name="use-underline">True</property>
+                    <property name="use-underline">1</property>
                     <property name="mnemonic-widget">mins_before_away</property>
                     <property name="xalign">0</property>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
                 <child>
                   <object class="GtkSpinButton" id="mins_before_away">
-                    <property name="visible">True</property>
-                    <property name="can-focus">True</property>
+                    <property name="focusable">1</property>
                     <property name="adjustment">mins_before_adjustment</property>
-                    <property name="numeric">True</property>
+                    <property name="numeric">1</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">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkBox" id="idle_hbox">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkCheckButton" id="away_when_idle">
                     <property name="label" translatable="yes">Change to this status when _idle:</property>
-                    <property name="visible">True</property>
-                    <property name="can-focus">True</property>
-                    <property name="receives-default">False</property>
-                    <property name="use-underline">True</property>
-                    <property name="draw-indicator">True</property>
+                    <property name="focusable">1</property>
+                    <property name="use-underline">1</property>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
                 <child>
                   <placeholder/>
                 </child>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
             </child>
           </object>
         </child>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">True</property>
-        <property name="position">0</property>
-      </packing>
     </child>
     <child>
-      <object class="HdyPreferencesGroup">
-        <property name="visible">True</property>
-        <property name="can-focus">False</property>
+      <object class="AdwPreferencesGroup">
         <property name="title" translatable="yes">Away</property>
         <child>
           <object class="GtkBox">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
             <property name="margin-start">12</property>
             <property name="orientation">vertical</property>
             <child>
               <object class="GtkBox">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkLabel" id="label14">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
                     <property name="label" translatable="yes">_Auto-reply:</property>
-                    <property name="use-underline">True</property>
+                    <property name="use-underline">1</property>
                     <property name="mnemonic-widget">auto_reply.combo</property>
                     <property name="xalign">0</property>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
                 <child>
                   <object class="GtkComboBox" id="auto_reply.combo">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
                     <property name="model">auto_reply.store</property>
                     <child>
                       <object class="GtkCellRendererText"/>
@@ -257,92 +174,46 @@ along with this program; if not, see <ht
                       </attributes>
                     </child>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
                 </child>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
             </child>
           </object>
         </child>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">True</property>
-        <property name="position">1</property>
-      </packing>
     </child>
     <child>
-      <object class="HdyPreferencesGroup">
-        <property name="visible">True</property>
-        <property name="can-focus">False</property>
+      <object class="AdwPreferencesGroup">
         <property name="title" translatable="yes">Status at Startup</property>
         <child>
           <object class="GtkBox">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
             <property name="margin-start">12</property>
             <property name="orientation">vertical</property>
             <property name="spacing">6</property>
             <child>
               <object class="GtkCheckButton" id="startup_current_status">
                 <property name="label" translatable="yes">Use status from last _exit at startup</property>
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">False</property>
-                <property name="use-underline">True</property>
-                <property name="draw-indicator">True</property>
+                <property name="focusable">1</property>
+                <property name="use-underline">1</property>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
             </child>
             <child>
               <object class="GtkBox" id="startup_hbox">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkLabel" id="startup_label">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
                     <property name="label" translatable="yes">Status to a_pply at startup:</property>
-                    <property name="use-underline">True</property>
+                    <property name="use-underline">1</property>
                     <property name="xalign">0</property>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
                 <child>
                   <placeholder/>
                 </child>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
             </child>
           </object>
         </child>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">True</property>
-        <property name="position">2</property>
-      </packing>
     </child>
   </template>
   <object class="GtkSizeGroup" id="sg">
