Skip to content

Commit

Permalink
new-bottle-dialog: Use GtkWidget.add_css_class()
Browse files Browse the repository at this point in the history
`GtkWidget.get_style_context()` is deprecated.
  • Loading branch information
TheEvilSkeleton committed Jan 2, 2025
1 parent 8b38954 commit d3789e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bottles/frontend/views/new_bottle_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def send_notification(notification: Gio.Notification) -> None:
notification.set_title(title)
notification.set_body(_("Bottle failed to create with one or more errors."))
self.status_page_status.set_title(title)
self.btn_close.get_style_context().add_class("destructive-action")
self.btn_close.add_css_class("destructive-action")
send_notification(notification)

# Display error logs in the result page
Expand All @@ -260,7 +260,7 @@ def send_notification(notification: Gio.Notification) -> None:
notification.set_body(description)

self.new_bottle_config = result.data.get("config")
self.btn_close.get_style_context().add_class("suggested-action")
self.btn_close.add_css_class("suggested-action")
self.status_page_status.set_icon_name("selection-mode-symbolic")
self.status_page_status.set_title(title)
self.status_page_status.set_description(description)
Expand Down

0 comments on commit d3789e4

Please sign in to comment.