Skip to content

Close Open Documents from folder when closing folder#833

Closed
franciol wants to merge 9 commits intoelementary:masterfrom
franciol:576
Closed

Close Open Documents from folder when closing folder#833
franciol wants to merge 9 commits intoelementary:masterfrom
franciol:576

Conversation

@franciol
Copy link
Contributor

Fixes #576
FileView sends a signal to MainWindow so it can verify if there's an open file from that folder.
MainWindow then closes all docs open from that folder.

@franciol franciol changed the title Fixes #576 Close Open Documents from folder when closing folder Jun 26, 2020
Copy link
Collaborator

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your first contributon to Code!

This works OK for the simple case where there is one view and it has documents in it and the approach makes sense. However, there are issues with some corner cases as noted inline.

  • If there is a split view and the wrong view is focused then the project folders do not get closed
  • If there are no documents open and the welcome view is showing then closing a project folder produces a spurious blank view.

@jeremypw
Copy link
Collaborator

jeremypw commented Jul 2, 2020

@franciol I have noticed that there seems to be another previous open PR addressing the same issue - #782. Your approach seems simpler though, so if you can fix the outstanding issues and if no disadvantages of your approach come to light, I would prefer it.

Copy link
Collaborator

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works well now. I will approve but leave unmerged pending review from @tintou.

@jeremypw jeremypw requested a review from tintou July 3, 2020 16:06
@jeremypw
Copy link
Collaborator

jeremypw commented Oct 2, 2020

@tintou Do have any comments for this?

@jeremypw
Copy link
Collaborator

jeremypw commented Oct 2, 2020

Seems to have acquired a build - problem - investigating.

@jeremypw
Copy link
Collaborator

jeremypw commented Oct 2, 2020

@franciol This PR needs updating due to changes in master (which merging did not fix). split_view no longer exists.

Are you in a position to return this PR to working order?

@jeremypw jeremypw mentioned this pull request Oct 20, 2020
@jeremypw
Copy link
Collaborator

Closed in favour of #912

@jeremypw jeremypw closed this Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Close open files from project when project folder is closed

3 participants