Merge lp:~jeremywootten/pantheon-files/fix-1608229-i18n-Temporary-folder into lp:~elementary-apps/pantheon-files/trunk

Proposed by Jeremy Wootten
Status: Merged
Approved by: Leonardo Lemos
Approved revision: 2263
Merged at revision: 2264
Proposed branch: lp:~jeremywootten/pantheon-files/fix-1608229-i18n-Temporary-folder
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 11 lines (+1/-1)
1 file modified
src/View/AbstractDirectoryView.vala (+1/-1)
To merge this branch: bzr merge lp:~jeremywootten/pantheon-files/fix-1608229-i18n-Temporary-folder
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+301592@code.launchpad.net

Commit message

AbstractDirectoryView.vala: Get the name of the templates directory from Glib

Description of the change

Remove hard-coded (non-translatable) name of user Templates directory and replace with the Glib.Environment variable.

This branch needs to be tested by someone running in a non-English locale.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/View/AbstractDirectoryView.vala'
2--- src/View/AbstractDirectoryView.vala 2016-07-24 22:41:15 +0000
3+++ src/View/AbstractDirectoryView.vala 2016-07-31 16:00:33 +0000
4@@ -2102,7 +2102,7 @@
5 private GLib.MenuModel? build_menu_templates () {
6 /* Potential optimisation - do just once when app starts or view created */
7 templates = null;
8- var template_path = "%s/Templates".printf (GLib.Environment.get_home_dir ());
9+ var template_path = GLib.Environment.get_user_special_dir (GLib.UserDirectory.TEMPLATES);
10 var template_folder = GLib.File.new_for_path (template_path);
11 load_templates_from_folder (template_folder);
12

Subscribers

People subscribed via source and target branches

to all changes: