[nautilus/gnome-42] files-view: Set dark wallpaper when setting wallpaper



commit ca3702e9be91ce7e7c7f571ce5c757b0c737976b
Author: Jeremy Bicha <jeremy bicha canonical com>
Date:   Fri Mar 25 13:24:15 2022 +0000

    files-view: Set dark wallpaper when setting wallpaper
    
    This change only has an affect when nautilus is built without the libportal option
    
    This matches the current behavior of xdg-desktop-portal-gnome
    
    https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/commit/84f4f8619

 meson.build               | 1 +
 src/nautilus-files-view.c | 2 ++
 2 files changed, 3 insertions(+)
---
diff --git a/meson.build b/meson.build
index 65903177b..6e19609cd 100644
--- a/meson.build
+++ b/meson.build
@@ -119,6 +119,7 @@ glib = dependency('glib-2.0', version: glib_ver)
 gmodule = dependency('gmodule-no-export-2.0', version: glib_ver)
 gnome_autoar = dependency('gnome-autoar-0', version: '>= 0.4.0')
 gnome_desktop = dependency('gnome-desktop-3.0', version: '>= 3.0.0')
+gsettings_desktop_schemas_dep = dependency('gsettings-desktop-schemas', version: '>= 42')
 gtk = dependency('gtk+-3.0', version: '>= 3.22.27')
 libhandy = dependency('libhandy-1', version: '>= 1.5.0')
 libportal = []
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index c859d9fd3..3304c9bfe 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -6589,6 +6589,7 @@ action_run_in_terminal (GSimpleAction *action,
 #define BG_KEY_COLOR_TYPE         "color-shading-type"
 #define BG_KEY_PICTURE_PLACEMENT  "picture-options"
 #define BG_KEY_PICTURE_URI        "picture-uri"
+#define BG_KEY_DARK_PICTURE_URI   "picture-uri-dark"
 
 static void
 set_uri_as_wallpaper (const char *uri)
@@ -6605,6 +6606,7 @@ set_uri_as_wallpaper (const char *uri)
     }
 
     g_settings_set_string (settings, BG_KEY_PICTURE_URI, uri);
+    g_settings_set_string (settings, BG_KEY_DARK_PICTURE_URI, uri);
     g_settings_set_string (settings, BG_KEY_PRIMARY_COLOR, "#000000");
     g_settings_set_string (settings, BG_KEY_SECONDARY_COLOR, "#000000");
     g_settings_set_enum (settings, BG_KEY_COLOR_TYPE, G_DESKTOP_BACKGROUND_SHADING_SOLID);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]