[Xfce4-commits] <xfdesktop:xfce-4.8> Search new background location in list (bug #8799).

Nick Schermer noreply at xfce.org
Fri Aug 3 21:56:01 CEST 2012


Updating branch refs/heads/xfce-4.8
         to 290a6b4ea665a7678b176a18354f5abdeff8adbc (commit)
       from 22b9414b048066a06ce8a8e80ba9933c1bd65bb9 (commit)

commit 290a6b4ea665a7678b176a18354f5abdeff8adbc
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Aug 3 21:50:37 2012 +0200

    Search new background location in list (bug #8799).
    
    (cherry picked from commit 2ab345ffebe0e2d31aed9281832d71a038b82117)

 settings/main.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/settings/main.c b/settings/main.c
index 9ae15cd..86726db 100644
--- a/settings/main.c
+++ b/settings/main.c
@@ -678,6 +678,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) {
@@ -686,6 +687,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);


More information about the Xfce4-commits mailing list