summaryrefslogtreecommitdiffstats
path: root/meta-xfce/recipes-xfce
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xfce/recipes-xfce')
-rw-r--r--meta-xfce/recipes-xfce/xfdesktop/files/0001-Remove-whitespaces-from-monitor-name-when-accessing-.patch138
-rw-r--r--meta-xfce/recipes-xfce/xfdesktop/xfdesktop_4.12.2.bb1
2 files changed, 139 insertions, 0 deletions
diff --git a/meta-xfce/recipes-xfce/xfdesktop/files/0001-Remove-whitespaces-from-monitor-name-when-accessing-.patch b/meta-xfce/recipes-xfce/xfdesktop/files/0001-Remove-whitespaces-from-monitor-name-when-accessing-.patch
new file mode 100644
index 000000000..3390f2810
--- /dev/null
+++ b/meta-xfce/recipes-xfce/xfdesktop/files/0001-Remove-whitespaces-from-monitor-name-when-accessing-.patch
@@ -0,0 +1,138 @@
1From f384bfc86322096c62f0b843bacf5e9633e18035 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Thu, 25 Jun 2015 13:08:29 +0200
4Subject: [PATCH] Remove whitespaces from monitor name when accessing settings
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Desktop wallpaper could not be set here. Running
10'xfdesktop-settings --enable-debug' lead to:
11
12| Saving to /backdrop/screen0/monitorDISP3 BG - DI1/workspace0/last-image//usr/share/backgrounds/xfce/xfce-blue.jpg
13
14and no change was found tracking with Settings Editor.
15
16Upstream-Status: Submitted [1]
17
18[1] https://bugzilla.xfce.org/show_bug.cgi?id=12015
19
20Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
21---
22 common/xfdesktop-common.c | 26 ++++++++++++++++++++++++++
23 common/xfdesktop-common.h | 1 +
24 settings/main.c | 4 ++--
25 src/xfce-workspace.c | 11 +++++------
26 4 files changed, 34 insertions(+), 8 deletions(-)
27
28diff --git a/common/xfdesktop-common.c b/common/xfdesktop-common.c
29index 5d2c255..1f180df 100644
30--- a/common/xfdesktop-common.c
31+++ b/common/xfdesktop-common.c
32@@ -194,6 +194,32 @@ xfdesktop_popup_keyboard_grab_available(GdkWindow *win)
33 }
34
35
36+/*
37+ * xfdesktop_remove_whitspaces:
38+ * remove all whitespaces from string (not only trailing or leading)
39+ */
40+gchar*
41+xfdesktop_remove_whitspaces(gchar* str)
42+{
43+ gchar* dest;
44+ gint offs, curr;
45+
46+ g_return_val_if_fail(str, NULL);
47+
48+ offs = 0;
49+ dest = str;
50+ for(curr=0; curr<=strlen(str); curr++) {
51+ if(*dest == ' ' || *dest == '\t')
52+ offs++;
53+ else if(0 != offs)
54+ *(dest-offs) = *dest;
55+ dest++;
56+ }
57+
58+ return str;
59+}
60+
61+
62 #ifdef G_ENABLE_DEBUG
63 /* With --enable-debug=full turn on debugging messages from the start */
64 static gboolean enable_debug = TRUE;
65diff --git a/common/xfdesktop-common.h b/common/xfdesktop-common.h
66index d1a2745..9e76e78 100644
67--- a/common/xfdesktop-common.h
68+++ b/common/xfdesktop-common.h
69@@ -100,6 +100,7 @@ gint xfce_translate_image_styles(gint input);
70
71 guint32 xfdesktop_popup_keyboard_grab_available(GdkWindow *win);
72
73+gchar* xfdesktop_remove_whitspaces(gchar* str);
74
75 #if defined(G_HAVE_ISO_VARARGS)
76
77diff --git a/settings/main.c b/settings/main.c
78index bc68099..b37abad 100644
79--- a/settings/main.c
80+++ b/settings/main.c
81@@ -795,9 +795,9 @@ xfdesktop_settings_generate_per_workspace_binding_string(AppearancePanel *panel,
82 panel->screen, panel->monitor, panel->workspace,
83 property);
84 } else {
85- buf = g_strdup_printf("/backdrop/screen%d/monitor%s/workspace%d/%s",
86+ buf = xfdesktop_remove_whitspaces(g_strdup_printf("/backdrop/screen%d/monitor%s/workspace%d/%s",
87 panel->screen, panel->monitor_name, panel->workspace,
88- property);
89+ property));
90 }
91
92 XF_DEBUG("name %s", buf);
93diff --git a/src/xfce-workspace.c b/src/xfce-workspace.c
94index 6d3b3e6..13e1187 100644
95--- a/src/xfce-workspace.c
96+++ b/src/xfce-workspace.c
97@@ -157,7 +157,7 @@ xfce_workspace_set_xfconf_property_string(XfceWorkspace *workspace,
98 workspace->priv->property_prefix, monitor_num, workspace->priv->workspace_num, property);
99 } else {
100 g_snprintf(buf, sizeof(buf), "%smonitor%s/workspace%d/%s",
101- workspace->priv->property_prefix, monitor_name, workspace->priv->workspace_num, property);
102+ workspace->priv->property_prefix, xfdesktop_remove_whitspaces(monitor_name), workspace->priv->workspace_num, property);
103
104 g_free(monitor_name);
105 }
106@@ -191,7 +191,7 @@ xfce_workspace_set_xfconf_property_value(XfceWorkspace *workspace,
107 workspace->priv->property_prefix, monitor_num, workspace->priv->workspace_num, property);
108 } else {
109 g_snprintf(buf, sizeof(buf), "%smonitor%s/workspace%d/%s",
110- workspace->priv->property_prefix, monitor_name, workspace->priv->workspace_num, property);
111+ workspace->priv->property_prefix, xfdesktop_remove_whitspaces(monitor_name), workspace->priv->workspace_num, property);
112
113 g_free(monitor_name);
114 }
115@@ -609,8 +609,9 @@ xfce_workspace_connect_backdrop_settings(XfceWorkspace *workspace,
116 workspace->priv->property_prefix, monitor, workspace->priv->workspace_num);
117 } else {
118 g_snprintf(buf, sizeof(buf), "%smonitor%s/workspace%d/",
119- workspace->priv->property_prefix, monitor_name, workspace->priv->workspace_num);
120- }
121+ workspace->priv->property_prefix, xfdesktop_remove_whitspaces(monitor_name), workspace->priv->workspace_num);
122+ g_free(monitor_name);
123+ }
124 pp_len = strlen(buf);
125
126 XF_DEBUG("prefix string: %s", buf);
127@@ -674,8 +675,6 @@ xfce_workspace_connect_backdrop_settings(XfceWorkspace *workspace,
128 xfconf_g_property_bind(channel, buf, G_TYPE_STRING,
129 G_OBJECT(backdrop), "image-filename");
130
131-
132- g_free(monitor_name);
133 }
134
135 static void
136--
1371.9.3
138
diff --git a/meta-xfce/recipes-xfce/xfdesktop/xfdesktop_4.12.2.bb b/meta-xfce/recipes-xfce/xfdesktop/xfdesktop_4.12.2.bb
index 9c7202890..95b5f4001 100644
--- a/meta-xfce/recipes-xfce/xfdesktop/xfdesktop_4.12.2.bb
+++ b/meta-xfce/recipes-xfce/xfdesktop/xfdesktop_4.12.2.bb
@@ -8,6 +8,7 @@ inherit xfce
8 8
9SRC_URI[md5sum] = "9a29c8e6b8a931fecd29f1ea736a6a70" 9SRC_URI[md5sum] = "9a29c8e6b8a931fecd29f1ea736a6a70"
10SRC_URI[sha256sum] = "c9788883163b57bac39d12e5f8310c869d176454879defb78b67f8e9f1ad5225" 10SRC_URI[sha256sum] = "c9788883163b57bac39d12e5f8310c869d176454879defb78b67f8e9f1ad5225"
11SRC_URI += "file://0001-Remove-whitespaces-from-monitor-name-when-accessing-.patch"
11 12
12PACKAGECONFIG ??= "" 13PACKAGECONFIG ??= ""
13PACKAGECONFIG[notify] = "--enable-notifications,--disable-notifications,libnotify" 14PACKAGECONFIG[notify] = "--enable-notifications,--disable-notifications,libnotify"