confirm-quit: port to AdwAlertDialog

This commit is contained in:
Peter Eisenmann
2024-04-09 22:47:11 +02:00
parent 1115e80dfb
commit b8bd14bb4e
2 changed files with 2 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;
Adw.MessageDialog popup {
Adw.AlertDialog popup {
/* Translators: Dialog title */
heading: _("Installation Running");
/* Translators: Text in dialog shown if user wants to close app with installation running */

View File

@@ -217,11 +217,6 @@ class OsInstallerWindow(Adw.ApplicationWindow):
return # ignoring
self.image_stack.set_visible_child_name(next_image_name)
def _show_dialog(self, dialog):
dialog.set_transient_for(self)
dialog.set_modal(True)
dialog.present()
def _update_navigation_buttons(self):
# backward
show_backward = self.navigation.is_not_earliest()
@@ -305,7 +300,7 @@ class OsInstallerWindow(Adw.ApplicationWindow):
popup = builder.get_object('popup')
popup.connect('response',
lambda _, response: quit_callback() if response == "stop" else None)
self._show_dialog(popup)
popup.present(self)
def show_failed_page(self):
with self.navigation_lock: