Skip to content

Closes files opened from the side bar when their corresponding project is closed#782

Closed
igordsm wants to merge 13 commits intoelementary:masterfrom
igordsm:issue-774
Closed

Closes files opened from the side bar when their corresponding project is closed#782
igordsm wants to merge 13 commits intoelementary:masterfrom
igordsm:issue-774

Conversation

@igordsm
Copy link
Contributor

@igordsm igordsm commented Mar 18, 2020

Closes #774 : when a project folder is closed all files opened by clicking in the sidebar are closed too. Files opened by using the "open" button in the toolbar (or Ctrl+O) remain even if they belong to a project folder that was closed.

Keep in mind that this is my first experience with Vala. I am aware that my solution is probably not the best, but I am willing to make it so.

Thank you for your contributions on this and hope to hear from you soon.

@igordsm igordsm changed the title Issue #774 Closes files opened from the side bar when their corresponding project is closed Mar 18, 2020
Copy link
Member

@tintou tintou 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 contribution, there are a few things to change and this can be ready to go

igordsm and others added 10 commits March 18, 2020 19:34
Co-Authored-By: Corentin Noël <corentin@elementary.io>
Co-Authored-By: Corentin Noël <corentin@elementary.io>
Co-Authored-By: Corentin Noël <corentin@elementary.io>
Co-Authored-By: Corentin Noël <corentin@elementary.io>
Co-Authored-By: Corentin Noël <corentin@elementary.io>
Co-Authored-By: Corentin Noël <corentin@elementary.io>
Co-Authored-By: Corentin Noël <corentin@elementary.io>
Co-Authored-By: Corentin Noël <corentin@elementary.io>
Co-Authored-By: Corentin Noël <corentin@elementary.io>
@igordsm igordsm requested a review from tintou March 18, 2020 22:54
@igordsm
Copy link
Contributor Author

igordsm commented Mar 18, 2020

@tintou thank you for your revisions. I have accepted them and fixed the last linting error. CI now passes.

@jeremypw
Copy link
Collaborator

jeremypw commented Jul 2, 2020

@igordsm @tintou The PR #833 has been submitted addressing the same issue, but in a simpler way. Although it has some issues these are easily fixed. Are there any advantages to your approach?

@igordsm
Copy link
Contributor Author

igordsm commented Jul 3, 2020

@jeremypw When I created this PR I wanted to separate files opened from the project bar and files opened via the Open toolbar button. So this would not close a file that belongs to a project that is being closed but was opened via the toolbar. It is much more complex than the other proposal, so it is up for discussion if this additional complexity is worth it. I am not sure, honestly, as this seems like an edge case.

@jeremypw
Copy link
Collaborator

jeremypw commented Jul 3, 2020

@igordsm Yes, it seems unlikely that a user would open a project file manually when it easier to open it from the sidebar. Even then, if you close a project folder you are kind of saying "I don't want to work on the files in this project anymore" so if one stays open it could be unexpected. So personally I don't think it is worth the extra complexity.

One refinement that could be useful is a context menu option for expandable folders "Close all documents in this folder" (easily implemented based on #833) but that is for another PR.

@igordsm
Copy link
Contributor Author

igordsm commented Jul 10, 2020

Closing this in favour of #833 .

@igordsm igordsm closed this Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Close associated files when closing a project

3 participants