Blob Blame Raw
From d77079e03fd39d99455ff4f6495cbc6a5cc53308 Mon Sep 17 00:00:00 2001
From: Nick Schermer <nick@xfce.org>
Date: Fri, 03 Aug 2012 19:50:37 +0000
Subject: Search new background location in list (bug #8799).

(cherry picked from commit 2ab345ffebe0e2d31aed9281832d71a038b82117)
---
diff --git a/settings/main.c b/settings/main.c
index 1ebad7c..f4ded70 100644
--- a/settings/main.c
+++ b/settings/main.c
@@ -688,6 +688,7 @@ xfdesktop_settings_dialog_populate_image_list(AppearancePanel *panel)
         xfconf_channel_set_string(panel->channel, prop_image, image_file);
         xfconf_channel_set_string(panel->channel, prop_last, image_file);
 
+        /* Add all backdrops in xfce4/backdrops/ for backwards compatibility with 4.8 */
         backdrop_dirs = xfce_resource_lookup_all(XFCE_RESOURCE_DATA,
                                                  "xfce4/backdrops/");
         for(i = 0; backdrop_dirs[i]; ++i) {
@@ -696,6 +697,18 @@ xfdesktop_settings_dialog_populate_image_list(AppearancePanel *panel)
             if(tmp)
                 image_file_iter = tmp;
         }
+        g_strfreev(backdrop_dirs);
+
+        /* Add all backdrops in backgrounds/xfce/ */
+        backdrop_dirs = xfce_resource_lookup_all(XFCE_RESOURCE_DATA,
+                                                 "backgrounds/xfce/");
+        for(i = 0; backdrop_dirs[i]; ++i) {
+            tmp = xfdesktop_image_list_add_dir(ls, backdrop_dirs[i],
+                                               image_file);
+            if(tmp)
+                image_file_iter = tmp;
+        }
+        g_strfreev(backdrop_dirs);
 
         if(!image_file_iter)
             image_file_iter = xfdesktop_settings_image_treeview_add(GTK_TREE_MODEL(ls), image_file);
--
cgit v0.9.0.3