Merge lp://staging/~jeremywootten/pantheon-files/restore-state into lp://staging/~elementary-apps/pantheon-files/trunk

Proposed by Jeremy Wootten
Status: Merged
Approved by: Cody Garver
Approved revision: 1498
Merged at revision: 1500
Proposed branch: lp://staging/~jeremywootten/pantheon-files/restore-state
Merge into: lp://staging/~elementary-apps/pantheon-files/trunk
Diff against target: 1299 lines (+348/-174)
17 files modified
libcore/gof-directory-async.vala (+21/-25)
libcore/gof-file.c (+3/-3)
libwidgets/Animations.vala (+2/-2)
libwidgets/BreadcrumbsElements.vala (+2/-2)
libwidgets/LocationBar.vala (+53/-33)
schemas/org.pantheon.files.gschema.xml (+15/-0)
src/Application.vala (+9/-8)
src/View/LocationBar.vala (+5/-2)
src/View/ViewContainer.vala (+33/-12)
src/View/Window.vala (+127/-18)
src/fm-abstract-icon-view.c (+2/-2)
src/fm-columns-view.c (+6/-6)
src/fm-directory-view.c (+17/-21)
src/gof-window-slot.c (+13/-24)
src/marlin-window-columns.c (+34/-14)
src/marlin-window-columns.h (+2/-2)
src/marlin.vapi (+4/-0)
To merge this branch: bzr merge lp://staging/~jeremywootten/pantheon-files/restore-state
Reviewer Review Type Date Requested Status
Cody Garver (community) Approve
Review via email: mp+217733@code.staging.launchpad.net

Commit message

Implements the saving and restoring of the notebook tabs to fix bug #1232112.
For each tab, the view mode and the root folder are restored.
In the case of Miller view, the view is expanded to its previous state.
The previously active tab is selected.
File selections are not restored.
Undisplayable folders (non-existent or no permission) are not saved.
State is saved in two Preference.settings keys.
An additional key was added allowing tab restoration to be turned off (on by default).

A number of other changes and bug fixes were made to allow the unusually rapid creation of multiple slots and views and avoid associated timing problems. The opportunity was taken to clean up the associated code a little.

Description of the change

Implements the saving and restoring of the notebook tabs.
For each tab, the view mode and the root folder are restored.
In the case of Miller view, the view is expanded to its previous state.
The previously active tab is selected.
File selections are not restored.
Undisplayable folders (non-existent or no permission) are not saved.
State is saved in two Preference.settings keys.
An additional key was added allowing tab restoration to be turned off (on by default).

A number of other changes and bug fixes were made to allow the unusually rapid creation of multiple slots and views and avoid associated timing problems. The opportunity was taken to clean up the associated code a little.

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

The first time I ran this, it opened in /home instead of /home/$USER for some reason

175,198: looks like superfluous blank lines may have made it in

230: end of comment needs a space

454: code style

844-845: comment style

869, 871: code style

906: code style

916: does this need a blank line after? stacked comments look weird

923: unrelated commented out code

945, 951: code style

970: commented out code

review: Needs Fixing
Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Thanks Cody, I'll fix those errors. The reason it started in /home at
first is because that is the default setting in the schema (you cannot have
a variable in the schema). However, it should be possible to fix that as
well.

On 3 May 2014 23:25, Cody Garver <email address hidden> wrote:

> Review: Needs Fixing
>
> The first time I ran this, it opened in /home instead of /home/$USER for
> some reason
>
> 175,198: looks like superfluous blank lines may have made it in
>
> 230: end of comment needs a space
>
> 454: code style
>
> 844-845: comment style
>
> 869, 871: code style
>
> 906: code style
>
> 916: does this need a blank line after? stacked comments look weird
>
> 923: unrelated commented out code
>
> 945, 951: code style
>
> 970: commented out code
> --
>
> https://code.launchpad.net/~jeremywootten/pantheon-files/restore-state/+merge/217733
> You are the owner of lp:~jeremywootten/pantheon-files/restore-state.
>

1496. By Jeremy Wootten

Fix code style, restore default start in user home directory

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

New revision pushed fixing code style and restoring opening user home directory on first start up.

Revision history for this message
Cody Garver (codygarver) wrote :

This is kind of nitpicky and probably not worth the effort, but is there any way to not animate the breadcrumbs when restoring directory? Because it gives the impression that you are re-entering the directory instead of it just picking up where you left off

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

I am trying this, but turning off the animation uncovers a "chicken and
egg" bug in the way the breadcrumb elements are drawn first time round -
the correct total width needs to be known before they are drawn but is only
known after they have all been drawn once. Since they are drawn several
times during the animation this does not normally matter. Should be
fixable though.

On 6 May 2014 23:37, Cody Garver <email address hidden> wrote:

> This is kind of nitpicky and probably not worth the effort, but is there
> any way to not animate the breadcrumbs when restoring directory? Because it
> gives the impression that you are re-entering the directory instead of it
> just picking up where you left off
> --
>
> https://code.launchpad.net/~jeremywootten/pantheon-files/restore-state/+merge/217733
> You are the owner of lp:~jeremywootten/pantheon-files/restore-state.
>

1497. By Jeremy Wootten

Inhibit location bar animation during restoration of tabs, ensure minimum entry width

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

OK, I have uploaded a new revision hides the location bar animation but it is not very elegant. Just turning the animation off causes the breadcrumb widths to be calculated wrongly - they need to be drawn twice in order to optimise the distribution of widths between different breadcrumbs and just calling queue_draw () twice does not guarantee this - chances are these will be merged into a single draw. So I kept the animation but made it practically invisible.

I also modified the drawing of the location bar to avoid a bug whereby it was possible for the breadcrumbs to fill the whole bar leaving nowhere to click to edit it.

Also fixed a bug where switching between two tabs each of which had very long paths of equal length cause the location bar to be drawn incorrectly.

1498. By Jeremy Wootten

Merged changes from trunk and resolve conflict

Revision history for this message
Cody Garver (codygarver) wrote :

Awesome

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: