Merge lp:~noskcaj/ubuntu/trusty/thunar/1280641 into lp:ubuntu/trusty/thunar

Proposed by Jackson Doak
Status: Merged
Merge reported by: Martin Pitt
Merged at revision: not available
Proposed branch: lp:~noskcaj/ubuntu/trusty/thunar/1280641
Merge into: lp:ubuntu/trusty/thunar
Diff against target: 111 lines (+62/-5)
3 files modified
debian/changelog (+7/-0)
debian/patches/gtk3-bookmarks.patch (+38/-5)
thunar/thunar-shortcuts-model.c (+17/-0)
To merge this branch: bzr merge lp:~noskcaj/ubuntu/trusty/thunar/1280641
Reviewer Review Type Date Requested Status
Timo Jyrinki Approve
Ubuntu branches Pending
Review via email: mp+210692@code.launchpad.net

Description of the change

Bugfix for xubuntu 14.04

To post a comment you must log in.
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Tested in XFCE via ppa:timo-jyrinki/ppa, good to upload as is. Thanks!

review: Approve
Revision history for this message
Martin Pitt (pitti) wrote :

Uploaded.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-02-07 16:54:48 +0000
3+++ debian/changelog 2014-03-12 21:04:34 +0000
4@@ -1,3 +1,10 @@
5+thunar (1.6.3-1ubuntu4) trusty; urgency=medium
6+
7+ * Update gtk3-bookmarks.patch. LP: #1280641
8+ Thanks Alistair Buxton
9+
10+ -- Jackson Doak <noskcaj@ubuntu.com> Thu, 13 Mar 2014 07:53:06 +1100
11+
12 thunar (1.6.3-1ubuntu3) trusty; urgency=medium
13
14 * Add git-xfdesktop-4.11.patch. LP: #1277149
15
16=== modified file 'debian/patches/gtk3-bookmarks.patch'
17--- debian/patches/gtk3-bookmarks.patch 2014-02-07 16:54:48 +0000
18+++ debian/patches/gtk3-bookmarks.patch 2014-03-12 21:04:34 +0000
19@@ -1,12 +1,12 @@
20 Author: Alistair Buxton <a.j.buxton@gmail.com>
21-Date: Sun, 12 Jan 2014 17:27:30 +0000
22-Description: [PATCH] Use the new Gtk bookmarks location.
23+Description: Use the new Gtk bookmarks location.
24 Bug: https://bugzilla.xfce.org/show_bug.cgi?id=10627
25
26 ---
27- thunar/thunar-gio-extensions.c | 2 +-
28- thunar/thunar-util.c | 10 +++++++++-
29- 2 files changed, 10 insertions(+), 2 deletions(-)
30+ thunar/thunar-gio-extensions.c | 2 +-
31+ thunar/thunar-shortcuts-model.c | 17 +++++++++++++++++
32+ thunar/thunar-util.c | 10 +++++++++-
33+ 3 files changed, 27 insertions(+), 2 deletions(-)
34
35 --- a/thunar/thunar-gio-extensions.c
36 +++ b/thunar/thunar-gio-extensions.c
37@@ -19,6 +19,39 @@
38 bookmarks = g_file_new_for_path (filename);
39 g_free (filename);
40
41+--- a/thunar/thunar-shortcuts-model.c
42++++ b/thunar/thunar-shortcuts-model.c
43+@@ -1364,6 +1364,7 @@ thunar_shortcuts_model_save (ThunarShort
44+ gchar *uri;
45+ GList *lp;
46+ GError *err = NULL;
47++ GFile *parent = NULL;
48+
49+ _thunar_return_if_fail (THUNAR_IS_SHORTCUTS_MODEL (model));
50+
51+@@ -1389,6 +1390,22 @@ thunar_shortcuts_model_save (ThunarShort
52+ }
53+ }
54+
55++ /* create folder if it does not exist */
56++ parent = g_file_get_parent (model->bookmarks_file);
57++ if (!g_file_make_directory_with_parents (parent, NULL, &err))
58++ {
59++ if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_EXISTS))
60++ {
61++ g_clear_error (&err);
62++ }
63++ else
64++ {
65++ g_warning ("Failed to create bookmarks folder: %s", err->message);
66++ g_error_free (err);
67++ }
68++ }
69++ g_clear_object (&parent);
70++
71+ /* write data to the disk */
72+ bookmarks_path = g_file_get_path (model->bookmarks_file);
73+ if (!g_file_set_contents (bookmarks_path, contents->str, contents->len, &err))
74 --- a/thunar/thunar-util.c
75 +++ b/thunar/thunar-util.c
76 @@ -84,6 +84,15 @@ thunar_util_load_bookmarks (GFile
77
78=== modified file 'thunar/thunar-shortcuts-model.c'
79--- thunar/thunar-shortcuts-model.c 2013-08-15 21:37:17 +0000
80+++ thunar/thunar-shortcuts-model.c 2014-03-12 21:04:34 +0000
81@@ -1364,6 +1364,7 @@
82 gchar *uri;
83 GList *lp;
84 GError *err = NULL;
85+ GFile *parent = NULL;
86
87 _thunar_return_if_fail (THUNAR_IS_SHORTCUTS_MODEL (model));
88
89@@ -1389,6 +1390,22 @@
90 }
91 }
92
93+ /* create folder if it does not exist */
94+ parent = g_file_get_parent (model->bookmarks_file);
95+ if (!g_file_make_directory_with_parents (parent, NULL, &err))
96+ {
97+ if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_EXISTS))
98+ {
99+ g_clear_error (&err);
100+ }
101+ else
102+ {
103+ g_warning ("Failed to create bookmarks folder: %s", err->message);
104+ g_error_free (err);
105+ }
106+ }
107+ g_clear_object (&parent);
108+
109 /* write data to the disk */
110 bookmarks_path = g_file_get_path (model->bookmarks_file);
111 if (!g_file_set_contents (bookmarks_path, contents->str, contents->len, &err))

Subscribers

People subscribed via source and target branches

to all changes: