Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Make "Show Errors in Status Bar" pref more solid #9030

Merged
merged 2 commits into from
Oct 13, 2014

Conversation

marcelgerber
Copy link
Contributor

This particular pref always gets its way into every brackets.json, even though it's unneeded most times.

Steps:

  1. Rename your %AppData%\Brackets folder
  2. Start Brackets
  3. Use Debug > Show prefs file

Result: There's one single entry: debug.showErrorsInStatusBar: false

@redmunds
Copy link
Contributor

redmunds commented Sep 9, 2014

Result: There's one single entry: debug.showErrorsInStatusBar: false

I don't understand why you think this is a problem. By not writing it to the prefs file, then you have to set it every time you open Brackets, right? I think that's worse because it requires me remember to do more work (and then actually do it).

I, personally, would prefer that the default for this feature to be on, but the team was concerned that this would unnecessarily alarm non-coders, so the default is off.

@marcelgerber
Copy link
Contributor Author

You misunderstood the problem :)
In a fresh Brackets installation, there are no prefs set (the brackets.json is empty), except debug.showErrorsInStatusBar.

If the menu entry changes, the pref is still saved.

@redmunds
Copy link
Contributor

redmunds commented Sep 9, 2014

Oh, I see. I don't think a new parameter is needed for that. What if the code only writes a new pref if it's different from old pref?

@marcelgerber
Copy link
Contributor Author

I've taken that approach from the QuickView code.
The problem with only setting the pref when it's different is that you can't set it to "explicitly false".

@redmunds
Copy link
Contributor

redmunds commented Sep 9, 2014

By "different", I meant the pref values converted to boolean, not the strict value.

@marcelgerber
Copy link
Contributor Author

Done.

@redmunds
Copy link
Contributor

Looks good. Merging.

redmunds added a commit that referenced this pull request Oct 13, 2014
Make "Show Errors in Status Bar" pref more solid
@redmunds redmunds merged commit 3afa289 into adobe:master Oct 13, 2014
@marcelgerber marcelgerber deleted the errors-statusbar-pref branch October 13, 2014 19:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants