[Xfce4-commits] [xfce/xfce4-settings] 01/01: Prevent invalid characters from breaking display name (Bug 11423) - Thanks jatedev

noreply at xfce.org noreply at xfce.org
Wed Feb 4 02:38:19 CET 2015


This is an automated email from the git hooks/post-receive script.

bluesabre pushed a commit to branch master
in repository xfce/xfce4-settings.

commit 5a7f55a049147320adb8e2dc8495d6f868c4d6ac
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Tue Feb 3 20:38:14 2015 -0500

    Prevent invalid characters from breaking display name (Bug 11423) - Thanks jatedev
---
 dialogs/display-settings/xfce-randr.c |    3 +++
 xfsettingsd/displays.c                |    3 +++
 2 files changed, 6 insertions(+)

diff --git a/dialogs/display-settings/xfce-randr.c b/dialogs/display-settings/xfce-randr.c
index 12df004..60537b4 100644
--- a/dialogs/display-settings/xfce-randr.c
+++ b/dialogs/display-settings/xfce-randr.c
@@ -244,6 +244,9 @@ xfce_randr_populate (XfceRandr *randr,
 
         /* fill in the name used by the UI */
         randr->friendly_name[m] = xfce_randr_friendly_name (randr, m, output_ids[m]);
+        
+        /* Replace spaces with underscore in name for xfconf compatibility */
+        g_strcanon(randr->priv->output_info[m]->name, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_<>", '_');
     }
     /* populate mirrored details */
     xfce_randr_guess_relations (randr);
diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 6e1c55e..89bad40 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -847,6 +847,9 @@ xfce_displays_helper_list_outputs (XfceDisplaysHelper *helper)
         crtc = xfce_displays_helper_find_crtc_by_id (helper, output->info->crtc);
         output->active = crtc && crtc->mode != None;
 
+        /* Translate output->name into xfconf compatible format in place */
+        g_strcanon(output->info->name, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_<>", '_');
+
         xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Detected output %lu %s.", output->id,
                         output->info->name);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list