sysprof: ignore various libadwaita deprecations

This is our only option for situations where we would have no other top-
level window, so just ignore them for now.
This commit is contained in:
Christian Hergert
2024-10-02 12:55:42 -07:00
parent 92a1179982
commit 5707ed0cac
3 changed files with 16 additions and 0 deletions

View File

@ -261,11 +261,15 @@ sysprof_greeter_choose_file_for_record_cb (GObject *object,
{
GtkWidget *message;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
message = adw_message_dialog_new (NULL,
_("Must Capture to Local File"),
_("You must choose a local file to capture using Sysprof"));
adw_message_dialog_add_response (ADW_MESSAGE_DIALOG (message), "close", _("Close"));
gtk_window_present (GTK_WINDOW (message));
G_GNUC_END_IGNORE_DEPRECATIONS
}
}
}

View File

@ -108,6 +108,8 @@ sysprof_recording_pad_wait_cb (GObject *object,
{
GtkWidget *dialog;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
dialog = adw_message_dialog_new (NULL, _("Recording Failed"), NULL);
adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog),
_("Sysprof failed to record.\n\n%s"),
@ -116,6 +118,8 @@ sysprof_recording_pad_wait_cb (GObject *object,
gtk_application_add_window (GTK_APPLICATION (SYSPROF_APPLICATION_DEFAULT),
GTK_WINDOW (dialog));
gtk_window_present (GTK_WINDOW (dialog));
G_GNUC_END_IGNORE_DEPRECATIONS
}
else if (-1 != (fd = sysprof_recording_dup_fd (self->recording)))
{

View File

@ -151,11 +151,15 @@ sysprof_window_open_file_cb (GObject *object,
{
GtkWidget *message;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
message = adw_message_dialog_new (NULL,
_("Must Capture to Local File"),
_("You must choose a local file to capture using Sysprof"));
adw_message_dialog_add_response (ADW_MESSAGE_DIALOG (message), "close", _("Close"));
gtk_window_present (GTK_WINDOW (message));
G_GNUC_END_IGNORE_DEPRECATIONS
}
}
}
@ -711,6 +715,8 @@ sysprof_window_load_cb (GObject *object,
{
GtkWidget *dialog;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
dialog = adw_message_dialog_new (NULL, _("Invalid Document"), NULL);
adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog),
_("The document could not be loaded. Please check that you have the correct capture file.\n\n%s"),
@ -719,6 +725,8 @@ sysprof_window_load_cb (GObject *object,
gtk_application_add_window (GTK_APPLICATION (app), GTK_WINDOW (dialog));
gtk_window_present (GTK_WINDOW (dialog));
G_GNUC_END_IGNORE_DEPRECATIONS
return;
}