Merge lp:~noskcaj/ubuntu/trusty/xfdesktop4/git-patches into lp:ubuntu/trusty/xfdesktop4

Proposed by Jackson Doak on 2014-03-27
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~noskcaj/ubuntu/trusty/xfdesktop4/git-patches
Merge into: lp:ubuntu/trusty/xfdesktop4
Diff against target: 397 lines (+281/-7)
9 files modified
.pc/xubuntu_improve-nautilus-interactions.patch/src/xfce-desktop.c (+2/-0)
debian/changelog (+14/-0)
debian/patches/git-desktop-icons-have-background.patch (+104/-0)
debian/patches/git-fix-default-icon-size.patch (+22/-0)
debian/patches/git-missing-images-in-settings-app.patch (+125/-0)
debian/patches/series (+3/-0)
debian/patches/xubuntu_improve-nautilus-interactions.patch (+3/-3)
debian/patches/xubuntu_set-accountsservice-user-bg.patch (+6/-4)
src/xfce-desktop.c (+2/-0)
To merge this branch: bzr merge lp:~noskcaj/ubuntu/trusty/xfdesktop4/git-patches
Reviewer Review Type Date Requested Status
Sebastien Bacher 2014-03-27 Approve on 2014-03-31
Review via email: mp+213148@code.launchpad.net

Description of the change

Add patches from upstream git for xubuntu 14.04

To post a comment you must log in.
102. By Jackson Doak on 2014-03-28

Refresh xubuntu_set-accountsservice-user-bg.patch to fix
a memory leak. LP: #1295614

Alistair Buxton (a-j-buxton) wrote :

Ack for accounts service memory leak fix.

Sebastien Bacher (seb128) wrote :

Thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.pc/xubuntu_improve-nautilus-interactions.patch/.timestamp'
2=== modified file '.pc/xubuntu_improve-nautilus-interactions.patch/src/xfce-desktop.c'
3--- .pc/xubuntu_improve-nautilus-interactions.patch/src/xfce-desktop.c 2014-03-19 16:33:54 +0000
4+++ .pc/xubuntu_improve-nautilus-interactions.patch/src/xfce-desktop.c 2014-03-28 19:37:23 +0000
5@@ -425,6 +425,8 @@
6 }
7
8 bail:
9+ if(user)
10+ g_object_unref(user);
11 if(proxy)
12 g_object_unref(proxy);
13 if(variant)
14
15=== modified file 'debian/changelog'
16--- debian/changelog 2014-03-19 16:33:54 +0000
17+++ debian/changelog 2014-03-28 19:37:23 +0000
18@@ -1,3 +1,17 @@
19+xfdesktop4 (4.11.4-1ubuntu2) trusty; urgency=medium
20+
21+ * Add patches from upstream git:
22+ - git-desktop-icons-have-background.patch. LP: #1270261
23+ Makes desktop icons not have their own background
24+ - git-missing-images-in-settings-app.patch. LP: #1282227
25+ Fixes some images not appearing in xfdesktop settings
26+ - git-fix-default-icon-size.patch. LP: #1272057
27+ Explicitly define the desktop icon size
28+ * Refresh xubuntu_set-accountsservice-user-bg.patch to fix
29+ a memory leak. LP: #1295614
30+
31+ -- Jackson Doak <noskcaj@ubuntu.com> Fri, 28 Mar 2014 07:16:04 +1100
32+
33 xfdesktop4 (4.11.4-1ubuntu1) trusty; urgency=medium
34
35 * Merge from debian. Remaining changes:
36
37=== added file 'debian/patches/git-desktop-icons-have-background.patch'
38--- debian/patches/git-desktop-icons-have-background.patch 1970-01-01 00:00:00 +0000
39+++ debian/patches/git-desktop-icons-have-background.patch 2014-03-28 19:37:23 +0000
40@@ -0,0 +1,104 @@
41+Origin: upstream
42+Author: Eric Koegel <eric.koegel@gmail.com>
43+Description: Reset the icon_view style on style change
44+ Since xfdesktop now properly responds to xfsettingsd changes we
45+ need to handle the race condition at launch. This patch changes
46+ it so that the style change for the icon view happens in a low
47+ priority callback. This ensures that the style gets reset only
48+ once if there's a batch of changes to process and will happen
49+ after xfdesktop has loaded. This is different from the previous
50+ callback patch in that the entire icon view doesn't get recreated.
51+Bug: https://bugzilla.xfce.org/show_bug.cgi?id=10605
52+Bug-Ubuntu: https://launchpad.net/bugs/1270261
53+Applied-Upstream: commit:cdbba947379540fa2c89fda34b96bf336070fe47
54+
55+---
56+ src/xfce-desktop.c | 38 ++++++++++++++++++++++++++++++++------
57+ 1 file changed, 32 insertions(+), 6 deletions(-)
58+
59+--- a/src/xfce-desktop.c
60++++ b/src/xfce-desktop.c
61+@@ -115,6 +115,7 @@ struct _XfceDesktopPriv
62+ gboolean icons_font_size_set;
63+ guint icons_font_size;
64+ guint icons_size;
65++ gint style_refresh_timer;
66+ GtkWidget *icon_view;
67+ gdouble system_font_size;
68+ #endif
69+@@ -994,6 +995,9 @@ xfce_desktop_finalize(GObject *object)
70+ g_object_unref(G_OBJECT(desktop->priv->channel));
71+ g_free(desktop->priv->property_prefix);
72+
73++ if(desktop->priv->style_refresh_timer != 0)
74++ g_source_remove(desktop->priv->style_refresh_timer);
75++
76+ G_OBJECT_CLASS(xfce_desktop_parent_class)->finalize(object);
77+ }
78+
79+@@ -1351,8 +1355,8 @@ xfce_desktop_delete_event(GtkWidget *w,
80+ return TRUE;
81+ }
82+
83+-static void
84+-xfce_desktop_style_set(GtkWidget *w, GtkStyle *old_style)
85++static gboolean
86++style_refresh_cb(gpointer *w)
87+ {
88+ XfceDesktop *desktop = XFCE_DESKTOP(w);
89+ #ifdef ENABLE_DESKTOP_ICONS
90+@@ -1361,13 +1365,15 @@ xfce_desktop_style_set(GtkWidget *w, Gtk
91+
92+ TRACE("entering");
93+
94+- g_return_if_fail(XFCE_IS_DESKTOP(desktop));
95++ desktop->priv->style_refresh_timer = 0;
96++
97++ g_return_val_if_fail(XFCE_IS_DESKTOP(desktop), FALSE);
98+
99+ if(!gtk_widget_get_realized(GTK_WIDGET(desktop)))
100+- return;
101++ return FALSE;
102+
103+ if(desktop->priv->workspaces == NULL)
104+- return;
105++ return FALSE;
106+
107+ if(GDK_IS_WINDOW(desktop->priv->bg_pixmap))
108+ gdk_window_set_back_pixmap(gtk_widget_get_window(GTK_WIDGET(desktop)), desktop->priv->bg_pixmap, FALSE);
109+@@ -1376,7 +1382,7 @@ xfce_desktop_style_set(GtkWidget *w, Gtk
110+
111+ #ifdef ENABLE_DESKTOP_ICONS
112+ if(!desktop->priv->icon_view || !XFDESKTOP_IS_ICON_VIEW(desktop->priv->icon_view))
113+- return;
114++ return FALSE;
115+
116+ /* reset the icon view style */
117+ gtk_widget_set_style(desktop->priv->icon_view, NULL);
118+@@ -1390,6 +1396,26 @@ xfce_desktop_style_set(GtkWidget *w, Gtk
119+ desktop->priv->system_font_size);
120+ }
121+ #endif
122++
123++ return FALSE;
124++}
125++
126++static void
127++xfce_desktop_style_set(GtkWidget *w, GtkStyle *old_style)
128++{
129++ XfceDesktop *desktop = XFCE_DESKTOP(w);
130++
131++ TRACE("entering");
132++
133++ if(desktop->priv->style_refresh_timer != 0)
134++ g_source_remove(desktop->priv->style_refresh_timer);
135++
136++ desktop->priv->style_refresh_timer = g_idle_add_full(G_PRIORITY_LOW,
137++ (GSourceFunc)style_refresh_cb,
138++ w,
139++ NULL);
140++
141++ GTK_WIDGET_CLASS(xfce_desktop_parent_class)->style_set(w, old_style);
142+ }
143+
144+ static void
145
146=== added file 'debian/patches/git-fix-default-icon-size.patch'
147--- debian/patches/git-fix-default-icon-size.patch 1970-01-01 00:00:00 +0000
148+++ debian/patches/git-fix-default-icon-size.patch 2014-03-28 19:37:23 +0000
149@@ -0,0 +1,22 @@
150+Origin: upstream
151+Author: Eric Koegel <eric.koegel@gmail.com>
152+Description: Explicitly define the desktop icon size
153+Bug: https://bugzilla.xfce.org/show_bug.cgi?id=9199
154+Bug-Ubuntu: https://launchpad.net/bugs/1272057
155+Applied-Upstream: commit:5203d9aa93e40dbddc81895fa60c8d1c99dd95f3
156+
157+---
158+ src/xfce-desktop.c | 2 +-
159+ 1 file changed, 1 insertion(+), 1 deletion(-)
160+
161+--- a/src/xfce-desktop.c
162++++ b/src/xfce-desktop.c
163+@@ -936,7 +936,7 @@ xfce_desktop_class_init(XfceDesktopClass
164+ g_param_spec_uint("icon-size",
165+ "icon size",
166+ "icon size",
167+- 8, 192, 36,
168++ 8, 192, DEFAULT_ICON_SIZE,
169+ XFDESKTOP_PARAM_FLAGS));
170+
171+ g_object_class_install_property(gobject_class, PROP_ICON_FONT_SIZE,
172
173=== added file 'debian/patches/git-missing-images-in-settings-app.patch'
174--- debian/patches/git-missing-images-in-settings-app.patch 1970-01-01 00:00:00 +0000
175+++ debian/patches/git-missing-images-in-settings-app.patch 2014-03-28 19:37:23 +0000
176@@ -0,0 +1,125 @@
177+Origin: upstream
178+Author: Eric Koegel <eric.koegel@gmail.com>
179+Description: Fix for images not appearing in settings app
180+ We need to add images to the list in the main thread and not our
181+ worker thread. Otherwise images won't always display right away,
182+ espeically when the system is under a high load.
183+Bug: https://bugzilla.xfce.org/show_bug.cgi?id=10695
184+Bug-Ubuntu: https://launchpad.net/bugs/1282227
185+Applied-Upstream: commit:565ccdfd80f0b4c6e6c67314224bb5c8128177c2
186+
187+---
188+ settings/main.c | 65 ++++++++++++++++++++++++++++++++++++++++----------------
189+ 1 file changed, 47 insertions(+), 18 deletions(-)
190+
191+--- a/settings/main.c
192++++ b/settings/main.c
193+@@ -87,6 +87,7 @@ typedef struct
194+ {
195+ GtkTreeModel *model;
196+ GtkTreeIter *iter;
197++ GdkPixbuf *pix;
198+ } PreviewData;
199+
200+ typedef struct
201+@@ -169,13 +170,50 @@ static gchar *xfdesktop_settings_generat
202+ const gchar* property);
203+ static gchar *xfdesktop_settings_get_backdrop_image(AppearancePanel *panel);
204+
205++
206++
207++static void
208++xfdesktop_settings_free_pdata(gpointer data)
209++{
210++ PreviewData *pdata = data;
211++
212++ g_object_unref(pdata->model);
213++
214++ gtk_tree_iter_free(pdata->iter);
215++
216++ if(pdata->pix)
217++ g_object_unref(pdata->pix);
218++
219++ g_free(pdata);
220++}
221++
222++static gboolean
223++list_store_set(PreviewData *pdata)
224++{
225++ g_return_val_if_fail(pdata, FALSE);
226++
227++ gtk_list_store_set(GTK_LIST_STORE(pdata->model), pdata->iter,
228++ COL_PIX, pdata->pix,
229++ -1);
230++
231++ xfdesktop_settings_free_pdata(pdata);
232++
233++ return FALSE;
234++}
235++
236+ static void
237+-xfdesktop_settings_do_single_preview(GtkTreeModel *model,
238+- GtkTreeIter *iter)
239++xfdesktop_settings_do_single_preview(PreviewData *pdata)
240+ {
241++ GtkTreeModel *model;
242++ GtkTreeIter *iter;
243+ gchar *filename = NULL, *thumbnail = NULL;
244+ GdkPixbuf *pix;
245+
246++ g_return_if_fail(pdata);
247++
248++ model = pdata->model;
249++ iter = pdata->iter;
250++
251+ gtk_tree_model_get(model, iter,
252+ COL_FILENAME, &filename,
253+ COL_THUMBNAIL, &thumbnail,
254+@@ -197,23 +235,15 @@ xfdesktop_settings_do_single_preview(Gtk
255+ g_free(filename);
256+
257+ if(pix) {
258+- gtk_list_store_set(GTK_LIST_STORE(model), iter,
259+- COL_PIX, pix,
260+- -1);
261++ pdata->pix = pix;
262+
263+- g_object_unref(G_OBJECT(pix));
264++ /* We must add the images to the list in the main thread */
265++ g_main_context_invoke(NULL, (GSourceFunc)list_store_set, pdata);
266++ } else {
267++ xfdesktop_settings_free_pdata(pdata);
268+ }
269+ }
270+
271+-static void
272+-xfdesktop_settings_free_pdata(gpointer data)
273+-{
274+- PreviewData *pdata = data;
275+- g_object_unref(G_OBJECT(pdata->model));
276+- gtk_tree_iter_free(pdata->iter);
277+- g_free(pdata);
278+-}
279+-
280+ static gpointer
281+ xfdesktop_settings_create_previews(gpointer data)
282+ {
283+@@ -225,9 +255,7 @@ xfdesktop_settings_create_previews(gpoin
284+ /* Block and wait for another preview to create */
285+ pdata = g_async_queue_pop(panel->preview_queue);
286+
287+- xfdesktop_settings_do_single_preview(pdata->model, pdata->iter);
288+-
289+- xfdesktop_settings_free_pdata(pdata);
290++ xfdesktop_settings_do_single_preview(pdata);
291+ }
292+
293+ return NULL;
294+@@ -293,6 +321,7 @@ cb_thumbnail_ready(XfdesktopThumbnailer
295+ pdata = g_new0(PreviewData, 1);
296+ pdata->model = g_object_ref(G_OBJECT(model));
297+ pdata->iter = gtk_tree_iter_copy(&iter);
298++ pdata->pix = NULL;
299+
300+ /* Create the preview image */
301+ xfdesktop_settings_add_file_to_queue(panel, pdata);
302
303=== modified file 'debian/patches/series'
304--- debian/patches/series 2014-03-19 16:33:54 +0000
305+++ debian/patches/series 2014-03-28 19:37:23 +0000
306@@ -1,2 +1,5 @@
307 xubuntu_set-accountsservice-user-bg.patch
308 xubuntu_improve-nautilus-interactions.patch
309+git-desktop-icons-have-background.patch
310+git-missing-images-in-settings-app.patch
311+git-fix-default-icon-size.patch
312
313=== modified file 'debian/patches/xubuntu_improve-nautilus-interactions.patch'
314--- debian/patches/xubuntu_improve-nautilus-interactions.patch 2014-03-19 16:33:54 +0000
315+++ debian/patches/xubuntu_improve-nautilus-interactions.patch 2014-03-28 19:37:23 +0000
316@@ -17,7 +17,7 @@
317
318 --- a/src/xfce-desktop.c
319 +++ b/src/xfce-desktop.c
320-@@ -809,8 +809,8 @@ screen_set_selection(XfceDesktop *deskto
321+@@ -811,8 +811,8 @@ screen_set_selection(XfceDesktop *deskto
322 {
323 Window xwin;
324 gint xscreen;
325@@ -28,7 +28,7 @@
326
327 xwin = GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(desktop)));
328 xscreen = gdk_screen_get_number(desktop->priv->gscreen);
329-@@ -819,6 +819,9 @@ screen_set_selection(XfceDesktop *deskto
330+@@ -821,6 +821,9 @@ screen_set_selection(XfceDesktop *deskto
331 selection_atom = XInternAtom(gdk_x11_get_default_xdisplay(), selection_name, False);
332 manager_atom = XInternAtom(gdk_x11_get_default_xdisplay(), "MANAGER", False);
333
334@@ -38,7 +38,7 @@
335 /* the previous check in src/main.c occurs too early, so workaround by
336 * adding this one. */
337 if(XGetSelectionOwner(gdk_x11_get_default_xdisplay(), selection_atom) != None) {
338-@@ -826,8 +829,16 @@ screen_set_selection(XfceDesktop *deskto
339+@@ -828,8 +831,16 @@ screen_set_selection(XfceDesktop *deskto
340 exit(0);
341 }
342
343
344=== modified file 'debian/patches/xubuntu_set-accountsservice-user-bg.patch'
345--- debian/patches/xubuntu_set-accountsservice-user-bg.patch 2014-03-19 16:33:54 +0000
346+++ debian/patches/xubuntu_set-accountsservice-user-bg.patch 2014-03-28 19:37:23 +0000
347@@ -4,8 +4,8 @@
348 Forwarded: not-needed
349
350 ---
351- src/xfce-desktop.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++
352- 1 file changed, 85 insertions(+)
353+ src/xfce-desktop.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++
354+ 1 file changed, 87 insertions(+)
355
356 --- a/src/xfce-desktop.c
357 +++ b/src/xfce-desktop.c
358@@ -17,7 +17,7 @@
359
360 #ifdef ENABLE_DESKTOP_ICONS
361 #include "xfdesktop-icon-view.h"
362-@@ -351,6 +352,86 @@ create_bg_pixmap(GdkScreen *gscreen, gpo
363+@@ -351,6 +352,88 @@ create_bg_pixmap(GdkScreen *gscreen, gpo
364 }
365
366 static void
367@@ -94,6 +94,8 @@
368 + }
369 +
370 +bail:
371++ if(user)
372++ g_object_unref(user);
373 + if(proxy)
374 + g_object_unref(proxy);
375 + if(variant)
376@@ -104,7 +106,7 @@
377 backdrop_changed_cb(XfceBackdrop *backdrop, gpointer user_data)
378 {
379 XfceDesktop *desktop = XFCE_DESKTOP(user_data);
380-@@ -386,6 +467,10 @@ backdrop_changed_cb(XfceBackdrop *backdr
381+@@ -386,6 +469,10 @@ backdrop_changed_cb(XfceBackdrop *backdr
382 }
383 if(monitor == -1)
384 return;
385
386=== modified file 'src/xfce-desktop.c'
387--- src/xfce-desktop.c 2014-03-19 16:33:54 +0000
388+++ src/xfce-desktop.c 2014-03-28 19:37:23 +0000
389@@ -425,6 +425,8 @@
390 }
391
392 bail:
393+ if(user)
394+ g_object_unref(user);
395 if(proxy)
396 g_object_unref(proxy);
397 if(variant)

Subscribers

People subscribed via source and target branches

to all changes: