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
=== modified file 'debian/changelog'
--- debian/changelog 2014-03-13 07:53:06 +0000
+++ debian/changelog 2014-04-06 02:41:27 +0000
@@ -1,3 +1,15 @@
1thunar (1.6.3-1ubuntu5) trusty; urgency=medium
2
3 * Add git-save-keyboard-shortcuts.patch. LP: #1186846
4 - Keyboard shortcuts save when changed rather than when thunar is closed
5 * Add menu-icon-tweaks.patch. LP: #1271861
6 - Don't use generic folder icons for open with default application
7 - Add icons for open in new tab, new window
8 * Add git-force-toolbr-icons.patch
9 - Fix for "Home" and "Open Parent" icons going missing from toolbar
10
11 -- Jackson Doak <noskcaj@ubuntu.com> Sat, 05 Apr 2014 08:22:40 +1100
12
1thunar (1.6.3-1ubuntu4) trusty; urgency=medium13thunar (1.6.3-1ubuntu4) trusty; urgency=medium
214
3 * Update gtk3-bookmarks.patch. LP: #128064115 * Update gtk3-bookmarks.patch. LP: #1280641
416
=== added file 'debian/patches/git-force-toolbr-icons.patch'
--- debian/patches/git-force-toolbr-icons.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/git-force-toolbr-icons.patch 2014-04-06 02:41:27 +0000
@@ -0,0 +1,18 @@
1Origin: http://git.xfce.org/xfce/thunar/commit/?id=c9712b835be90127ef4af1ac1b1fd645081a646a
2Description: Fix "Home" and "Open Parent" icons going missing from toolbar
3Bug: https://bugzilla.xfce.org/show_bug.cgi?id=10179
4
5---
6 thunar/thunar-window.c | 1 +
7 1 file changed, 1 insertion(+)
8
9--- a/thunar/thunar-window.c
10+++ b/thunar/thunar-window.c
11@@ -1821,6 +1821,7 @@ thunar_window_install_location_bar (Thun
12 /* setup the toolbar for the location bar */
13 window->location_toolbar = gtk_ui_manager_get_widget (window->ui_manager, "/location-toolbar");
14 g_object_get (G_OBJECT (window->preferences), "misc-small-toolbar-icons", &small_icons, NULL);
15+ gtk_toolbar_set_style (GTK_TOOLBAR (window->location_toolbar), GTK_TOOLBAR_ICONS);
16 gtk_toolbar_set_icon_size (GTK_TOOLBAR (window->location_toolbar),
17 small_icons ? GTK_ICON_SIZE_SMALL_TOOLBAR : GTK_ICON_SIZE_LARGE_TOOLBAR);
18 gtk_table_attach (GTK_TABLE (window->table), window->location_toolbar, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
019
=== added file 'debian/patches/git-save-keyboard-shortcuts.patch'
--- debian/patches/git-save-keyboard-shortcuts.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/git-save-keyboard-shortcuts.patch 2014-04-06 02:41:27 +0000
@@ -0,0 +1,138 @@
1Origin: http://git.xfce.org/xfce/thunar/commit/?id=821c9b480b7feb625461b5ec1f35e92dcc87e3d9
2Bug-Ubuntu: https://launchpad.net/bugs/1186846
3Bug: https://bugzilla.xfce.org/show_bug.cgi?id=10139
4Description: Makes keyboard shortcuts save when changed rather than when thunar is closed
5
6---
7 thunar/thunar-application.c | 69 +++++++++++++++++++++++++++++++++++++++-----
8 1 file changed, 62 insertions(+), 7 deletions(-)
9
10--- a/thunar/thunar-application.c
11+++ b/thunar/thunar-application.c
12@@ -59,6 +59,8 @@
13 #include <thunar/thunar-util.h>
14 #include <thunar/thunar-view.h>
15
16+#define ACCEL_MAP_PATH "Thunar/accels.scm"
17+
18
19
20 /* Prototype for the Thunar job launchers */
21@@ -85,6 +87,8 @@ static void thunar_application
22 guint prop_id,
23 const GValue *value,
24 GParamSpec *pspec);
25+static void thunar_application_accel_map_changed (ThunarApplication *application);
26+static gboolean thunar_application_accel_map_save (gpointer user_data);
27 static void thunar_application_collect_and_launch (ThunarApplication *application,
28 gpointer parent,
29 const gchar *icon_name,
30@@ -142,6 +146,9 @@ struct _ThunarApplication
31
32 gboolean daemon;
33
34+ guint accel_map_save_id;
35+ GtkAccelMap *accel_map;
36+
37 guint show_dialogs_timer_id;
38
39 #ifdef HAVE_GUDEV
40@@ -220,7 +227,7 @@ thunar_application_init (ThunarApplicati
41 application->progress_dialog = NULL;
42
43 /* check if we have a saved accel map */
44- path = xfce_resource_lookup (XFCE_RESOURCE_CONFIG, "Thunar/accels.scm");
45+ path = xfce_resource_lookup (XFCE_RESOURCE_CONFIG, ACCEL_MAP_PATH);
46 if (G_LIKELY (path != NULL))
47 {
48 /* load the accel map */
49@@ -228,6 +235,11 @@ thunar_application_init (ThunarApplicati
50 g_free (path);
51 }
52
53+ /* watch for changes */
54+ application->accel_map = gtk_accel_map_get ();
55+ g_signal_connect_swapped (G_OBJECT (application->accel_map), "changed",
56+ G_CALLBACK (thunar_application_accel_map_changed), application);
57+
58 #ifdef HAVE_GUDEV
59 /* establish connection with udev */
60 application->udev_client = g_udev_client_new (subsystems);
61@@ -245,21 +257,21 @@ static void
62 thunar_application_finalize (GObject *object)
63 {
64 ThunarApplication *application = THUNAR_APPLICATION (object);
65- gchar *path;
66 GList *lp;
67
68 /* unqueue all files waiting to be processed */
69 thunar_g_file_list_free (application->files_to_launch);
70
71 /* save the current accel map */
72- path = xfce_resource_save_location (XFCE_RESOURCE_CONFIG, "Thunar/accels.scm", TRUE);
73- if (G_LIKELY (path != NULL))
74+ if (G_UNLIKELY (application->accel_map_save_id != 0))
75 {
76- /* save the accel map */
77- gtk_accel_map_save (path);
78- g_free (path);
79+ g_source_remove (application->accel_map_save_id);
80+ thunar_application_accel_map_save (application);
81 }
82
83+ if (application->accel_map != NULL)
84+ g_object_unref (G_OBJECT (application->accel_map));
85+
86 #ifdef HAVE_GUDEV
87 /* cancel any pending volman watch source */
88 if (G_UNLIKELY (application->volman_watch_id != 0))
89@@ -347,6 +359,49 @@ thunar_application_set_property (GObject
90 }
91
92
93+
94+static gboolean
95+thunar_application_accel_map_save (gpointer user_data)
96+{
97+ ThunarApplication *application = THUNAR_APPLICATION (user_data);
98+ gchar *path;
99+
100+ _thunar_return_val_if_fail (THUNAR_IS_APPLICATION (application), FALSE);
101+
102+ application->accel_map_save_id = 0;
103+
104+ /* save the current accel map */
105+ path = xfce_resource_save_location (XFCE_RESOURCE_CONFIG, ACCEL_MAP_PATH, TRUE);
106+ if (G_LIKELY (path != NULL))
107+ {
108+ /* save the accel map */
109+ gtk_accel_map_save (path);
110+ g_free (path);
111+ }
112+
113+ return FALSE;
114+}
115+
116+
117+
118+static void
119+thunar_application_accel_map_changed (ThunarApplication *application)
120+{
121+ _thunar_return_if_fail (THUNAR_IS_APPLICATION (application));
122+
123+ /* stop pending save */
124+ if (application->accel_map_save_id != 0)
125+ {
126+ g_source_remove (application->accel_map_save_id);
127+ application->accel_map_save_id = 0;
128+ }
129+
130+ /* schedule new save */
131+ application->accel_map_save_id =
132+ g_timeout_add_seconds (10, thunar_application_accel_map_save, application);
133+}
134+
135+
136
137 static void
138 thunar_application_collect_and_launch (ThunarApplication *application,
0139
=== added file 'debian/patches/menu-icon-tweaks.patch'
--- debian/patches/menu-icon-tweaks.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/menu-icon-tweaks.patch 2014-04-06 02:41:27 +0000
@@ -0,0 +1,127 @@
1Author: Thaddaeus Tintenfisch <thad.fisch@gmail.com>
2Bug: https://bugzilla.xfce.org/show_bug.cgi?id=10652
3Bug-Ubuntu: https://launchpad.net/bugs/1271861
4Description: Add or change various menu icons:
5 - Open With DEFAULT Application
6 - New Tab/Window
7 - Create Folder/Document
8 - Empty File
9
10---
11 thunar/thunar-launcher.c | 8 +++++++-
12 thunar/thunar-location-buttons.c | 2 +-
13 thunar/thunar-standard-view.c | 2 +-
14 thunar/thunar-templates-action.c | 3 ++-
15 thunar/thunar-tree-view.c | 7 +++++++
16 thunar/thunar-window.c | 4 ++--
17 6 files changed, 20 insertions(+), 6 deletions(-)
18
19--- a/thunar/thunar-launcher.c
20+++ b/thunar/thunar-launcher.c
21@@ -815,8 +815,9 @@ thunar_launcher_update_idle (gpointer da
22 ** - "Open", "Open in n New Windows" and "Open in n New Tabs" actions
23 **/
24
25- /* Prepare "Open" label */
26+ /* Prepare "Open" label and icon */
27 gtk_action_set_label (launcher->action_open, _("_Open"));
28+ gtk_action_set_stock_id (launcher->action_open, GTK_STOCK_OPEN);
29
30 if (n_selected_files == n_directories && n_directories >= 1)
31 {
32@@ -928,6 +929,7 @@ thunar_launcher_update_idle (gpointer da
33 /* turn the "Open" action into "Execute" */
34 g_object_set (G_OBJECT (launcher->action_open),
35 "label", _("_Execute"),
36+ "stock-id", GTK_STOCK_EXECUTE,
37 "tooltip", ngettext ("Execute the selected file", "Execute the selected files", n_selected_files),
38 NULL);
39 }
40@@ -945,6 +947,10 @@ thunar_launcher_update_idle (gpointer da
41 g_free (tooltip);
42 g_free (label);
43
44+ /* load default application icon */
45+ gtk_action_set_stock_id (launcher->action_open, NULL);
46+ gtk_action_set_gicon (launcher->action_open, g_app_info_get_icon (applications->data));
47+
48 /* remember the default application for the "Open" action */
49 g_object_set_qdata_full (G_OBJECT (launcher->action_open), thunar_launcher_handler_quark, applications->data, g_object_unref);
50
51--- a/thunar/thunar-location-buttons.c
52+++ b/thunar/thunar-location-buttons.c
53@@ -175,7 +175,7 @@ static const GtkActionEntry action_entri
54 { "location-buttons-open", GTK_STOCK_OPEN, N_("_Open"), "", NULL, G_CALLBACK (thunar_location_buttons_action_open), },
55 { "location-buttons-open-in-new-tab", NULL, N_("Open in New Tab"), "", NULL, G_CALLBACK (thunar_location_buttons_action_open_in_new_tab), },
56 { "location-buttons-open-in-new-window", NULL, N_("Open in New Window"), "", NULL, G_CALLBACK (thunar_location_buttons_action_open_in_new_window), },
57- { "location-buttons-create-folder", NULL, N_("Create _Folder..."), "", NULL, G_CALLBACK (thunar_location_buttons_action_create_folder), },
58+ { "location-buttons-create-folder", "folder-new", N_("Create _Folder..."), "", NULL, G_CALLBACK (thunar_location_buttons_action_create_folder), },
59 { "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), },
60 { "location-buttons-paste-into-folder", GTK_STOCK_PASTE, N_("Paste Into Folder"), "", NULL, G_CALLBACK (thunar_location_buttons_action_paste_into_folder), },
61 { "location-buttons-properties", GTK_STOCK_PROPERTIES, N_("_Properties..."), "", NULL, G_CALLBACK (thunar_location_buttons_action_properties), },
62--- a/thunar/thunar-standard-view.c
63+++ b/thunar/thunar-standard-view.c
64@@ -393,7 +393,7 @@ static const GtkActionEntry action_entri
65 {
66 { "file-context-menu", NULL, N_ ("File Context Menu"), NULL, NULL, NULL, },
67 { "folder-context-menu", NULL, N_ ("Folder Context Menu"), NULL, NULL, NULL, },
68- { "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), },
69+ { "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), },
70 { "properties", GTK_STOCK_PROPERTIES, N_ ("_Properties..."), "<alt>Return", N_ ("View the properties of the selected file"), G_CALLBACK (thunar_standard_view_action_properties), },
71 { "cut", GTK_STOCK_CUT, N_ ("Cu_t"), NULL, NULL, G_CALLBACK (thunar_standard_view_action_cut), },
72 { "copy", GTK_STOCK_COPY, N_ ("_Copy"), NULL, NULL, G_CALLBACK (thunar_standard_view_action_copy), },
73--- a/thunar/thunar-templates-action.c
74+++ b/thunar/thunar-templates-action.c
75@@ -477,7 +477,7 @@ thunar_templates_action_load_finished (T
76 gtk_widget_show (item);
77
78 /* add the icon for the emtpy file item */
79- image = gtk_image_new_from_stock (GTK_STOCK_NEW, GTK_ICON_SIZE_MENU);
80+ image = gtk_image_new_from_stock (GTK_STOCK_FILE, GTK_ICON_SIZE_MENU);
81 gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
82 }
83
84@@ -542,6 +542,7 @@ thunar_templates_action_new (const gchar
85 "hide-if-empty", FALSE,
86 "label", label,
87 "name", name,
88+ "icon-name", "document-new",
89 NULL);
90 }
91
92--- a/thunar/thunar-tree-view.c
93+++ b/thunar/thunar-tree-view.c
94@@ -1093,6 +1093,7 @@ thunar_tree_view_context_menu (ThunarTre
95 GtkWidget *menu;
96 GtkWidget *item;
97 GtkWidget *window;
98+ GIcon *icon;
99 GList *providers, *lp;
100 GList *actions = NULL, *tmp;
101
102@@ -1201,6 +1202,12 @@ thunar_tree_view_context_menu (ThunarTre
103 g_signal_connect_swapped (G_OBJECT (item), "activate", G_CALLBACK (thunar_tree_view_action_create_folder), view);
104 gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
105 gtk_widget_show (item);
106+
107+ /* set the stock icon */
108+ icon = g_themed_icon_new ("folder-new");
109+ image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_MENU);
110+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
111+ g_object_unref (icon);
112
113 /* append a separator item */
114 item = gtk_separator_menu_item_new ();
115--- a/thunar/thunar-window.c
116+++ b/thunar/thunar-window.c
117@@ -345,8 +345,8 @@ struct _ThunarWindow
118 static GtkActionEntry action_entries[] =
119 {
120 { "file-menu", NULL, N_ ("_File"), NULL, },
121- { "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), },
122- { "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), },
123+ { "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), },
124+ { "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), },
125 { "sendto-menu", NULL, N_ ("_Send To"), NULL, },
126 { "empty-trash", NULL, N_ ("_Empty Trash"), NULL, N_ ("Delete all files and folders in the Trash"), G_CALLBACK (thunar_window_action_empty_trash), },
127 { "detach-tab", NULL, N_ ("Detac_h Tab"), NULL, N_ ("Open current folder in a new window"), G_CALLBACK (thunar_window_action_detach_tab), },
0128
=== modified file 'debian/patches/series'
--- debian/patches/series 2014-02-07 16:54:48 +0000
+++ debian/patches/series 2014-04-06 02:41:27 +0000
@@ -1,3 +1,6 @@
101_support-non-multiarch-modules.patch101_support-non-multiarch-modules.patch
2git-xfdesktop-4.11.patch2git-xfdesktop-4.11.patch
3gtk3-bookmarks.patch3gtk3-bookmarks.patch
4git-save-keyboard-shortcuts.patch
5menu-icon-tweaks.patch
6git-force-toolbr-icons.patch

Subscribers

People subscribed via source and target branches

to all changes: