Notepads
Notepads copied to clipboard
feat: exit app when closing last tab
Implemented functionality to exit app when last tab is closed as requested in #248.
PR Type
What kind of change does this PR introduce?
- Feature
Other information
The implemented method doesn't interfere with Windows' ability to remember window size and position.
Never realized there is a method called "TryConsolidateAsync" and does exactly what is needed. How did you figure that out?
Never realized there is a method called "TryConsolidateAsync" and does exactly what is needed. How did you figure that out?
Just by reading documentation.
Since it has been too long that I changed this behavior (it used to be like this). Maybe we should add this as an option in Advanced Settings? Default would be not to close the app and let's give the option to user.
Since it has been too long that I changed this behavior (it used to be like this). Maybe we should add this as an option in Advanced Settings? Default would be not to close the app and let's give the option to user.
Made changes as you asked, here is how the ui looks:
I had a go at that myself, but didn't know about TryConsolidateAsync()
, very nice.
+1 for merging this.
I'll happily supply German translations when this gets to master.
@JasonStein is there any further work you need from me here or is it RTM??
@JasonStein is there any further work you need from me here or is it RTM??
I don't like the translation here since it is not very user-friendly (maybe just App Preference and Exit when closing the last tab?). Let me think of any better wording here before merging the PR. Btw I will probably put this in the next release.
Some Suggestions for the wording:
- "App Behavior Preferences"
- "Window Behavior Preferences"
- "Exit app when closing last tab"
- "Window Behavior Preferences"
- "Exit app when closing last tab"
LGTM. @soumyamahunt thoughts?
- "Window Behavior Preferences"
- "Exit app when closing last tab"
LGTM. @soumyamahunt thoughts?
Fine with this, but I think "Always open new window" conveys better meaning than "Window Behavior Preferences".
This is how it looks now after the changes:
The description below the switches is confusing. Its a single sentence, describing two independent settings. When I read it, it appears to me, that "closing the last tab" will also somehow enable "always open in new window".
I think it should be split up to describe the options seperately, or maybe we should just omit the description of "Exit app when closing last tab", since the title explains it well enough.
The description below the switches is confusing. Its a single sentence, describing two independent settings. When I read it, it appears to me, that "closing the last tab" will also somehow enable "always open in new window".
I think it should be split up to describe the options seperately, or maybe we should just omit the description of "Exit app when closing last tab", since the title explains it well enough.
Yes this could create confusion, I have removed description for last tab closing option.
What about moving the description to beneath the first switch, and have the description change depending on whether the switch is on or off. If the switch is on it reads The app is automatically closed when there are no open tabs.
. If the switch is off it reads The app stays open when there are no open tabs.
What about moving the description to beneath the first switch, and have the description change depending on whether the switch is on or off. If the switch is on it reads
The app is automatically closed when there are no open tabs.
. If the switch is off it readsThe app stays open when there are no open tabs.
Notepads doesn't follow different content depending on whether switch is on or off. Doing that only for this will create confusion. Also, I personally think this type of changing content whether switch is on/off creates more confusion for user. In your example when the user toggles it on it reads The app is automatically closed when there are no open tabs.
does that mean currently this behavior applied or when user toggles switch off the behavior is applied, which creates confusion.
Notepads doesn't follow different content depending on whether switch is on or off. Doing that only for this will create confusion. Also, I personally think this type of changing content whether switch is on/off creates more confusion for user.
I agree. I honestly don't know what I was thinking.
Regardless, the description text should be moved to under the button it corresponds to.
Regardless, the description text should be moved to under the button it corresponds to.
Currently the new toggle switch doesn't contain any description as the content itself pretty self explanatory, as for the "always open new window" option the description for it is below it.
Currently the new toggle switch doesn't contain any description as the content itself pretty self explanatory, as for the "always open new window" option the description for it is below it.
Turns out I was reading it the wrong way round 😅 .
Why has this functionality not been applied yet?
Any updates on this? Will it be added to a release soon?