Merge lp:~noskcaj/ubuntu/trusty/thunar/bugfixes 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/bugfixes
Merge into: lp:ubuntu/trusty/thunar
Diff against target: 328 lines (+298/-0)
5 files modified
debian/changelog (+12/-0)
debian/patches/git-force-toolbr-icons.patch (+18/-0)
debian/patches/git-save-keyboard-shortcuts.patch (+138/-0)
debian/patches/menu-icon-tweaks.patch (+127/-0)
debian/patches/series (+3/-0)
To merge this branch: bzr merge lp:~noskcaj/ubuntu/trusty/thunar/bugfixes
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+214351@code.launchpad.net

Description of the change

Add some bugfixes for xubuntu 14.04

To post a comment you must log in.
103. By Jackson Doak

Update the patch again

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

Uploaded, thanks!

review: Approve

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-03-13 07:53:06 +0000
3+++ debian/changelog 2014-04-06 02:41:27 +0000
4@@ -1,3 +1,15 @@
5+thunar (1.6.3-1ubuntu5) trusty; urgency=medium
6+
7+ * Add git-save-keyboard-shortcuts.patch. LP: #1186846
8+ - Keyboard shortcuts save when changed rather than when thunar is closed
9+ * Add menu-icon-tweaks.patch. LP: #1271861
10+ - Don't use generic folder icons for open with default application
11+ - Add icons for open in new tab, new window
12+ * Add git-force-toolbr-icons.patch
13+ - Fix for "Home" and "Open Parent" icons going missing from toolbar
14+
15+ -- Jackson Doak <noskcaj@ubuntu.com> Sat, 05 Apr 2014 08:22:40 +1100
16+
17 thunar (1.6.3-1ubuntu4) trusty; urgency=medium
18
19 * Update gtk3-bookmarks.patch. LP: #1280641
20
21=== added file 'debian/patches/git-force-toolbr-icons.patch'
22--- debian/patches/git-force-toolbr-icons.patch 1970-01-01 00:00:00 +0000
23+++ debian/patches/git-force-toolbr-icons.patch 2014-04-06 02:41:27 +0000
24@@ -0,0 +1,18 @@
25+Origin: http://git.xfce.org/xfce/thunar/commit/?id=c9712b835be90127ef4af1ac1b1fd645081a646a
26+Description: Fix "Home" and "Open Parent" icons going missing from toolbar
27+Bug: https://bugzilla.xfce.org/show_bug.cgi?id=10179
28+
29+---
30+ thunar/thunar-window.c | 1 +
31+ 1 file changed, 1 insertion(+)
32+
33+--- a/thunar/thunar-window.c
34++++ b/thunar/thunar-window.c
35+@@ -1821,6 +1821,7 @@ thunar_window_install_location_bar (Thun
36+ /* setup the toolbar for the location bar */
37+ window->location_toolbar = gtk_ui_manager_get_widget (window->ui_manager, "/location-toolbar");
38+ g_object_get (G_OBJECT (window->preferences), "misc-small-toolbar-icons", &small_icons, NULL);
39++ gtk_toolbar_set_style (GTK_TOOLBAR (window->location_toolbar), GTK_TOOLBAR_ICONS);
40+ gtk_toolbar_set_icon_size (GTK_TOOLBAR (window->location_toolbar),
41+ small_icons ? GTK_ICON_SIZE_SMALL_TOOLBAR : GTK_ICON_SIZE_LARGE_TOOLBAR);
42+ gtk_table_attach (GTK_TABLE (window->table), window->location_toolbar, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
43
44=== added file 'debian/patches/git-save-keyboard-shortcuts.patch'
45--- debian/patches/git-save-keyboard-shortcuts.patch 1970-01-01 00:00:00 +0000
46+++ debian/patches/git-save-keyboard-shortcuts.patch 2014-04-06 02:41:27 +0000
47@@ -0,0 +1,138 @@
48+Origin: http://git.xfce.org/xfce/thunar/commit/?id=821c9b480b7feb625461b5ec1f35e92dcc87e3d9
49+Bug-Ubuntu: https://launchpad.net/bugs/1186846
50+Bug: https://bugzilla.xfce.org/show_bug.cgi?id=10139
51+Description: Makes keyboard shortcuts save when changed rather than when thunar is closed
52+
53+---
54+ thunar/thunar-application.c | 69 +++++++++++++++++++++++++++++++++++++++-----
55+ 1 file changed, 62 insertions(+), 7 deletions(-)
56+
57+--- a/thunar/thunar-application.c
58++++ b/thunar/thunar-application.c
59+@@ -59,6 +59,8 @@
60+ #include <thunar/thunar-util.h>
61+ #include <thunar/thunar-view.h>
62+
63++#define ACCEL_MAP_PATH "Thunar/accels.scm"
64++
65+
66+
67+ /* Prototype for the Thunar job launchers */
68+@@ -85,6 +87,8 @@ static void thunar_application
69+ guint prop_id,
70+ const GValue *value,
71+ GParamSpec *pspec);
72++static void thunar_application_accel_map_changed (ThunarApplication *application);
73++static gboolean thunar_application_accel_map_save (gpointer user_data);
74+ static void thunar_application_collect_and_launch (ThunarApplication *application,
75+ gpointer parent,
76+ const gchar *icon_name,
77+@@ -142,6 +146,9 @@ struct _ThunarApplication
78+
79+ gboolean daemon;
80+
81++ guint accel_map_save_id;
82++ GtkAccelMap *accel_map;
83++
84+ guint show_dialogs_timer_id;
85+
86+ #ifdef HAVE_GUDEV
87+@@ -220,7 +227,7 @@ thunar_application_init (ThunarApplicati
88+ application->progress_dialog = NULL;
89+
90+ /* check if we have a saved accel map */
91+- path = xfce_resource_lookup (XFCE_RESOURCE_CONFIG, "Thunar/accels.scm");
92++ path = xfce_resource_lookup (XFCE_RESOURCE_CONFIG, ACCEL_MAP_PATH);
93+ if (G_LIKELY (path != NULL))
94+ {
95+ /* load the accel map */
96+@@ -228,6 +235,11 @@ thunar_application_init (ThunarApplicati
97+ g_free (path);
98+ }
99+
100++ /* watch for changes */
101++ application->accel_map = gtk_accel_map_get ();
102++ g_signal_connect_swapped (G_OBJECT (application->accel_map), "changed",
103++ G_CALLBACK (thunar_application_accel_map_changed), application);
104++
105+ #ifdef HAVE_GUDEV
106+ /* establish connection with udev */
107+ application->udev_client = g_udev_client_new (subsystems);
108+@@ -245,21 +257,21 @@ static void
109+ thunar_application_finalize (GObject *object)
110+ {
111+ ThunarApplication *application = THUNAR_APPLICATION (object);
112+- gchar *path;
113+ GList *lp;
114+
115+ /* unqueue all files waiting to be processed */
116+ thunar_g_file_list_free (application->files_to_launch);
117+
118+ /* save the current accel map */
119+- path = xfce_resource_save_location (XFCE_RESOURCE_CONFIG, "Thunar/accels.scm", TRUE);
120+- if (G_LIKELY (path != NULL))
121++ if (G_UNLIKELY (application->accel_map_save_id != 0))
122+ {
123+- /* save the accel map */
124+- gtk_accel_map_save (path);
125+- g_free (path);
126++ g_source_remove (application->accel_map_save_id);
127++ thunar_application_accel_map_save (application);
128+ }
129+
130++ if (application->accel_map != NULL)
131++ g_object_unref (G_OBJECT (application->accel_map));
132++
133+ #ifdef HAVE_GUDEV
134+ /* cancel any pending volman watch source */
135+ if (G_UNLIKELY (application->volman_watch_id != 0))
136+@@ -347,6 +359,49 @@ thunar_application_set_property (GObject
137+ }
138+
139+
140++
141++static gboolean
142++thunar_application_accel_map_save (gpointer user_data)
143++{
144++ ThunarApplication *application = THUNAR_APPLICATION (user_data);
145++ gchar *path;
146++
147++ _thunar_return_val_if_fail (THUNAR_IS_APPLICATION (application), FALSE);
148++
149++ application->accel_map_save_id = 0;
150++
151++ /* save the current accel map */
152++ path = xfce_resource_save_location (XFCE_RESOURCE_CONFIG, ACCEL_MAP_PATH, TRUE);
153++ if (G_LIKELY (path != NULL))
154++ {
155++ /* save the accel map */
156++ gtk_accel_map_save (path);
157++ g_free (path);
158++ }
159++
160++ return FALSE;
161++}
162++
163++
164++
165++static void
166++thunar_application_accel_map_changed (ThunarApplication *application)
167++{
168++ _thunar_return_if_fail (THUNAR_IS_APPLICATION (application));
169++
170++ /* stop pending save */
171++ if (application->accel_map_save_id != 0)
172++ {
173++ g_source_remove (application->accel_map_save_id);
174++ application->accel_map_save_id = 0;
175++ }
176++
177++ /* schedule new save */
178++ application->accel_map_save_id =
179++ g_timeout_add_seconds (10, thunar_application_accel_map_save, application);
180++}
181++
182++
183+
184+ static void
185+ thunar_application_collect_and_launch (ThunarApplication *application,
186
187=== added file 'debian/patches/menu-icon-tweaks.patch'
188--- debian/patches/menu-icon-tweaks.patch 1970-01-01 00:00:00 +0000
189+++ debian/patches/menu-icon-tweaks.patch 2014-04-06 02:41:27 +0000
190@@ -0,0 +1,127 @@
191+Author: Thaddaeus Tintenfisch <thad.fisch@gmail.com>
192+Bug: https://bugzilla.xfce.org/show_bug.cgi?id=10652
193+Bug-Ubuntu: https://launchpad.net/bugs/1271861
194+Description: Add or change various menu icons:
195+ - Open With DEFAULT Application
196+ - New Tab/Window
197+ - Create Folder/Document
198+ - Empty File
199+
200+---
201+ thunar/thunar-launcher.c | 8 +++++++-
202+ thunar/thunar-location-buttons.c | 2 +-
203+ thunar/thunar-standard-view.c | 2 +-
204+ thunar/thunar-templates-action.c | 3 ++-
205+ thunar/thunar-tree-view.c | 7 +++++++
206+ thunar/thunar-window.c | 4 ++--
207+ 6 files changed, 20 insertions(+), 6 deletions(-)
208+
209+--- a/thunar/thunar-launcher.c
210++++ b/thunar/thunar-launcher.c
211+@@ -815,8 +815,9 @@ thunar_launcher_update_idle (gpointer da
212+ ** - "Open", "Open in n New Windows" and "Open in n New Tabs" actions
213+ **/
214+
215+- /* Prepare "Open" label */
216++ /* Prepare "Open" label and icon */
217+ gtk_action_set_label (launcher->action_open, _("_Open"));
218++ gtk_action_set_stock_id (launcher->action_open, GTK_STOCK_OPEN);
219+
220+ if (n_selected_files == n_directories && n_directories >= 1)
221+ {
222+@@ -928,6 +929,7 @@ thunar_launcher_update_idle (gpointer da
223+ /* turn the "Open" action into "Execute" */
224+ g_object_set (G_OBJECT (launcher->action_open),
225+ "label", _("_Execute"),
226++ "stock-id", GTK_STOCK_EXECUTE,
227+ "tooltip", ngettext ("Execute the selected file", "Execute the selected files", n_selected_files),
228+ NULL);
229+ }
230+@@ -945,6 +947,10 @@ thunar_launcher_update_idle (gpointer da
231+ g_free (tooltip);
232+ g_free (label);
233+
234++ /* load default application icon */
235++ gtk_action_set_stock_id (launcher->action_open, NULL);
236++ gtk_action_set_gicon (launcher->action_open, g_app_info_get_icon (applications->data));
237++
238+ /* remember the default application for the "Open" action */
239+ g_object_set_qdata_full (G_OBJECT (launcher->action_open), thunar_launcher_handler_quark, applications->data, g_object_unref);
240+
241+--- a/thunar/thunar-location-buttons.c
242++++ b/thunar/thunar-location-buttons.c
243+@@ -175,7 +175,7 @@ static const GtkActionEntry action_entri
244+ { "location-buttons-open", GTK_STOCK_OPEN, N_("_Open"), "", NULL, G_CALLBACK (thunar_location_buttons_action_open), },
245+ { "location-buttons-open-in-new-tab", NULL, N_("Open in New Tab"), "", NULL, G_CALLBACK (thunar_location_buttons_action_open_in_new_tab), },
246+ { "location-buttons-open-in-new-window", NULL, N_("Open in New Window"), "", NULL, G_CALLBACK (thunar_location_buttons_action_open_in_new_window), },
247+- { "location-buttons-create-folder", NULL, N_("Create _Folder..."), "", NULL, G_CALLBACK (thunar_location_buttons_action_create_folder), },
248++ { "location-buttons-create-folder", "folder-new", N_("Create _Folder..."), "", NULL, G_CALLBACK (thunar_location_buttons_action_create_folder), },
249+ { "location-buttons-empty-trash", NULL, N_("_Empty Trash"), "", N_("Delete all files and folders in the Trash"), G_CALLBACK (thunar_location_buttons_action_empty_trash), },
250+ { "location-buttons-paste-into-folder", GTK_STOCK_PASTE, N_("Paste Into Folder"), "", NULL, G_CALLBACK (thunar_location_buttons_action_paste_into_folder), },
251+ { "location-buttons-properties", GTK_STOCK_PROPERTIES, N_("_Properties..."), "", NULL, G_CALLBACK (thunar_location_buttons_action_properties), },
252+--- a/thunar/thunar-standard-view.c
253++++ b/thunar/thunar-standard-view.c
254+@@ -393,7 +393,7 @@ static const GtkActionEntry action_entri
255+ {
256+ { "file-context-menu", NULL, N_ ("File Context Menu"), NULL, NULL, NULL, },
257+ { "folder-context-menu", NULL, N_ ("Folder Context Menu"), NULL, NULL, NULL, },
258+- { "create-folder", NULL, N_ ("Create _Folder..."), "<control><shift>N", N_ ("Create an empty folder within the current folder"), G_CALLBACK (thunar_standard_view_action_create_folder), },
259++ { "create-folder", "folder-new", N_ ("Create _Folder..."), "<control><shift>N", N_ ("Create an empty folder within the current folder"), G_CALLBACK (thunar_standard_view_action_create_folder), },
260+ { "properties", GTK_STOCK_PROPERTIES, N_ ("_Properties..."), "<alt>Return", N_ ("View the properties of the selected file"), G_CALLBACK (thunar_standard_view_action_properties), },
261+ { "cut", GTK_STOCK_CUT, N_ ("Cu_t"), NULL, NULL, G_CALLBACK (thunar_standard_view_action_cut), },
262+ { "copy", GTK_STOCK_COPY, N_ ("_Copy"), NULL, NULL, G_CALLBACK (thunar_standard_view_action_copy), },
263+--- a/thunar/thunar-templates-action.c
264++++ b/thunar/thunar-templates-action.c
265+@@ -477,7 +477,7 @@ thunar_templates_action_load_finished (T
266+ gtk_widget_show (item);
267+
268+ /* add the icon for the emtpy file item */
269+- image = gtk_image_new_from_stock (GTK_STOCK_NEW, GTK_ICON_SIZE_MENU);
270++ image = gtk_image_new_from_stock (GTK_STOCK_FILE, GTK_ICON_SIZE_MENU);
271+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
272+ }
273+
274+@@ -542,6 +542,7 @@ thunar_templates_action_new (const gchar
275+ "hide-if-empty", FALSE,
276+ "label", label,
277+ "name", name,
278++ "icon-name", "document-new",
279+ NULL);
280+ }
281+
282+--- a/thunar/thunar-tree-view.c
283++++ b/thunar/thunar-tree-view.c
284+@@ -1093,6 +1093,7 @@ thunar_tree_view_context_menu (ThunarTre
285+ GtkWidget *menu;
286+ GtkWidget *item;
287+ GtkWidget *window;
288++ GIcon *icon;
289+ GList *providers, *lp;
290+ GList *actions = NULL, *tmp;
291+
292+@@ -1201,6 +1202,12 @@ thunar_tree_view_context_menu (ThunarTre
293+ g_signal_connect_swapped (G_OBJECT (item), "activate", G_CALLBACK (thunar_tree_view_action_create_folder), view);
294+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
295+ gtk_widget_show (item);
296++
297++ /* set the stock icon */
298++ icon = g_themed_icon_new ("folder-new");
299++ image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_MENU);
300++ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
301++ g_object_unref (icon);
302+
303+ /* append a separator item */
304+ item = gtk_separator_menu_item_new ();
305+--- a/thunar/thunar-window.c
306++++ b/thunar/thunar-window.c
307+@@ -345,8 +345,8 @@ struct _ThunarWindow
308+ static GtkActionEntry action_entries[] =
309+ {
310+ { "file-menu", NULL, N_ ("_File"), NULL, },
311+- { "new-tab", NULL, N_ ("New _Tab"), "<control>T", N_ ("Open a new tab for the displayed location"), G_CALLBACK (thunar_window_action_open_new_tab), },
312+- { "new-window", NULL, N_ ("New _Window"), "<control>N", N_ ("Open a new Thunar window for the displayed location"), G_CALLBACK (thunar_window_action_open_new_window), },
313++ { "new-tab", "tab-new", N_ ("New _Tab"), "<control>T", N_ ("Open a new tab for the displayed location"), G_CALLBACK (thunar_window_action_open_new_tab), },
314++ { "new-window", "window-new", N_ ("New _Window"), "<control>N", N_ ("Open a new Thunar window for the displayed location"), G_CALLBACK (thunar_window_action_open_new_window), },
315+ { "sendto-menu", NULL, N_ ("_Send To"), NULL, },
316+ { "empty-trash", NULL, N_ ("_Empty Trash"), NULL, N_ ("Delete all files and folders in the Trash"), G_CALLBACK (thunar_window_action_empty_trash), },
317+ { "detach-tab", NULL, N_ ("Detac_h Tab"), NULL, N_ ("Open current folder in a new window"), G_CALLBACK (thunar_window_action_detach_tab), },
318
319=== modified file 'debian/patches/series'
320--- debian/patches/series 2014-02-07 16:54:48 +0000
321+++ debian/patches/series 2014-04-06 02:41:27 +0000
322@@ -1,3 +1,6 @@
323 01_support-non-multiarch-modules.patch
324 git-xfdesktop-4.11.patch
325 gtk3-bookmarks.patch
326+git-save-keyboard-shortcuts.patch
327+menu-icon-tweaks.patch
328+git-force-toolbr-icons.patch

Subscribers

People subscribed via source and target branches

to all changes: