Merge lp:~jeremywootten/pantheon-files/fix-1644854-filechooser-forgets-last-folder into lp:~elementary-apps/pantheon-files/trunk

Proposed by Jeremy Wootten
Status: Superseded
Proposed branch: lp:~jeremywootten/pantheon-files/fix-1644854-filechooser-forgets-last-folder
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 72 lines (+20/-0)
4 files modified
data/schemas/org.pantheon.files.gschema.xml (+7/-0)
filechooser-module/FileChooserDialog.vala (+8/-0)
libwidgets/Chrome/BasicLocationBar.vala (+4/-0)
libwidgets/Interfaces/LocatableInterface.vala (+1/-0)
To merge this branch: bzr merge lp:~jeremywootten/pantheon-files/fix-1644854-filechooser-forgets-last-folder
Reviewer Review Type Date Requested Status
Zisu Andrei (community) Approve
Cody Garver (community) Needs Fixing
Review via email: mp+311855@code.launchpad.net

This proposal has been superseded by a proposal from 2016-12-22.

Description of the change

This branch (re)implements a last-folder-uri setting for the pantheon-files filechooser module. It was not found possible to access the gtk file chooser setting so a new setting is created in the pantheon-files schema.

To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) wrote :

See diff comments

review: Needs Fixing
2388. By Jeremy Wootten

Fix format; remove commented out line

Revision history for this message
Zisu Andrei (matzipan) wrote :

LGTM.

review: Approve
2389. By Jeremy Wootten

Merge trunk r2445

2390. By Jeremy Wootten

Merge changes from parent

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/schemas/org.pantheon.files.gschema.xml'
2--- data/schemas/org.pantheon.files.gschema.xml 2015-11-14 13:04:42 +0000
3+++ data/schemas/org.pantheon.files.gschema.xml 2016-12-20 18:38:12 +0000
4@@ -210,5 +210,12 @@
5 <description>The column width preferred by the Miller Column View.</description>
6 </key>
7 </schema>
8+ <schema path="/org/pantheon/files/file-chooser/" id="org.pantheon.files.file-chooser">
9+ <key type ="s" name="last-folder-uri">
10+ <default>''</default>
11+ <summary>Last folder uri</summary>
12+ <description>Uri of the last folder shown by the filechooser</description>
13+ </key>
14+ </schema>
15
16 </schemalist>
17
18=== modified file 'filechooser-module/FileChooserDialog.vala'
19--- filechooser-module/FileChooserDialog.vala 2016-08-12 10:13:52 +0000
20+++ filechooser-module/FileChooserDialog.vala 2016-12-20 18:38:12 +0000
21@@ -60,6 +60,8 @@
22 var settings = new Settings ("org.pantheon.files.preferences");
23 is_single_click = settings.get_boolean ("single-click");
24
25+ var chooser_settings = new Settings ("org.pantheon.files.file-chooser");
26+
27 assign_container_box ();
28 remove_gtk_widgets ();
29 setup_filter_box ();
30@@ -125,9 +127,15 @@
31 location_bar.set_display_path (current_path);
32 });
33
34+ chooser_dialog.unrealize.connect (() => {
35+ chooser_settings.set_string ("last-folder-uri", location_bar.get_display_path ());
36+ });
37+
38 location_bar.path_change_request.connect ((uri) => {
39 chooser_dialog.set_current_folder (uri);
40 });
41+
42+ chooser_dialog.set_current_folder_uri (chooser_settings.get_string ("last-folder-uri"));
43 }
44
45 /*
46
47=== modified file 'libwidgets/Chrome/BasicLocationBar.vala'
48--- libwidgets/Chrome/BasicLocationBar.vala 2016-04-29 11:47:42 +0000
49+++ libwidgets/Chrome/BasicLocationBar.vala 2016-12-20 18:38:12 +0000
50@@ -131,6 +131,10 @@
51 display_path = path; /* Will also change breadcrumbs */
52 }
53
54+ public string get_display_path () {
55+ return display_path;
56+ }
57+
58 public bool set_focussed () {
59 bread.grab_focus ();
60 return bread.has_focus;
61
62=== modified file 'libwidgets/Interfaces/LocatableInterface.vala'
63--- libwidgets/Interfaces/LocatableInterface.vala 2016-05-06 10:36:16 +0000
64+++ libwidgets/Interfaces/LocatableInterface.vala 2016-12-20 18:38:12 +0000
65@@ -21,6 +21,7 @@
66 public signal void path_change_request (string path, Marlin.OpenFlag flag = Marlin.OpenFlag.DEFAULT);
67
68 public abstract void set_display_path (string path);
69+ public abstract string get_display_path ();
70 public abstract bool set_focussed ();
71 }
72 }

Subscribers

People subscribed via source and target branches

to all changes: