# HG changeset patch
# Node ID 04404f9f505eba79f62f1130808bf7f0c48165b3
# Parent  f0edc907e01842fc59d52965971b2c7329db94ad
diff --git a/meson.build b/meson.build
--- a/meson.build
+++ b/meson.build
@@ -194,7 +194,7 @@
 #######################################################################
 if get_option('gtkui')
 	gtk = dependency('gtk4', version : '>= 4.10.0')
-	libadwaita = dependency('libadwaita-1', version : '>= 1.4')
+	libadwaita = dependency('libadwaita-1', version : '>= 1.5')
 endif
 
 ENABLE_GTK = get_option('gtkui')
diff --git a/pidgin/gtkwhiteboard.c b/pidgin/gtkwhiteboard.c
--- a/pidgin/gtkwhiteboard.c
+++ b/pidgin/gtkwhiteboard.c
@@ -376,26 +376,25 @@
                                      gpointer data)
 {
 	PidginWhiteboard *gtkwb = (PidginWhiteboard*)(data);
-	AdwMessageDialog *dialog = NULL;
+	AdwAlertDialog *dialog = NULL;
 
 	/* Confirm whether the user really wants to clear */
-	dialog = ADW_MESSAGE_DIALOG(adw_message_dialog_new(
-	        GTK_WINDOW(gtkwb),
+	dialog = ADW_ALERT_DIALOG(adw_alert_dialog_new(
 	        _("Clear whiteboard?"),
 	        _("Do you want to clear this whiteboard?")));
 
-	adw_message_dialog_add_responses(dialog, "no", _("_No"), "yes", _("_Yes"),
+	adw_alert_dialog_add_responses(dialog, "no", _("_No"), "yes", _("_Yes"),
 	                                 NULL);
-	adw_message_dialog_set_response_appearance(dialog, "yes",
+	adw_alert_dialog_set_response_appearance(dialog, "yes",
 	                                           ADW_RESPONSE_DESTRUCTIVE);
-	adw_message_dialog_set_default_response(dialog, "yes");
-	adw_message_dialog_set_close_response(dialog, "no");
+	adw_alert_dialog_set_default_response(dialog, "yes");
+	adw_alert_dialog_set_close_response(dialog, "no");
 
 	g_signal_connect(dialog, "response",
 	                 G_CALLBACK(pidgin_whiteboard_clear_response), gtkwb);
 
 	gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
-	gtk_window_present(GTK_WINDOW(dialog));
+	adw_dialog_present(ADW_DIALOG(dialog), GTK_WIDGET(gtkwb));
 }
 
 static void
diff --git a/pidgin/pidginaccountmanagerrow.c b/pidgin/pidginaccountmanagerrow.c
--- a/pidgin/pidginaccountmanagerrow.c
+++ b/pidgin/pidginaccountmanagerrow.c
@@ -223,7 +223,7 @@
 {
 	PidginAccountManagerRow *row = data;
 	GtkRoot *root = NULL;
-	AdwMessageDialog *dialog = NULL;
+	AdwAlertDialog *dialog = NULL;
 	const char *name = NULL;
 	char *protocol_name = NULL;
 
@@ -233,25 +233,23 @@
 	                                                            NULL);
 
 	root = gtk_widget_get_root(GTK_WIDGET(row));
-	dialog = ADW_MESSAGE_DIALOG(adw_message_dialog_new(GTK_WINDOW(root),
-	                                                   _("Remove account?"),
-	                                                   NULL));
-	adw_message_dialog_format_body(dialog,
-	                               _("Do you want to remove the %s (%s) "
-	                                 "account from Pidgin?"),
-	                               name, protocol_name);
-	adw_message_dialog_add_responses(dialog, "cancel", _("Cancel"),
-	                                 "remove", _("Remove"), NULL);
-	adw_message_dialog_set_response_appearance(dialog, "remove",
-	                                           ADW_RESPONSE_DESTRUCTIVE);
-	adw_message_dialog_set_default_response(dialog, "cancel");
-	adw_message_dialog_set_close_response(dialog, "cancel");
+	dialog = ADW_ALERT_DIALOG(adw_alert_dialog_new(_("Remove account?"), NULL));
+	adw_alert_dialog_format_body(dialog,
+	                             _("Do you want to remove the %s (%s) "
+	                               "account from Pidgin?"),
+	                             name, protocol_name);
+	adw_alert_dialog_add_responses(dialog, "cancel", _("Cancel"),
+	                               "remove", _("Remove"), NULL);
+	adw_alert_dialog_set_response_appearance(dialog, "remove",
+	                                         ADW_RESPONSE_DESTRUCTIVE);
+	adw_alert_dialog_set_default_response(dialog, "cancel");
+	adw_alert_dialog_set_close_response(dialog, "cancel");
 
 	g_signal_connect_object(dialog, "response",
 	                        G_CALLBACK(pidgin_account_manager_remove_account_cb),
 	                        row->account, 0);
 
-	gtk_window_present(GTK_WINDOW(dialog));
+	adw_dialog_present(ADW_DIALOG(dialog), GTK_WIDGET(root));
 
 	g_free(protocol_name);
 }
diff --git a/pidgin/pidginapplication.c b/pidgin/pidginapplication.c
--- a/pidgin/pidginapplication.c
+++ b/pidgin/pidginapplication.c
@@ -759,28 +759,27 @@
 #endif
 
 	if(!purple_core_init(pidgin_ui_new(), &error)) {
-		GtkWidget *message = NULL;
+		AdwDialog *dialog = NULL;
 		const char *error_message = "unknown error";
 
 		if(error != NULL) {
 			error_message = error->message;
 		}
 
-		message = adw_message_dialog_new(NULL,
-		                                 _("Pidgin 3 failed to initialize"),
-		                                 error_message);
+		dialog = adw_alert_dialog_new(_("Pidgin 3 failed to initialize"),
+		                               error_message);
 		g_clear_error(&error);
 
-		adw_message_dialog_add_responses(ADW_MESSAGE_DIALOG(message),
-		                                 "close", _("Close"), NULL);
-		adw_message_dialog_set_close_response(ADW_MESSAGE_DIALOG(message),
-		                                      "close");
+		adw_alert_dialog_add_responses(ADW_ALERT_DIALOG(dialog),
+		                               "close", _("Close"), NULL);
+		adw_alert_dialog_set_close_response(ADW_ALERT_DIALOG(dialog),
+		                                    "close");
 
-		g_signal_connect(message, "response",
+		g_signal_connect(dialog, "response",
 		                 G_CALLBACK(pidgin_application_error_reponse_cb),
 		                 application);
 
-		gtk_window_present(GTK_WINDOW(message));
+		adw_dialog_present(ADW_DIALOG(dialog), NULL);
 
 		return;
 	}
