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

Proposed by Jackson Doak
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 Approve
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

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

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Ack for accounts service memory leak fix.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.pc/xubuntu_improve-nautilus-interactions.patch/.timestamp'
=== modified file '.pc/xubuntu_improve-nautilus-interactions.patch/src/xfce-desktop.c'
--- .pc/xubuntu_improve-nautilus-interactions.patch/src/xfce-desktop.c 2014-03-19 16:33:54 +0000
+++ .pc/xubuntu_improve-nautilus-interactions.patch/src/xfce-desktop.c 2014-03-28 19:37:23 +0000
@@ -425,6 +425,8 @@
425 }425 }
426426
427bail:427bail:
428 if(user)
429 g_object_unref(user);
428 if(proxy)430 if(proxy)
429 g_object_unref(proxy);431 g_object_unref(proxy);
430 if(variant)432 if(variant)
431433
=== modified file 'debian/changelog'
--- debian/changelog 2014-03-19 16:33:54 +0000
+++ debian/changelog 2014-03-28 19:37:23 +0000
@@ -1,3 +1,17 @@
1xfdesktop4 (4.11.4-1ubuntu2) trusty; urgency=medium
2
3 * Add patches from upstream git:
4 - git-desktop-icons-have-background.patch. LP: #1270261
5 Makes desktop icons not have their own background
6 - git-missing-images-in-settings-app.patch. LP: #1282227
7 Fixes some images not appearing in xfdesktop settings
8 - git-fix-default-icon-size.patch. LP: #1272057
9 Explicitly define the desktop icon size
10 * Refresh xubuntu_set-accountsservice-user-bg.patch to fix
11 a memory leak. LP: #1295614
12
13 -- Jackson Doak <noskcaj@ubuntu.com> Fri, 28 Mar 2014 07:16:04 +1100
14
1xfdesktop4 (4.11.4-1ubuntu1) trusty; urgency=medium15xfdesktop4 (4.11.4-1ubuntu1) trusty; urgency=medium
216
3 * Merge from debian. Remaining changes:17 * Merge from debian. Remaining changes:
418
=== added file 'debian/patches/git-desktop-icons-have-background.patch'
--- debian/patches/git-desktop-icons-have-background.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/git-desktop-icons-have-background.patch 2014-03-28 19:37:23 +0000
@@ -0,0 +1,104 @@
1Origin: upstream
2Author: Eric Koegel <eric.koegel@gmail.com>
3Description: Reset the icon_view style on style change
4 Since xfdesktop now properly responds to xfsettingsd changes we
5 need to handle the race condition at launch. This patch changes
6 it so that the style change for the icon view happens in a low
7 priority callback. This ensures that the style gets reset only
8 once if there's a batch of changes to process and will happen
9 after xfdesktop has loaded. This is different from the previous
10 callback patch in that the entire icon view doesn't get recreated.
11Bug: https://bugzilla.xfce.org/show_bug.cgi?id=10605
12Bug-Ubuntu: https://launchpad.net/bugs/1270261
13Applied-Upstream: commit:cdbba947379540fa2c89fda34b96bf336070fe47
14
15---
16 src/xfce-desktop.c | 38 ++++++++++++++++++++++++++++++++------
17 1 file changed, 32 insertions(+), 6 deletions(-)
18
19--- a/src/xfce-desktop.c
20+++ b/src/xfce-desktop.c
21@@ -115,6 +115,7 @@ struct _XfceDesktopPriv
22 gboolean icons_font_size_set;
23 guint icons_font_size;
24 guint icons_size;
25+ gint style_refresh_timer;
26 GtkWidget *icon_view;
27 gdouble system_font_size;
28 #endif
29@@ -994,6 +995,9 @@ xfce_desktop_finalize(GObject *object)
30 g_object_unref(G_OBJECT(desktop->priv->channel));
31 g_free(desktop->priv->property_prefix);
32
33+ if(desktop->priv->style_refresh_timer != 0)
34+ g_source_remove(desktop->priv->style_refresh_timer);
35+
36 G_OBJECT_CLASS(xfce_desktop_parent_class)->finalize(object);
37 }
38
39@@ -1351,8 +1355,8 @@ xfce_desktop_delete_event(GtkWidget *w,
40 return TRUE;
41 }
42
43-static void
44-xfce_desktop_style_set(GtkWidget *w, GtkStyle *old_style)
45+static gboolean
46+style_refresh_cb(gpointer *w)
47 {
48 XfceDesktop *desktop = XFCE_DESKTOP(w);
49 #ifdef ENABLE_DESKTOP_ICONS
50@@ -1361,13 +1365,15 @@ xfce_desktop_style_set(GtkWidget *w, Gtk
51
52 TRACE("entering");
53
54- g_return_if_fail(XFCE_IS_DESKTOP(desktop));
55+ desktop->priv->style_refresh_timer = 0;
56+
57+ g_return_val_if_fail(XFCE_IS_DESKTOP(desktop), FALSE);
58
59 if(!gtk_widget_get_realized(GTK_WIDGET(desktop)))
60- return;
61+ return FALSE;
62
63 if(desktop->priv->workspaces == NULL)
64- return;
65+ return FALSE;
66
67 if(GDK_IS_WINDOW(desktop->priv->bg_pixmap))
68 gdk_window_set_back_pixmap(gtk_widget_get_window(GTK_WIDGET(desktop)), desktop->priv->bg_pixmap, FALSE);
69@@ -1376,7 +1382,7 @@ xfce_desktop_style_set(GtkWidget *w, Gtk
70
71 #ifdef ENABLE_DESKTOP_ICONS
72 if(!desktop->priv->icon_view || !XFDESKTOP_IS_ICON_VIEW(desktop->priv->icon_view))
73- return;
74+ return FALSE;
75
76 /* reset the icon view style */
77 gtk_widget_set_style(desktop->priv->icon_view, NULL);
78@@ -1390,6 +1396,26 @@ xfce_desktop_style_set(GtkWidget *w, Gtk
79 desktop->priv->system_font_size);
80 }
81 #endif
82+
83+ return FALSE;
84+}
85+
86+static void
87+xfce_desktop_style_set(GtkWidget *w, GtkStyle *old_style)
88+{
89+ XfceDesktop *desktop = XFCE_DESKTOP(w);
90+
91+ TRACE("entering");
92+
93+ if(desktop->priv->style_refresh_timer != 0)
94+ g_source_remove(desktop->priv->style_refresh_timer);
95+
96+ desktop->priv->style_refresh_timer = g_idle_add_full(G_PRIORITY_LOW,
97+ (GSourceFunc)style_refresh_cb,
98+ w,
99+ NULL);
100+
101+ GTK_WIDGET_CLASS(xfce_desktop_parent_class)->style_set(w, old_style);
102 }
103
104 static void
0105
=== added file 'debian/patches/git-fix-default-icon-size.patch'
--- debian/patches/git-fix-default-icon-size.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/git-fix-default-icon-size.patch 2014-03-28 19:37:23 +0000
@@ -0,0 +1,22 @@
1Origin: upstream
2Author: Eric Koegel <eric.koegel@gmail.com>
3Description: Explicitly define the desktop icon size
4Bug: https://bugzilla.xfce.org/show_bug.cgi?id=9199
5Bug-Ubuntu: https://launchpad.net/bugs/1272057
6Applied-Upstream: commit:5203d9aa93e40dbddc81895fa60c8d1c99dd95f3
7
8---
9 src/xfce-desktop.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12--- a/src/xfce-desktop.c
13+++ b/src/xfce-desktop.c
14@@ -936,7 +936,7 @@ xfce_desktop_class_init(XfceDesktopClass
15 g_param_spec_uint("icon-size",
16 "icon size",
17 "icon size",
18- 8, 192, 36,
19+ 8, 192, DEFAULT_ICON_SIZE,
20 XFDESKTOP_PARAM_FLAGS));
21
22 g_object_class_install_property(gobject_class, PROP_ICON_FONT_SIZE,
023
=== added file 'debian/patches/git-missing-images-in-settings-app.patch'
--- debian/patches/git-missing-images-in-settings-app.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/git-missing-images-in-settings-app.patch 2014-03-28 19:37:23 +0000
@@ -0,0 +1,125 @@
1Origin: upstream
2Author: Eric Koegel <eric.koegel@gmail.com>
3Description: Fix for images not appearing in settings app
4 We need to add images to the list in the main thread and not our
5 worker thread. Otherwise images won't always display right away,
6 espeically when the system is under a high load.
7Bug: https://bugzilla.xfce.org/show_bug.cgi?id=10695
8Bug-Ubuntu: https://launchpad.net/bugs/1282227
9Applied-Upstream: commit:565ccdfd80f0b4c6e6c67314224bb5c8128177c2
10
11---
12 settings/main.c | 65 ++++++++++++++++++++++++++++++++++++++++----------------
13 1 file changed, 47 insertions(+), 18 deletions(-)
14
15--- a/settings/main.c
16+++ b/settings/main.c
17@@ -87,6 +87,7 @@ typedef struct
18 {
19 GtkTreeModel *model;
20 GtkTreeIter *iter;
21+ GdkPixbuf *pix;
22 } PreviewData;
23
24 typedef struct
25@@ -169,13 +170,50 @@ static gchar *xfdesktop_settings_generat
26 const gchar* property);
27 static gchar *xfdesktop_settings_get_backdrop_image(AppearancePanel *panel);
28
29+
30+
31+static void
32+xfdesktop_settings_free_pdata(gpointer data)
33+{
34+ PreviewData *pdata = data;
35+
36+ g_object_unref(pdata->model);
37+
38+ gtk_tree_iter_free(pdata->iter);
39+
40+ if(pdata->pix)
41+ g_object_unref(pdata->pix);
42+
43+ g_free(pdata);
44+}
45+
46+static gboolean
47+list_store_set(PreviewData *pdata)
48+{
49+ g_return_val_if_fail(pdata, FALSE);
50+
51+ gtk_list_store_set(GTK_LIST_STORE(pdata->model), pdata->iter,
52+ COL_PIX, pdata->pix,
53+ -1);
54+
55+ xfdesktop_settings_free_pdata(pdata);
56+
57+ return FALSE;
58+}
59+
60 static void
61-xfdesktop_settings_do_single_preview(GtkTreeModel *model,
62- GtkTreeIter *iter)
63+xfdesktop_settings_do_single_preview(PreviewData *pdata)
64 {
65+ GtkTreeModel *model;
66+ GtkTreeIter *iter;
67 gchar *filename = NULL, *thumbnail = NULL;
68 GdkPixbuf *pix;
69
70+ g_return_if_fail(pdata);
71+
72+ model = pdata->model;
73+ iter = pdata->iter;
74+
75 gtk_tree_model_get(model, iter,
76 COL_FILENAME, &filename,
77 COL_THUMBNAIL, &thumbnail,
78@@ -197,23 +235,15 @@ xfdesktop_settings_do_single_preview(Gtk
79 g_free(filename);
80
81 if(pix) {
82- gtk_list_store_set(GTK_LIST_STORE(model), iter,
83- COL_PIX, pix,
84- -1);
85+ pdata->pix = pix;
86
87- g_object_unref(G_OBJECT(pix));
88+ /* We must add the images to the list in the main thread */
89+ g_main_context_invoke(NULL, (GSourceFunc)list_store_set, pdata);
90+ } else {
91+ xfdesktop_settings_free_pdata(pdata);
92 }
93 }
94
95-static void
96-xfdesktop_settings_free_pdata(gpointer data)
97-{
98- PreviewData *pdata = data;
99- g_object_unref(G_OBJECT(pdata->model));
100- gtk_tree_iter_free(pdata->iter);
101- g_free(pdata);
102-}
103-
104 static gpointer
105 xfdesktop_settings_create_previews(gpointer data)
106 {
107@@ -225,9 +255,7 @@ xfdesktop_settings_create_previews(gpoin
108 /* Block and wait for another preview to create */
109 pdata = g_async_queue_pop(panel->preview_queue);
110
111- xfdesktop_settings_do_single_preview(pdata->model, pdata->iter);
112-
113- xfdesktop_settings_free_pdata(pdata);
114+ xfdesktop_settings_do_single_preview(pdata);
115 }
116
117 return NULL;
118@@ -293,6 +321,7 @@ cb_thumbnail_ready(XfdesktopThumbnailer
119 pdata = g_new0(PreviewData, 1);
120 pdata->model = g_object_ref(G_OBJECT(model));
121 pdata->iter = gtk_tree_iter_copy(&iter);
122+ pdata->pix = NULL;
123
124 /* Create the preview image */
125 xfdesktop_settings_add_file_to_queue(panel, pdata);
0126
=== modified file 'debian/patches/series'
--- debian/patches/series 2014-03-19 16:33:54 +0000
+++ debian/patches/series 2014-03-28 19:37:23 +0000
@@ -1,2 +1,5 @@
1xubuntu_set-accountsservice-user-bg.patch1xubuntu_set-accountsservice-user-bg.patch
2xubuntu_improve-nautilus-interactions.patch2xubuntu_improve-nautilus-interactions.patch
3git-desktop-icons-have-background.patch
4git-missing-images-in-settings-app.patch
5git-fix-default-icon-size.patch
36
=== modified file 'debian/patches/xubuntu_improve-nautilus-interactions.patch'
--- debian/patches/xubuntu_improve-nautilus-interactions.patch 2014-03-19 16:33:54 +0000
+++ debian/patches/xubuntu_improve-nautilus-interactions.patch 2014-03-28 19:37:23 +0000
@@ -17,7 +17,7 @@
1717
18--- a/src/xfce-desktop.c18--- a/src/xfce-desktop.c
19+++ b/src/xfce-desktop.c19+++ b/src/xfce-desktop.c
20@@ -809,8 +809,8 @@ screen_set_selection(XfceDesktop *deskto20@@ -811,8 +811,8 @@ screen_set_selection(XfceDesktop *deskto
21 {21 {
22 Window xwin;22 Window xwin;
23 gint xscreen;23 gint xscreen;
@@ -28,7 +28,7 @@
28 28
29 xwin = GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(desktop)));29 xwin = GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(desktop)));
30 xscreen = gdk_screen_get_number(desktop->priv->gscreen);30 xscreen = gdk_screen_get_number(desktop->priv->gscreen);
31@@ -819,6 +819,9 @@ screen_set_selection(XfceDesktop *deskto31@@ -821,6 +821,9 @@ screen_set_selection(XfceDesktop *deskto
32 selection_atom = XInternAtom(gdk_x11_get_default_xdisplay(), selection_name, False);32 selection_atom = XInternAtom(gdk_x11_get_default_xdisplay(), selection_name, False);
33 manager_atom = XInternAtom(gdk_x11_get_default_xdisplay(), "MANAGER", False);33 manager_atom = XInternAtom(gdk_x11_get_default_xdisplay(), "MANAGER", False);
34 34
@@ -38,7 +38,7 @@
38 /* the previous check in src/main.c occurs too early, so workaround by38 /* the previous check in src/main.c occurs too early, so workaround by
39 * adding this one. */39 * adding this one. */
40 if(XGetSelectionOwner(gdk_x11_get_default_xdisplay(), selection_atom) != None) {40 if(XGetSelectionOwner(gdk_x11_get_default_xdisplay(), selection_atom) != None) {
41@@ -826,8 +829,16 @@ screen_set_selection(XfceDesktop *deskto41@@ -828,8 +831,16 @@ screen_set_selection(XfceDesktop *deskto
42 exit(0);42 exit(0);
43 }43 }
44 44
4545
=== modified file 'debian/patches/xubuntu_set-accountsservice-user-bg.patch'
--- debian/patches/xubuntu_set-accountsservice-user-bg.patch 2014-03-19 16:33:54 +0000
+++ debian/patches/xubuntu_set-accountsservice-user-bg.patch 2014-03-28 19:37:23 +0000
@@ -4,8 +4,8 @@
4Forwarded: not-needed4Forwarded: not-needed
55
6---6---
7 src/xfce-desktop.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++7 src/xfce-desktop.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++
8 1 file changed, 85 insertions(+)8 1 file changed, 87 insertions(+)
99
10--- a/src/xfce-desktop.c10--- a/src/xfce-desktop.c
11+++ b/src/xfce-desktop.c11+++ b/src/xfce-desktop.c
@@ -17,7 +17,7 @@
17 17
18 #ifdef ENABLE_DESKTOP_ICONS18 #ifdef ENABLE_DESKTOP_ICONS
19 #include "xfdesktop-icon-view.h"19 #include "xfdesktop-icon-view.h"
20@@ -351,6 +352,86 @@ create_bg_pixmap(GdkScreen *gscreen, gpo20@@ -351,6 +352,88 @@ create_bg_pixmap(GdkScreen *gscreen, gpo
21 }21 }
22 22
23 static void23 static void
@@ -94,6 +94,8 @@
94+ }94+ }
95+95+
96+bail:96+bail:
97+ if(user)
98+ g_object_unref(user);
97+ if(proxy)99+ if(proxy)
98+ g_object_unref(proxy);100+ g_object_unref(proxy);
99+ if(variant)101+ if(variant)
@@ -104,7 +106,7 @@
104 backdrop_changed_cb(XfceBackdrop *backdrop, gpointer user_data)106 backdrop_changed_cb(XfceBackdrop *backdrop, gpointer user_data)
105 {107 {
106 XfceDesktop *desktop = XFCE_DESKTOP(user_data);108 XfceDesktop *desktop = XFCE_DESKTOP(user_data);
107@@ -386,6 +467,10 @@ backdrop_changed_cb(XfceBackdrop *backdr109@@ -386,6 +469,10 @@ backdrop_changed_cb(XfceBackdrop *backdr
108 }110 }
109 if(monitor == -1)111 if(monitor == -1)
110 return;112 return;
111113
=== modified file 'src/xfce-desktop.c'
--- src/xfce-desktop.c 2014-03-19 16:33:54 +0000
+++ src/xfce-desktop.c 2014-03-28 19:37:23 +0000
@@ -425,6 +425,8 @@
425 }425 }
426426
427bail:427bail:
428 if(user)
429 g_object_unref(user);
428 if(proxy)430 if(proxy)
429 g_object_unref(proxy);431 g_object_unref(proxy);
430 if(variant)432 if(variant)

Subscribers

People subscribed via source and target branches

to all changes: