Fix GTK4 deprecations in flash.c
This commit is contained in:
@@ -83,9 +83,7 @@ mp_flash_gtk_init(GDBusConnection *conn)
|
||||
gtk_window_set_decorated(GTK_WINDOW(window), FALSE);
|
||||
gtk_window_fullscreen(GTK_WINDOW(window));
|
||||
|
||||
GtkStyleContext *context;
|
||||
context = gtk_widget_get_style_context(window);
|
||||
gtk_style_context_add_class(context, "flash");
|
||||
gtk_widget_add_css_class(window, "flash");
|
||||
|
||||
flash_window = window;
|
||||
}
|
||||
@@ -162,7 +160,7 @@ show_display_flash(MPFlash *flash)
|
||||
if (!flash_window)
|
||||
return false;
|
||||
|
||||
gtk_widget_show(flash_window);
|
||||
gtk_widget_set_visible(flash_window, true);
|
||||
|
||||
// First get brightness and then set brightness to 100%
|
||||
if (!dbus_brightness_proxy)
|
||||
@@ -204,7 +202,7 @@ hide_display_flash(MPFlash *flash)
|
||||
if (!flash_window)
|
||||
return false;
|
||||
|
||||
gtk_widget_hide(flash_window);
|
||||
gtk_widget_set_visible(flash_window, false);
|
||||
set_display_brightness(dbus_old_brightness);
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user