system/about: Fix crash after dark mode switch

Commit f3f81d37 added a signal connection between dark mode changes and
updating the OS logo in the About page. However, this signal was not
disconnected, causing a crash when changing the dark mode after leaving
the About page.

Fix this by using `g_signal_connect_object ()` instead.

Fixes #2854
This commit is contained in:
velsinki 2024-01-31 12:36:21 +01:00
parent 6fba003ec9
commit 869dfb990e

View file

@ -241,6 +241,6 @@ cc_about_page_init (CcAboutPage *self)
about_page_setup_overview (self);
style_manager = adw_style_manager_get_default ();
g_signal_connect_swapped (style_manager, "notify::dark", G_CALLBACK (setup_os_logo), self);
g_signal_connect_object (style_manager, "notify::dark", G_CALLBACK (setup_os_logo), self, G_CONNECT_SWAPPED);
setup_os_logo (self);
}