Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to hide project close/save warning when opening new project #2949

Merged
merged 1 commit into from Nov 7, 2021

Conversation

xiota
Copy link
Contributor

@xiota xiota commented Oct 19, 2021

This adds an option to hide the warning when opening a project while one is already open. (The default is to retain the warning.) Since projects autosave when closed, no work is lost and the project can just be reopened if needed. Depending on how the user manages project files, reopening the previous project can take less time than responding to the dialog.

src/socket.c Outdated Show resolved Hide resolved
src/ui_utils.h Outdated Show resolved Hide resolved
@xiota xiota requested a review from elextr October 23, 2021 20:52
@xiota
Copy link
Contributor Author

xiota commented Oct 23, 2021

@elextr Think this PR is ready for re-review. Also, if you don't mind, would you look at #2947 (addition to manual to show use of GEANY_DEFAULT_FILETYPE_REGEX feature).

src/socket.c Outdated Show resolved Hide resolved
@xiota xiota requested a review from elextr October 24, 2021 01:12
Copy link
Member

@elextr elextr left a comment

Choose a reason for hiding this comment

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

Please remove the po/.intltool-merge-cache.lock otherwise I'm ok. Good that its documented in the manual and in the plugin API.

But lets see if anyone else loves or loathes it.

@elextr elextr modified the milestones: 1.38, 1.39/2.0 Oct 24, 2021
@elextr
Copy link
Member

elextr commented Oct 24, 2021

Added to 1.39 milestone so its not forgotten

@xiota
Copy link
Contributor Author

xiota commented Oct 24, 2021

Sorry about that lock file... is it okay if I add it to .gitignore?

@elextr
Copy link
Member

elextr commented Oct 24, 2021

Sorry about that lock file... is it okay if I add it to .gitignore?

Shouldn't need to 2977a91

src/ui_utils.h Outdated Show resolved Hide resolved
@eht16
Copy link
Member

eht16 commented Oct 24, 2021

Tested and LGTM apart from the minor issue regarding bumping GEANY_API_VERSION.

Maybe the PR description could be updated to not mention "Don't re-open a project that is already open" which isn't part of this PR anymore?

@xiota
Copy link
Contributor Author

xiota commented Oct 24, 2021

@eht16 I've edited the initial description. I don't know how to bump the GEANY_API_VERSION.

@xiota
Copy link
Contributor Author

xiota commented Oct 24, 2021

@elextr @eht16 Is warn_on_close_project okay? Or should it be warn_on_project_close?

@eht16
Copy link
Member

eht16 commented Oct 24, 2021

I think I would prefer warn_on_close_project but don't mind much.

@xiota
Copy link
Contributor Author

xiota commented Oct 24, 2021

@eht16 The original name I chose was pretty ridiculous: warn_close_save_project.

@xiota
Copy link
Contributor Author

xiota commented Oct 24, 2021

I just saw... #2863 ... warning dialog when the project file is read-only... Does adding an option to hide that warning get it's own PR, or can it be added to this one?

If favor of combining in one PR:

  • They're related in terms of hiding warning related to project files.
  • The changes involve the same files, which would create merge conflicts if they're separate PRs.

@elextr
Copy link
Member

elextr commented Oct 24, 2021

@xiota Either name for the preference is fine by me.

Personally I am not in favour of #2863, its a strange use-case which works as intended, even if erring on the safe if annoying side, so no it shouldn't be added here.

@xiota
Copy link
Contributor Author

xiota commented Oct 25, 2021

I decided to rename the option to warn_on_project_close because it would work better if more options are added in the future: warn_on_project_*, warn_on_document_*, etc.

@eht16
Copy link
Member

eht16 commented Oct 26, 2021

For me this is fine to merge (whith squashed commits).

@xiota
Copy link
Contributor Author

xiota commented Oct 26, 2021

Force push to rebase and squash commits.

@xiota
Copy link
Contributor Author

xiota commented Nov 7, 2021

🎉 🎊 🎉 🎊 🎉 🎊

@xiota xiota deleted the pr-project-warning branch November 7, 2021 17:27
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.

None yet

3 participants