[Xfce4-commits] <xfce4-settings:master> Merge branch 'master' of ssh://git.xfce.org/git/xfce/xfce4-settings

Jérôme Guelfucci noreply at xfce.org
Fri Apr 22 16:28:03 CEST 2011


Updating branch refs/heads/master
         to 6493451086272094c6085412888f37709aabda0f (commit)
       from c0f9d7b42974ea0c6642b99e079d45e1cd43d01e (commit)

commit 6493451086272094c6085412888f37709aabda0f
Merge: c0f9d7b 57ade33
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Fri Apr 22 15:35:57 2011 +0200

    Merge branch 'master' of ssh://git.xfce.org/git/xfce/xfce4-settings

commit 57ade33f4b612b03ba14692aef5a5b31d7e7fc1a
Author: Yves-Alexis Perez <corsac at debian.org>
Date:   Thu Apr 21 16:47:11 2011 +0200

    Dynamically allocate the filename (bug #7521).
    
    PATH_MAX isn't available on hurd and not needed as well.

 .../xfce-settings-manager-dialog.c                 |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/xfce4-settings-manager/xfce-settings-manager-dialog.c b/xfce4-settings-manager/xfce-settings-manager-dialog.c
index 90d34c8..044e94a 100644
--- a/xfce4-settings-manager/xfce-settings-manager-dialog.c
+++ b/xfce4-settings-manager/xfce-settings-manager-dialog.c
@@ -384,7 +384,8 @@ xfce_settings_manager_dialog_sort_icons(GtkTreeModel *model,
 static void
 xfce_settings_manager_dialog_create_liststore(XfceSettingsManagerDialog *dialog)
 {
-    gchar **dirs, buf[PATH_MAX];
+    gchar **dirs;
+    gchar *filename;
     gint i, icon_size;
     GList *dialog_name_list = NULL;
 
@@ -424,8 +425,9 @@ xfce_settings_manager_dialog_create_liststore(XfceSettingsManagerDialog *dialog)
             if(!g_str_has_suffix(file, ".desktop"))
                 continue;
 
-            g_snprintf(buf, sizeof(buf), "%s/%s", dirs[i], file);
-            rcfile = xfce_rc_simple_open(buf, TRUE);
+            filename = g_build_filename(dirs[i], file, NULL);
+            rcfile = xfce_rc_simple_open(filename, TRUE);
+            g_free (filename);
             if(!rcfile)
                 continue;
 



More information about the Xfce4-commits mailing list