Skip to content

Commit 5e1cdef

Browse files
committed
replacing deprecated libadwaita calls
1 parent ce7b450 commit 5e1cdef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ui_helpers.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ void show_simple_message_dialog(GtkWidget* parent, const std::string& title, con
129129
return;
130130
}
131131

132-
auto* dialog = adw_message_dialog_new(GTK_WINDOW(parent), title.c_str(), descr.c_str());
132+
auto* dialog = adw_alert_dialog_new(title.c_str(), descr.c_str());
133133

134134
const std::string response_id = "close";
135-
adw_message_dialog_add_response(ADW_MESSAGE_DIALOG(dialog), response_id.c_str(), "Close (Press ESC)");
136-
adw_message_dialog_set_default_response(ADW_MESSAGE_DIALOG(dialog), response_id.c_str());
135+
adw_alert_dialog_add_response(ADW_ALERT_DIALOG(dialog), response_id.c_str(), "Close (Press ESC)");
136+
adw_alert_dialog_set_default_response(ADW_ALERT_DIALOG(dialog), response_id.c_str());
137137

138-
gtk_window_present(GTK_WINDOW(dialog));
138+
adw_dialog_present(dialog, parent);
139139
}
140140

141141
auto parse_spinbutton_output(GtkSpinButton* button, const char* unit, const bool& lower_bound) -> gboolean {

0 commit comments

Comments
 (0)