# HG changeset patch
# Node ID 93c94ec71bae
# Parent  61d8f39f3d70
diff --git a/pidgin/gtkmedia.c b/pidgin/gtkmedia.c
--- a/pidgin/gtkmedia.c
+++ b/pidgin/gtkmedia.c
@@ -116,12 +116,14 @@
 };
 
 static gboolean
-pidgin_media_delete_event_cb(GtkWidget *widget,
-		GdkEvent *event, PidginMedia *media)
-{
-	if (media->priv->media)
+pidgin_media_close_request_cb(GtkWindow *window, gpointer data) {
+	PidginMedia *media = data;
+
+	if(media->priv->media) {
 		g_action_group_activate_action(G_ACTION_GROUP(media),
 				"Hangup", NULL);
+	}
+
 	return FALSE;
 }
 
@@ -160,7 +162,7 @@
 	                                             statusbar);
 
 	gtk_widget_class_bind_template_callback(widget_class,
-	                                        pidgin_media_delete_event_cb);
+	                                        pidgin_media_close_request_cb);
 
 }
 
diff --git a/pidgin/gtkrequest.c b/pidgin/gtkrequest.c
--- a/pidgin/gtkrequest.c
+++ b/pidgin/gtkrequest.c
@@ -318,8 +318,7 @@
 }
 
 static gboolean
-destroy_multifield_cb(GtkWidget *dialog, GdkEvent *event,
-					  PidginRequestData *data)
+destroy_multifield_cb(GtkWidget *self, PidginRequestData *data)
 {
 	multifield_cancel_cb(NULL, data);
 	return FALSE;
@@ -1262,10 +1261,8 @@
 
 static GtkWidget *
 create_choice_field(PurpleRequestField *field,
-	PurpleRequestCommonParameters *cpar)
+                    PurpleRequestCommonParameters *cpar)
 {
-#warning please rewrite me
-#if 0
 	GtkWidget *widget;
 	GList *elements = purple_request_field_choice_get_elements(field);
 	guint num_labels = g_list_length(elements);
@@ -1361,7 +1358,6 @@
 	g_object_set_data_full(G_OBJECT(widget), "values", values, g_free);
 
 	return widget;
-#endif
 
 	return NULL;
 }
@@ -1944,7 +1940,7 @@
 
 	data->dialog = win = pidgin_dialog_new(title, 12, "multifield", TRUE) ;
 
-	g_signal_connect(G_OBJECT(win), "delete_event",
+	g_signal_connect(G_OBJECT(win), "close-request",
 					 G_CALLBACK(destroy_multifield_cb), data);
 
 	/* Setup the main horizontal box */
diff --git a/pidgin/resources/Media/window.ui b/pidgin/resources/Media/window.ui
--- a/pidgin/resources/Media/window.ui
+++ b/pidgin/resources/Media/window.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>
 
@@ -15,85 +14,53 @@
 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, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-
+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="PidginMedia" parent="GtkApplicationWindow">
-    <property name="can-focus">False</property>
-    <signal name="delete-event" handler="pidgin_media_delete_event_cb" swapped="no"/>
+    <signal name="close-request" handler="pidgin_media_close_request_cb" swapped="no"/>
     <child>
       <object class="GtkBox">
-        <property name="visible">True</property>
-        <property name="can-focus">False</property>
         <property name="orientation">vertical</property>
         <child>
-          <object class="GtkToolbar">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
-            <property name="toolbar-style">both</property>
+          <object class="GtkBox">
+            <property name="css-classes">toolbar</property>
+            <property name="can-focus">0</property>
             <child>
-              <object class="GtkToolButton">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
-                <property name="tooltip-text" translatable="yes">Hangup</property>
+              <object class="GtkButton">
+                <property name="can-focus">0</property>
+                <property name="tooltip-text" translatable="1">Hangup</property>
                 <property name="action-name">win.Hangup</property>
-                <property name="label" translatable="yes">Hangup</property>
-                <property name="use-underline">True</property>
+                <property name="label" translatable="1">Hangup</property>
+                <property name="use-underline">1</property>
                 <property name="icon-name">media-playback-stop</property>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</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" id="display">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
+            <property name="vexpand">1</property>
+            <property name="valign">fill</property>
             <property name="orientation">vertical</property>
             <property name="spacing">6</property>
             <child>
               <placeholder/>
             </child>
           </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
         </child>
         <child>
           <object class="GtkStatusbar" id="statusbar">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
-            <property name="margin-left">10</property>
-            <property name="margin-right">10</property>
             <property name="margin-start">10</property>
             <property name="margin-end">10</property>
             <property name="margin-top">6</property>
             <property name="margin-bottom">6</property>
-            <property name="orientation">vertical</property>
-            <property name="spacing">2</property>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">2</property>
-          </packing>
         </child>
       </object>
     </child>
